#ifndef __VISUALIZATION_H #define __VISUALIZATION_H #include "common.h" namespace CHCDemoEngine { class Bvh; class PerspectiveCamera; class Camera; class RenderState; class AxisAlignedBox3; class GLUquadric; /** Abstract class implementing a scene traversal for rendering. */ class Visualization { public: /** Main constructor taking a bvh, a camera, a visualization camera and the current render state as parameters */ Visualization(Bvh *bvh, PerspectiveCamera *camera, Camera *vizCamera, RenderState *state); ~Visualization(); /** Renders the visualizatioin */ void Render(bool showShadowFrustra); /** Sets the scene hierarchy. */ void SetHierarchy(Bvh *bvh); /** Sets the visualization camera. */ void SetVizCamera(Camera *cam) { mVizCamera = cam; } /** Sets the currently used scene camera. */ void SetCamera(PerspectiveCamera *cam) {mCamera = cam; } /** Sets the current render state */ void SetRenderState(RenderState *state); /** Sets the currentframe id */ void SetFrameId(int frameId); /** Renders a camera frustum. */ void RenderFrustum(); protected: //////////// //-- members /// the current camera PerspectiveCamera *mCamera; /// the visualization camera Camera *mVizCamera; /// the root of the scene hierarchy Bvh *mBvh; /// the current render state RenderState *mRenderState; /// the current frame id int mFrameId; }; } #endif // VISUALIZATION_H