Revision 2806,
1.4 KB
checked in by mattausch, 16 years ago
(diff) |
improved visualization
|
Line | |
---|
1 | #ifndef __VISUALIZATION_H
|
---|
2 | #define __VISUALIZATION_H
|
---|
3 |
|
---|
4 | #include "common.h"
|
---|
5 |
|
---|
6 |
|
---|
7 | namespace CHCDemoEngine
|
---|
8 | {
|
---|
9 |
|
---|
10 | class Bvh;
|
---|
11 | class Camera;
|
---|
12 | class RenderState;
|
---|
13 | class AxisAlignedBox3;
|
---|
14 | class GLUquadric;
|
---|
15 |
|
---|
16 |
|
---|
17 | /** Abstract class implementing a scene traversal for rendering.
|
---|
18 | */
|
---|
19 | class Visualization
|
---|
20 | {
|
---|
21 | public:
|
---|
22 | /** Main constructor taking a bvh, a camera, a visualization camera and the current render state
|
---|
23 | as parameters
|
---|
24 | */
|
---|
25 | Visualization(Bvh *bvh, Camera *camera, Camera *vizCamera, RenderState *renderState);
|
---|
26 |
|
---|
27 | ~Visualization();
|
---|
28 |
|
---|
29 | /** Renders the visualizatioin
|
---|
30 | */
|
---|
31 | void Render();
|
---|
32 | /** Sets the scene hierarchy.
|
---|
33 | */
|
---|
34 | void SetHierarchy(Bvh *bvh);
|
---|
35 | /** Sets the visualization camera.
|
---|
36 | */
|
---|
37 | void SetVizCamera(Camera *cam) {mVizCamera = cam;}
|
---|
38 | /** Sets the currently used scene camera.
|
---|
39 | */
|
---|
40 | void SetCamera(Camera *cam) {mCamera = cam;}
|
---|
41 | /** Sets the current render state
|
---|
42 | */
|
---|
43 | void SetRenderState(RenderState *state);
|
---|
44 | /** Sets the currentframe id
|
---|
45 | */
|
---|
46 | void SetFrameId(int frameId);
|
---|
47 |
|
---|
48 | protected:
|
---|
49 |
|
---|
50 | /** Renders a camera frustum.
|
---|
51 | */
|
---|
52 | void RenderFrustum();
|
---|
53 |
|
---|
54 |
|
---|
55 | ////////////
|
---|
56 | //-- members
|
---|
57 |
|
---|
58 | /// the current camera
|
---|
59 | Camera *mCamera;
|
---|
60 | /// the visualization camera
|
---|
61 | Camera *mVizCamera;
|
---|
62 | /// the root of the scene hierarchy
|
---|
63 | Bvh *mBvh;
|
---|
64 | /// the current render state
|
---|
65 | RenderState *mRenderState;
|
---|
66 | /// the current frame id
|
---|
67 | int mFrameId;
|
---|
68 | };
|
---|
69 |
|
---|
70 | }
|
---|
71 |
|
---|
72 |
|
---|
73 |
|
---|
74 | #endif // VISUALIZATION_H |
---|
Note: See
TracBrowser
for help on using the repository browser.