Cutout Vis2012
TUWienVisualisierung2(SS2012)-AdaptiveCutaways
Main Page
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Pages
src
Scene.h
1
#ifndef _SCENE_H_
2
#define _SCENE_H_
3
4
#include "SceneNode.h"
5
#include "Renderable.h"
6
#include "Shader.h"
7
#include "Gizmo.h"
8
#include "Camera.h"
9
#include <unordered_set>
10
11
typedef
std::unordered_set<Renderable*> rset_t;
12
typedef
std::unordered_set<Renderable*>::iterator rset_iter_t;
13
14
18
class
Scene
19
{
20
public
:
21
friend
class
SceneNode
;
22
23
Scene
();
24
28
SceneNode
*
createSceneNode
();
29
33
SceneNode
*
getRoot
();
34
38
void
update
(
double
frameLength);
42
void
updateTransforms
(
const
glm::mat4& viewMatrix);
43
47
void
select
(
Renderable
* renderable);
51
void
deselect
(
Renderable
* renderable);
55
void
deselectAll
();
59
Renderable
*
getFirstSelected
();
63
rset_iter_t
selectionBegin
();
67
rset_iter_t
selectionEnd
();
68
72
void
renderAll
(
Shader
* shader);
76
void
renderSelected
(
Shader
* shader);
80
void
renderSelectedThatCanCut
(
Shader
* shader);
84
void
renderUnselected
(
Shader
* shader);
88
void
renderUnselectedThatCannotBeCut
(
Shader
* shader);
92
void
renderUnselectedThatCanBeCut
(
Shader
* shader);
93
97
void
setSelectionCanCut
(
bool
c);
101
void
setSelectionCanBeCut
(
bool
c);
105
void
setSelectionLocalAngle
(
float
angle);
106
110
void
renderInterface
(
Shader
* shader);
111
115
void
setCamera
(
Camera
* camera);
119
Camera
*
getCamera
();
120
124
Gizmo
*
getGizmo
();
125
129
void
enableGizmo
(
bool
enabled);
130
134
void
clear
();
135
139
void
setGlobalAngle
(
float
angle);
143
float
getGlobalAngle
();
147
void
resetGlobalAngle
();
148
152
void
setEdgeCompression
(
bool
c);
156
bool
getEdgeCompression
();
157
161
void
setDirectionalConstraint
(
bool
c);
165
bool
getDirectionalConstraint
();
166
170
void
setGhostDistance
(
float
dist);
174
float
getGhostDistance
();
175
182
void
setLineType
(
int
lineType);
186
int
getLineType
();
187
188
static
const
int
LINES_ON, LINES_GHOST, LINES_OFF;
189
190
private
:
191
SceneNode
* _root;
192
rset_t _unselectedRenderables;
193
rset_t _selectedRenderables;
194
Camera
* _camera;
195
196
Gizmo
* _gizmo;
197
198
bool
_gizmoEnabled;
199
bool
_edgeCompression;
200
bool
_directionalConstraint;
201
float
_ghostDistance;
202
int
_lineType;
203
204
float
_globalAngle;
205
206
void
addRenderable(
Renderable
* renderable);
207
void
removeRenderable(
Renderable
* renderable);
208
209
static
const
float
DEFAULT_GLOBAL_ANGLE;
210
211
};
212
213
214
#endif
Generated on Mon Jun 10 2013 17:20:11 for Cutout Vis2012 by
1.8.4