1 | #ifndef _LBBCBILLBOARDCLOUDINDIRECTTEXTUREVIEWMODE_H |
---|
2 | #define _LBBCBILLBOARDCLOUDINDIRECTTEXTUREVIEWMODE_H |
---|
3 | |
---|
4 | #include <LBBCPrerequisites.h> |
---|
5 | #include <LBBCManager.h> |
---|
6 | #include <IMG.h> |
---|
7 | #include <OBAOgreFrameListenerMode.h> |
---|
8 | |
---|
9 | namespace LBBC { |
---|
10 | |
---|
11 | class _BBCExport BillboardCloudIndirectTextureViewMode : public OBA::OgreFrameListenerMode |
---|
12 | { |
---|
13 | protected: |
---|
14 | unsigned int mFrame; |
---|
15 | |
---|
16 | Ogre::SceneNode *mBillboardCloudPointClustersSceneNode; |
---|
17 | |
---|
18 | Ogre::SceneNode *mBillboardCloudSplittedSceneNode; |
---|
19 | |
---|
20 | Ogre::SceneNode *mEntityClustersGroupedSceneNode; |
---|
21 | |
---|
22 | Ogre::Entity *mEntityClustersGrouped; |
---|
23 | |
---|
24 | Ogre::Entity *mBillboardCloudPointClusters; |
---|
25 | |
---|
26 | Ogre::Entity *mBillboardCloudSplitted;
|
---|
27 | |
---|
28 | IMG::TexturePtr mClusterTexture; |
---|
29 | |
---|
30 | IMG::TextureAtlasPtr mTextureAtlas; |
---|
31 | |
---|
32 | unsigned int mNumTextures;
|
---|
33 |
|
---|
34 | unsigned int mCurrentTexture; |
---|
35 | |
---|
36 | unsigned int mTextureAtlasSize; |
---|
37 | |
---|
38 | unsigned int mTextureSize; |
---|
39 | |
---|
40 | unsigned int mBitRange; |
---|
41 | |
---|
42 | Ogre::PixelFormat mSrcPixelFormat; |
---|
43 | |
---|
44 | Ogre::PixelFormat mDestPixelFormat; |
---|
45 | |
---|
46 | Ogre::String mTextureAtlasName;
|
---|
47 |
|
---|
48 | Ogre::String mTextureAtlasFolder; |
---|
49 | |
---|
50 | Ogre::String mBillboardCloudPointClustersName; |
---|
51 | |
---|
52 | Ogre::String mBillboardCloudSplittedName; |
---|
53 | |
---|
54 | Ogre::String mEntityClustersGroupedName; |
---|
55 | |
---|
56 | Ogre::Matrix4 mCustomProjMatrix; |
---|
57 | |
---|
58 | bool mDebugBillboardGeneration; |
---|
59 | |
---|
60 | bool mDebugTextureAtlasGeneration; |
---|
61 | |
---|
62 | unsigned int mCurrentBillboardGroup; |
---|
63 | |
---|
64 | unsigned int mCurrentBillboard; |
---|
65 | |
---|
66 | public: |
---|
67 | |
---|
68 | BillboardCloudIndirectTextureViewMode(Ogre::RenderWindow* win, unsigned int ogreFrameListenerModeHandle, bool useBufferedInputKeys = false, bool useBufferedInputMouse = false); |
---|
69 | |
---|
70 | virtual ~BillboardCloudIndirectTextureViewMode();
|
---|
71 | |
---|
72 | virtual bool frameStarted(const Ogre::FrameEvent& evt, Ogre::InputReader *inputReader); |
---|
73 | |
---|
74 | virtual void createScene(); |
---|
75 | |
---|
76 | virtual void destroyScene(); |
---|
77 | |
---|
78 | void setEntityClustersGroupedName(Ogre::String entityClustersGrouped); |
---|
79 | |
---|
80 | void initializeBillboardCloudPointClusters(); |
---|
81 | |
---|
82 | void setBillboardCloudGroupedTextureAtlasDebug(bool debugTextureAtlasGeneration); |
---|
83 | |
---|
84 | void configureBillboard(); |
---|
85 | |
---|
86 | void configureTexture(); |
---|
87 | |
---|
88 | void configureTextureAtlas(); |
---|
89 | |
---|
90 | bool processUnbufferedKeyInput(const Ogre::FrameEvent& evt); |
---|
91 | |
---|
92 | void saveTextureAtlas(); |
---|
93 | |
---|
94 | void setTextureAtlasSize(unsigned int size); |
---|
95 | |
---|
96 | void setTextureSize(unsigned int size); |
---|
97 | |
---|
98 | void setBillboardCloudSplittedName(Ogre::String billboardCloudSplittedName); |
---|
99 | |
---|
100 | void setBillboardCloudPointClustersName(Ogre::String billboardCloudPointClustersName); |
---|
101 | |
---|
102 | void setTextureAtlasName(Ogre::String textureAtlasName);
|
---|
103 |
|
---|
104 | void setTextureAtlasFolder(Ogre::String textureAtlasFolder);
|
---|
105 | |
---|
106 | void setTextureAtlasBitRange(unsigned int bitRange); |
---|
107 | |
---|
108 | void configureBillboardOrthogonalAlignedCamera(unsigned int iBillboard); |
---|
109 | |
---|
110 | void initializeEntityClustersGrouped();
|
---|
111 |
|
---|
112 | void initializeBillboardCloudSplitted();
|
---|
113 | |
---|
114 | void generateTexture(); |
---|
115 | |
---|
116 | void generateTextureAtlas(); |
---|
117 | |
---|
118 | }; |
---|
119 | |
---|
120 | } |
---|
121 | #endif |
---|