1 | #ifndef _TestCullingIVApplication_H__
|
---|
2 | #define _TestCullingIVApplication_H__
|
---|
3 |
|
---|
4 | #include "CEGUIForwardRefs.h"
|
---|
5 | #include <OgreRenderTargetListener.h>
|
---|
6 | #include "ExampleApplication.h"
|
---|
7 |
|
---|
8 | #include "ivreader.h"
|
---|
9 | #include "IVFrameListener.h"
|
---|
10 |
|
---|
11 |
|
---|
12 | // z order index of visualizaion viewport
|
---|
13 | #define VIZ_VIEWPORT_Z_ORDER 10
|
---|
14 |
|
---|
15 |
|
---|
16 | /** Rendertarget listener which shows a visualization.
|
---|
17 | */
|
---|
18 | class VisualizationRenderTargetListener: public RenderTargetListener
|
---|
19 | {
|
---|
20 | public:
|
---|
21 | VisualizationRenderTargetListener(SceneManager *sceneMgr);
|
---|
22 |
|
---|
23 | protected:
|
---|
24 | void preViewportUpdate (const RenderTargetViewportEvent &evt);
|
---|
25 | void postRenderTargetUpdate (const RenderTargetEvent &evt);
|
---|
26 |
|
---|
27 | SceneManager *mSceneMgr;
|
---|
28 |
|
---|
29 | ShadowTechnique mSavedShadowTechnique;
|
---|
30 | ColourValue mSavedAmbientLight;
|
---|
31 | };
|
---|
32 |
|
---|
33 |
|
---|
34 | class TestCullingIVApplication: public ExampleApplication
|
---|
35 | {
|
---|
36 | public:
|
---|
37 | TestCullingIVApplication();
|
---|
38 | ~TestCullingIVApplication();
|
---|
39 |
|
---|
40 | /** Generates a scene using num entities of a type.
|
---|
41 | @param num the number of objects
|
---|
42 | @parma objectType the type of objects
|
---|
43 | */
|
---|
44 | void generateScene(int num, int objectType);
|
---|
45 |
|
---|
46 |
|
---|
47 | protected:
|
---|
48 |
|
---|
49 | //-- inherited from ExampleApplication
|
---|
50 | bool setup();
|
---|
51 | void createScene();
|
---|
52 | void createFrameListener();
|
---|
53 | void createCamera();
|
---|
54 | //void createViewports();
|
---|
55 |
|
---|
56 | virtual void createRenderTargetListener();
|
---|
57 |
|
---|
58 | /** cegui setup
|
---|
59 | */
|
---|
60 | void setupGui();
|
---|
61 |
|
---|
62 | CEGUI::OgreCEGUIRenderer *mGUIRenderer;
|
---|
63 | CEGUI::System *mGUISystem;
|
---|
64 |
|
---|
65 | Camera *mVizCamera;
|
---|
66 | SceneNode *mCamNode;
|
---|
67 | Light *mSunLight;
|
---|
68 |
|
---|
69 | ColourValue mAmbientLight;
|
---|
70 |
|
---|
71 | IVReader *mIVReader;
|
---|
72 | IVFrameListener *mIVFrameListener;
|
---|
73 |
|
---|
74 | private:
|
---|
75 | void chooseSceneManager(void);
|
---|
76 | };
|
---|
77 |
|
---|
78 | #endif // TestCullingIVApplication |
---|