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