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