source: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Visualization.h @ 3245

Revision 3245, 1.7 KB checked in by mattausch, 16 years ago (diff)

pvs seems to work now

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