- Timestamp:
- 04/19/06 00:27:14 (19 years ago)
- Location:
- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCBillboardCloudTextureViewMode.h
r747 r751 22 22 unsigned int mSubEntityVisible; 23 23 24 Ogre::Entity *mEntity ;24 Ogre::Entity *mEntityClusters; 25 25 26 26 public: 27 27 28 void setEntity (Ogre::Entity *entity)28 void setEntityClusters(Ogre::Entity *entity) 29 29 { 30 mEntity = entity;30 mEntityClusters = entity; 31 31 } 32 32 … … 50 50 if (mCurrentTexture < mNumTextures) 51 51 { 52 //calculateProjectionMatrix(unsigned int iSubEntity, Ogre::Camera *cam);53 //initializeShaderParameters(unsigned int iSubEntity);54 mTexture->getRectangle2D()->setVisible(false);55 mTextureAtlas->getRectangle2D()->setVisible(false);56 52 } 57 53 } … … 76 72 void preRenderTargetUpdate(const Ogre::RenderTargetEvent& evt) 77 73 { 78 //configureTexture( unsigned int iSubEntity );79 74 } 80 75 … … 90 85 unsigned int mFrame; 91 86 92 Ogre::SceneNode *m ClusterizedEntitiesMergedSceneNode;87 Ogre::SceneNode *mEntityClustersGroupedSceneNode; 93 88 94 Ogre::Entity *mClusterizedEntities; 89 Ogre::SceneNode *mBillboardCloudSplittedSceneNode; 90 91 Ogre::Entity *mEntityClustersGrouped; 92 93 Ogre::Entity *mBillboardCloudSplitted; 95 94 96 95 ClusterTextureListener mClusterTextureListener; … … 120 119 Ogre::String mTextureAtlasFolder; 121 120 122 Ogre::String mEntityName; 121 Ogre::String mEntityClustersGroupedName; 122 123 Ogre::String mBillboardCloudSplittedName; 124 125 Ogre::Matrix4 mCustomProjMatrix; 126 127 Ogre::String mTextureName; 128 129 bool mDebugBillboardGeneration; 130 131 bool mDebugTextureAtlasGeneration; 132 133 unsigned int mCurrentBillboardGroup; 134 135 unsigned int mCurrentBillboard; 123 136 124 137 public: 125 138 126 BillboardCloudTextureViewMode(Ogre::RenderWindow* win, unsigned int ogreFrameListenerModeHandle, bool useBufferedInputKeys = false, bool useBufferedInputMouse = false); 139 BillboardCloudTextureViewMode(Ogre::RenderWindow* win, unsigned int ogreFrameListenerModeHandle, bool useBufferedInputKeys = false, bool useBufferedInputMouse = false); 127 140 128 141 virtual ~BillboardCloudTextureViewMode(); … … 133 146 134 147 virtual void destroyScene(); 148 149 void setBillboardCloudGroupedTextureAtlasDebug(bool debugTextureAtlasGeneration); 150 151 void setTextureName(Ogre::String textureName); 152 153 void configureBillboard(); 154 155 void enableEntityClusterCustomOrthogonalCameraMaterial(unsigned int iEntityClusterGrouped); 156 157 void disableEntityClusterCustomOrthogonalCameraMaterial(unsigned int iEntityClusterGrouped); 158 159 void configureTexture(); 160 161 void configureTextureAtlas(); 162 163 bool processUnbufferedKeyInput(const Ogre::FrameEvent& evt); 164 165 void saveTextureAtlas(); 135 166 136 167 void setTextureAtlasSize(unsigned int size); … … 138 169 void setTextureSize(unsigned int size); 139 170 140 void setEntityName(Ogre::String entityName); 171 void setEntityClustersGroupedName(Ogre::String entityClustersGrouped); 172 173 void setBillboardCloudSplittedName(Ogre::String billboardCloudSplittedName); 141 174 142 175 void setTextureAtlasName(Ogre::String textureAtlasName); … … 145 178 146 179 void setTextureAtlasBitRange(unsigned int bitRange); 180 181 void configureBillboardOrthogonalAlignedCamera(unsigned int iBillboard); 182 183 void initializeEntityClustersGrouped(); 184 185 void initializeBillboardCloudSplitted(); 186 187 void generateTexture(); 188 189 void generateTextureAtlas(); 190 147 191 }; 148 192 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCBillboardViewMode.h
r731 r751 13 13 OBA::OgreFrameListenerMode(win, ogreFrameListenerModeHandle, useBufferedInputKeys, useBufferedInputMouse) 14 14 { 15 showDebugOverlay(false); 16 mReloadedTextures = false; 15 17 } 16 18 … … 19 21 } 20 22 23 bool frameStarted(const Ogre::FrameEvent& evt, Ogre::InputReader *inputReader) 24 { 25 mWindow->getViewport(0)->setBackgroundColour(Ogre::ColourValue(0.0, 0.0, 0.0, 1.0)); 26 27 //if (!mReloadedTextures) 28 //{ 29 // for (unsigned int iSubEntity = 0; iSubEntity < mBillboardCloudEntity->getNumSubEntities(); iSubEntity++) 30 // { 31 // Ogre::MaterialPtr materialPtr = Ogre::MaterialManager::getSingleton().getByName(mBillboardCloudEntity->getSubEntity(iSubEntity)->getMaterialName()); 32 // Ogre::LogManager::getSingleton().logMessage("Reloading texture:" + materialPtr->getTechnique(0)->getPass(0)->getTextureUnitState(0)->getTextureName()); 33 34 // Ogre::TexturePtr texturePtr = Ogre::TextureManager::getSingleton().getByName(materialPtr->getTechnique(0)->getPass(0)->getTextureUnitState(0)->getTextureName()); 35 // texturePtr->reload(); 36 // materialPtr->reload(); 37 // } 38 // mReloadedTextures = true; 39 //} 40 41 return OgreFrameListenerMode::frameStarted(evt, inputReader); 42 } 43 44 void setBillboardCloudMeshName(Ogre::String billboardCloudMeshName) 45 { 46 mBillboardCloudMeshName = billboardCloudMeshName; 47 } 48 21 49 virtual void createScene() 22 50 { 51 mWindow->getViewport(0)->setBackgroundColour(Ogre::ColourValue(0.0, 0.0, 0.0, 1.0)); 52 23 53 Ogre::SceneNode* sNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); 24 Ogre::Entity* emesh = mSceneMgr->createEntity("chestnutLeavesBillboardCloudMerged.mesh","chestnutLeavesBillboardCloudGrouped.mesh"); 25 sNode->attachObject(emesh); 54 //mBillboardCloudEntity = mSceneMgr->createEntity(mBillboardCloudMeshName, mBillboardCloudMeshName); 55 mBillboardCloudEntity = mSceneMgr->createEntity("chestnutLeavesBillboardCloudGrouped.mesh", "chestnutLeavesBillboardCloudGrouped.mesh"); 56 sNode->attachObject(mBillboardCloudEntity); 57 sNode->rotate(Ogre::Vector3::UNIT_X, Ogre::Radian(Ogre::Degree(-90.0))); 26 58 } 27 59 60 protected: 61 Ogre::String mBillboardCloudMeshName; 62 63 Ogre::Entity *mBillboardCloudEntity; 64 65 bool mReloadedTextures; 28 66 }; 29 67 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCClusterViewMode.h
r731 r751 13 13 OBA::OgreFrameListenerMode(win, ogreFrameListenerModeHandle, useBufferedInputKeys, useBufferedInputMouse) 14 14 { 15 showDebugOverlay(false); 15 16 } 16 17 … … 19 20 } 20 21 22 bool frameStarted(const Ogre::FrameEvent& evt, Ogre::InputReader *inputReader) 23 { 24 mWindow->getViewport(0)->setBackgroundColour(Ogre::ColourValue(0.0, 0.0, 0.0, 1.0)); 25 26 return OgreFrameListenerMode::frameStarted(evt, inputReader); 27 } 28 29 void setEntityClustersMeshName(Ogre::String entityClustersMeshName) 30 { 31 mEntityClustersMeshName = entityClustersMeshName; 32 } 33 21 34 virtual void createScene() 22 35 { 36 mWindow->getViewport(0)->setBackgroundColour(Ogre::ColourValue(0.0, 0.0, 0.0, 1.0)); 37 23 38 Ogre::SceneNode* sNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); 24 Ogre::Entity* emesh = mSceneMgr->createEntity("chestnutLeavesEntitySample.mesh", "chestnutLeavesEntitySample.mesh"); 25 sNode->attachObject(emesh); 39 //Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity(mEntityClustersMeshName, mEntityClustersMeshName); 40 Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity("chestnutLeafClustersGrouped.mesh", "chestnutLeafClustersGrouped.mesh"); 41 sNode->attachObject(eLeafClustersGrouped); 42 sNode->rotate(Ogre::Vector3::UNIT_X, Ogre::Radian(Ogre::Degree(-90.0))); 26 43 } 44 protected: 45 Ogre::String mEntityClustersMeshName; 46 47 27 48 }; 28 49 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCEntityTextureAtlasViewMode.h
r745 r751 40 40 virtual ~EntityTextureAtlasViewMode(); 41 41 42 unsigned int nextPowerOf2(unsigned int nPlanes);43 44 42 virtual bool frameStarted(const Ogre::FrameEvent& evt, Ogre::InputReader *inputReader); 45 43 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCLeafDistributionGenerator.h
r721 r751 16 16 virtual ~LeafDistributionGenerator(); 17 17 18 void generateAverageLeafPosition(Leaf *leaf); 19 18 20 void generateAverageLeafNormal(Leaf *leaf); 19 21 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCManager.h
r745 r751 69 69 void loadBillboardCloudMergedXML(); 70 70 71 void saveBillboardCloudIndirectSplittedPointMeshName(); 71 72 72 73 protected: -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCSampleConfigFile.h
r747 r751 50 50 Ogre::String getEntityClustersFolder(); 51 51 52 bool getEntityClustersMergedClusters();53 54 52 bool getEntityClustersSplittedClusters(); 55 53 56 Ogre::String getEntityClustersMergedMeshName(); 54 bool getEntityClustersGroupedClusters(); 55 56 bool getBillboardCloudDiffuseColorGroupedBillboardsTextureAtlasDebug(); 57 58 bool getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasDebug(); 59 60 bool getBillboardCloudIndirectGroupedBillboardsTextureAtlasDebug(); 61 62 bool getBillboardCloudIndirectMergedBillboardsTextureAtlasDebug(); 63 64 Ogre::String getEntityClustersGroupedMeshName(); 57 65 58 66 Ogre::String getEntityClustersSplittedMeshName(); 59 67 60 Ogre::String getEntityClusters MergedMaterialName();68 Ogre::String getEntityClustersGroupedMaterialName(); 61 69 62 70 Ogre::String getEntityClustersSplittedMaterialName(); 71 72 Ogre::String getEntityClustersGroupedTextureUnit0Name(); 73 74 Ogre::String getEntityClustersSplittedTextureUnit0Name(); 63 75 64 76 bool getBillboardCloudMergedBillboards(); … … 94 106 Ogre::String getBillboardCloudMergedXMLName(); 95 107 108 Ogre::String getBillboardCloudIndirectPointMeshName(); 109 110 Ogre::String getBillboardCloudIndirectPointMaterialName(); 111 96 112 unsigned int getBillboardCloudGroups(); 97 113 … … 102 118 Ogre::String getBillboardCloudDiffuseColorEntityTextureName(); 103 119 104 Ogre::String getBillboardCloudDiffuseColorEntityTextureAtlasName(); 120 Ogre::String getBillboardCloudDiffuseColorEntityTextureAtlasName(); 105 121 106 122 unsigned int getBillboardCloudDiffuseColorEntityTextureAtlasBitRange(); … … 108 124 unsigned int getBillboardCloudDiffuseColorEntityTextureAtlasSize(); 109 125 110 unsigned int getBillboardCloudDiffuseColor BillboardGroupTextureSize();126 unsigned int getBillboardCloudDiffuseColorGroupedBillboardsTextureSize(); 111 127 112 bool getBillboardCloudIndirect BillboardGroupTextureAtlasGeneration();128 bool getBillboardCloudIndirectGroupedBillboardsTextureAtlasGeneration(); 113 129 114 Ogre::String getBillboardCloudIndirect BillboardGroupTextureAtlasName();130 Ogre::String getBillboardCloudIndirectGroupedBillboardsTextureAtlasName(); 115 131 116 unsigned int getBillboardCloudIndirect BillboardGroupTextureAtlasBitRange();132 unsigned int getBillboardCloudIndirectGroupedBillboardsTextureAtlasBitRange(); 117 133 118 unsigned int getBillboardCloudIndirect BillboardGroupTextureAtlasSize();134 unsigned int getBillboardCloudIndirectGroupedBillboardsTextureAtlasSize(); 119 135 120 unsigned int getBillboardCloudIndirect BillboardGroupTextureSize();136 unsigned int getBillboardCloudIndirectGroupedBillboardsTextureSize(); 121 137 122 bool getBillboardCloudDiffuseColor BillboardGroupTextureAtlasGeneration();138 bool getBillboardCloudDiffuseColorGroupedBillboardsTextureAtlasGeneration(); 123 139 124 140 bool getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasGeneration(); … … 132 148 unsigned int getBillboardCloudDiffuseColorMergedBillboardsTextureSize(); 133 149 134 unsigned int getBillboardCloudDiffuseColor BillboardGroupTextureAtlasSize();150 unsigned int getBillboardCloudDiffuseColorGroupedBillboardsTextureAtlasSize(); 135 151 136 152 unsigned int getBillboardCloudDiffuseColorEntityTextureAtlasNumSamples(); … … 138 154 bool getBillboardCloudIndirectMergedBillboardsTextureAtlasGeneration(); 139 155 156 Ogre::String getBillboardCloudDiffuseColorGroupedBillboardsTextureAtlasName(); 157 140 158 Ogre::String getBillboardCloudIndirectMergedBillboardsTextureAtlasName(); 141 159 142 160 unsigned int getBillboardCloudIndirectMergedBillboardsTextureAtlasBitRange(); 161 162 unsigned int getBillboardCloudDiffuseColorGroupedBillboardsTextureAtlasBitRange(); 143 163 144 164 unsigned int getBillboardCloudIndirectMergedBillboardsTextureAtlasSize();
Note: See TracChangeset
for help on using the changeset viewer.