Changeset 747 for GTP/trunk/Lib
- Timestamp:
- 04/11/06 16:43:19 (19 years ago)
- Location:
- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/doc
- Property svn:ignore
-
old new 1 1 developerManual 2 userManual2 devManual
-
- Property svn:ignore
-
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCBillboardCloudTextureViewMode.h
r745 r747 110 110 unsigned int mTextureSize; 111 111 112 Ogre::PixelFormat mTexturePixelFormat;113 114 Ogre::String mEntityName;115 116 112 unsigned int mBitRange; 117 113 … … 124 120 Ogre::String mTextureAtlasFolder; 125 121 122 Ogre::String mEntityName; 123 126 124 public: 125 127 126 BillboardCloudTextureViewMode(Ogre::RenderWindow* win, unsigned int ogreFrameListenerModeHandle, bool useBufferedInputKeys = false, bool useBufferedInputMouse = false); 128 127 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCSampleConfigFile.h
r745 r747 12 12 virtual ~SampleConfigFile(); 13 13 14 Ogre::String getEntitySampleMaterial PrefixName();14 Ogre::String getEntitySampleMaterialName(); 15 15 16 16 bool getEntityDistributionMerged(); 17 17 18 Ogre::String getEntityDistributionSplittedM aterialPrefixName();18 Ogre::String getEntityDistributionSplittedMeshName(); 19 19 20 Ogre::String getEntityDistributionMergedMaterialPrefixName(); 20 Ogre::String getEntityDistributionSplittedMaterialName(); 21 22 Ogre::String getEntityDistributionMergedMeshName(); 23 24 Ogre::String getEntityDistributionMergedMaterialName(); 21 25 22 26 bool getEntityDistributionSplitted(); 23 27 24 Ogre::String getEntitySampleMesh PrefixName();28 Ogre::String getEntitySampleMeshName(); 25 29 26 30 bool getEntityDistributionGeneration(); … … 28 32 Ogre::String getEntityDistributionFolder(); 29 33 30 Ogre::String getEntityDistributionXML PrefixName();34 Ogre::String getEntityDistributionXMLName(); 31 35 32 36 Ogre::String getEntitiesFolder(); … … 34 38 bool getEntitySampleMeshGeneration(); 35 39 36 Ogre::String getEntitiesMesh PrefixName();40 Ogre::String getEntitiesMeshName(); 37 41 38 42 bool getEntityClustersGeneration(); … … 50 54 bool getEntityClustersSplittedClusters(); 51 55 52 Ogre::String getEntityClustersMe shPrefixName();56 Ogre::String getEntityClustersMergedMeshName(); 53 57 54 Ogre::String getEntityClusters MergedMaterialPrefixName();58 Ogre::String getEntityClustersSplittedMeshName(); 55 59 56 Ogre::String getEntityClustersSplittedMaterialPrefixName(); 60 Ogre::String getEntityClustersMergedMaterialName(); 61 62 Ogre::String getEntityClustersSplittedMaterialName(); 57 63 58 64 bool getBillboardCloudMergedBillboards(); … … 64 70 Ogre::String getBillboardCloudFolder(); 65 71 66 Ogre::String getBillboardCloudMe shPrefixName();72 Ogre::String getBillboardCloudMergedMeshName(); 67 73 68 Ogre::String getBillboardCloud BillboardMaterialPrefixName();74 Ogre::String getBillboardCloudGroupedMeshName(); 69 75 70 Ogre::String getBillboardCloud BillboardGroupMaterialPrefixName();76 Ogre::String getBillboardCloudSplittedMeshName(); 71 77 72 Ogre::String getBillboardCloud BillboardTextureUnit0PrefixName();78 Ogre::String getBillboardCloudMergedMaterialName(); 73 79 74 Ogre::String getBillboardCloud BillboardGroupTextureUnit0PrefixName();80 Ogre::String getBillboardCloudSplittedMaterialName(); 75 81 76 Ogre::String getBillboardCloudXMLPrefixName(); 82 Ogre::String getBillboardCloudGroupedMaterialName(); 83 84 Ogre::String getBillboardCloudSplittedTextureUnit0Name(); 85 86 Ogre::String getBillboardCloudMergedTextureUnit0Name(); 87 88 Ogre::String getBillboardCloudGroupedTextureUnit0Name(); 89 90 Ogre::String getBillboardCloudGroupedXMLName(); 91 92 Ogre::String getBillboardCloudSplittedXMLName(); 93 94 Ogre::String getBillboardCloudMergedXMLName(); 77 95 78 96 unsigned int getBillboardCloudGroups(); … … 82 100 bool getBillboardCloudDiffuseColorEntityTextureAtlasGeneration(); 83 101 84 Ogre::String getBillboardCloudDiffuseColorEntityTexture PrefixName();102 Ogre::String getBillboardCloudDiffuseColorEntityTextureName(); 85 103 86 Ogre::String getBillboardCloudDiffuseColorEntityTextureAtlas PrefixName();104 Ogre::String getBillboardCloudDiffuseColorEntityTextureAtlasName(); 87 105 88 106 unsigned int getBillboardCloudDiffuseColorEntityTextureAtlasBitRange(); … … 94 112 bool getBillboardCloudIndirectBillboardGroupTextureAtlasGeneration(); 95 113 96 Ogre::String getBillboardCloudIndirectBillboardGroupTextureAtlas PrefixName();114 Ogre::String getBillboardCloudIndirectBillboardGroupTextureAtlasName(); 97 115 98 116 unsigned int getBillboardCloudIndirectBillboardGroupTextureAtlasBitRange(); … … 106 124 bool getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasGeneration(); 107 125 108 Ogre::String getBillboardCloudDiffuseColorMergedBillboardsTextureAtlas PrefixName();126 Ogre::String getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasName(); 109 127 110 128 unsigned int getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasBitRange(); … … 120 138 bool getBillboardCloudIndirectMergedBillboardsTextureAtlasGeneration(); 121 139 122 Ogre::String getBillboardCloudIndirectMergedBillboardsTextureAtlas PrefixName();140 Ogre::String getBillboardCloudIndirectMergedBillboardsTextureAtlasName(); 123 141 124 142 unsigned int getBillboardCloudIndirectMergedBillboardsTextureAtlasBitRange(); -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IBRBillboardCloudTreeApplication.cpp
r745 r747 21 21 mSampleConfigFile = new LBBC::SampleConfigFile(); 22 22 mSampleConfigFile->load(mOpts.cfg); 23 //this->setup(false); 24 //mLBBCManager = new LBBC::LBBCManager(); 25 //mLBBCManager->setSampleConfigFile(mSampleConfigFile); 26 ////mLBBCManager->loadSampleConfigFile(mOpts.cfg); 27 //mLBBCManager->initialize(); 28 29 //if (mSampleConfigFile->getEntityDistributionGeneration()) 30 //{ 31 // mLBBCManager->generateEntityDistribution(); 32 //} 33 //else 34 //{ 35 // mLBBCManager->loadEntityDistribution(); 36 //} 37 //if (mSampleConfigFile->getEntitySampleMeshGeneration()) 38 //{ 39 // mLBBCManager->saveSingleEntity(); 40 //} 41 //if (mSampleConfigFile->getEntityClustersGeneration()) 42 //{ 43 // mLBBCManager->generateEntityClusters(); 44 //} 45 //if (mSampleConfigFile->getBillboardCloudGeneration()) 46 //{ 47 // mLBBCManager->generateBillboardCloud(); 48 //} 49 50 //mLBBCManager->shutdown(); 51 //delete mLBBCManager; 52 //mOgreBase->shutdown(); 53 //delete mOgreBase; 23 //---------------------------------------------------------------------------- 24 this->setup(false); 25 mLBBCManager = new LBBC::LBBCManager(); 26 mLBBCManager->setSampleConfigFile(mSampleConfigFile); 27 //mLBBCManager->loadSampleConfigFile(mOpts.cfg); 28 mLBBCManager->initialize(); 29 30 if (mSampleConfigFile->getEntityDistributionGeneration()) 31 { 32 mLBBCManager->generateEntityDistribution(); 33 } 34 else 35 { 36 mLBBCManager->loadEntityDistribution(); 37 } 38 if (mSampleConfigFile->getEntitySampleMeshGeneration()) 39 { 40 mLBBCManager->saveSingleEntity(); 41 } 42 if (mSampleConfigFile->getEntityClustersGeneration()) 43 { 44 mLBBCManager->generateEntityClusters(); 45 } 46 if (mSampleConfigFile->getBillboardCloudGeneration()) 47 { 48 mLBBCManager->generateBillboardCloud(); 49 } 50 51 mLBBCManager->shutdown(); 52 delete mLBBCManager; 53 mOgreBase->shutdown(); 54 delete mOgreBase; 54 55 //---------------------------------------------------------------------------- 55 56 this->setup(true); … … 64 65 mFrameListener->getFrameListenerMode(iFrameListenerMode)->destroyScene(); 65 66 } 67 mLBBCManager->shutdown(); 68 delete mLBBCManager; 66 69 mRoot->shutdown(); 67 70 mWindow->destroy(); … … 149 152 anotherFrameListenerMode->createCamera(); 150 153 anotherFrameListenerMode->createViewports(); 151 //anotherFrameListenerMode->setEntityName(Ogre::String(mSampleConfigFile->getEntityClustersMeshPrefixName() + "Merged.mesh"));152 154 anotherFrameListenerMode->setTextureAtlasSize(mSampleConfigFile->getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasSize()); 153 155 anotherFrameListenerMode->setTextureSize(mSampleConfigFile->getBillboardCloudDiffuseColorMergedBillboardsTextureSize()); 154 156 anotherFrameListenerMode->setTextureAtlasBitRange(mSampleConfigFile->getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasBitRange()); 155 anotherFrameListenerMode->setTextureAtlasName(mSampleConfigFile->getBillboardCloudDiffuseColorMergedBillboardsTextureAtlas PrefixName());157 anotherFrameListenerMode->setTextureAtlasName(mSampleConfigFile->getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasName()); 156 158 anotherFrameListenerMode->setTextureAtlasFolder(mSampleConfigFile->getBillboardCloudFolder()); 159 anotherFrameListenerMode->setEntityName(mSampleConfigFile->getEntityClustersMergedMeshName()); 157 160 anotherFrameListenerMode->createScene(); 158 161 mFrameListener->addFrameListenerMode(anotherFrameListenerMode); 159 162 } 160 163 161 //{162 //LBBC::ClusterViewMode *anotherFrameListenerMode;163 //anotherFrameListenerMode = new LBBC::ClusterViewMode(mWindow,mFrameListener->getNumFrameListenerModes());164 //anotherFrameListenerMode->chooseSceneManager();165 //anotherFrameListenerMode->createCamera();166 //anotherFrameListenerMode->createViewports();167 //anotherFrameListenerMode->createScene();168 //mFrameListener->addFrameListenerMode(anotherFrameListenerMode);169 //}170 171 //{172 //LBBC::BillboardViewMode *anotherFrameListenerMode;173 //anotherFrameListenerMode = new LBBC::BillboardViewMode(mWindow,mFrameListener->getNumFrameListenerModes());174 //anotherFrameListenerMode->chooseSceneManager();175 //anotherFrameListenerMode->createCamera();176 //anotherFrameListenerMode->createViewports();177 //anotherFrameListenerMode->createScene();178 //mFrameListener->addFrameListenerMode(anotherFrameListenerMode);179 //}164 { 165 LBBC::ClusterViewMode *anotherFrameListenerMode; 166 anotherFrameListenerMode = new LBBC::ClusterViewMode(mWindow,mFrameListener->getNumFrameListenerModes()); 167 anotherFrameListenerMode->chooseSceneManager(); 168 anotherFrameListenerMode->createCamera(); 169 anotherFrameListenerMode->createViewports(); 170 anotherFrameListenerMode->createScene(); 171 mFrameListener->addFrameListenerMode(anotherFrameListenerMode); 172 } 173 174 { 175 LBBC::BillboardViewMode *anotherFrameListenerMode; 176 anotherFrameListenerMode = new LBBC::BillboardViewMode(mWindow,mFrameListener->getNumFrameListenerModes()); 177 anotherFrameListenerMode->chooseSceneManager(); 178 anotherFrameListenerMode->createCamera(); 179 anotherFrameListenerMode->createViewports(); 180 anotherFrameListenerMode->createScene(); 181 mFrameListener->addFrameListenerMode(anotherFrameListenerMode); 182 } 180 183 181 184 { … … 188 191 textureAtlasFrameListenerMode->setTextureAtlasBitRange(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTextureAtlasBitRange()); 189 192 textureAtlasFrameListenerMode->setTextureAtlasNumSamples(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTextureAtlasNumSamples()); 190 textureAtlasFrameListenerMode->setTextureName(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTexture PrefixName());191 textureAtlasFrameListenerMode->setTextureAtlasName(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTextureAtlas PrefixName());193 textureAtlasFrameListenerMode->setTextureName(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTextureName()); 194 textureAtlasFrameListenerMode->setTextureAtlasName(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTextureAtlasName()); 192 195 textureAtlasFrameListenerMode->setTextureAtlasFolder(mSampleConfigFile->getBillboardCloudFolder()); 193 196 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGTextureAtlas.cpp
r745 r747 186 186 Ogre::PixelUtil::bulkPixelConversion(pBox.data,mPixelFormat,pDest.data,pixelFormat,pBox.getWidth()*pBox.getHeight()); 187 187 188 //if (pixelFormat == Ogre::PF_FLOAT32_RGBA)189 //{190 // imdebug("rgba w=%d h=%d %p b=32f",pDest.getWidth(),pDest.getHeight(),pDest.data);191 //}192 193 188 // copyToMemory 194 189 Ogre::ImageCodec::ImageData *imgData = new Ogre::ImageCodec::ImageData(); -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCBillboardCloudTextureViewMode.cpp
r745 r747 98 98 } 99 99 100 void BillboardCloudTextureViewMode::setEntityName(Ogre::String entityName) 101 { 102 mEntityName = entityName; 103 } 104 100 105 void BillboardCloudTextureViewMode::setTextureAtlasBitRange(unsigned int bitRange) 101 106 { … … 116 121 { 117 122 mTextureAtlasName = textureAtlasName; 118 }119 120 void BillboardCloudTextureViewMode::setEntityName(Ogre::String entityName)121 {122 mEntityName = entityName;123 123 } 124 124 … … 147 147 148 148 mClusterizedEntitiesMergedSceneNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); 149 //mClusterizedEntities = mSceneMgr->createEntity(mEntityName, mEntityName); 150 mClusterizedEntities = mSceneMgr->createEntity("mapleLeavesClusterizedEntitiesMerged.mesh", "mapleLeavesClusterizedEntitiesMerged.mesh"); 149 Ogre::LogManager::getSingleton().logMessage("Mesh:" + mEntityName); 150 std::cin.get(); 151 152 mClusterizedEntities = mSceneMgr->createEntity(mEntityName, mEntityName); 153 //mClusterizedEntities = mSceneMgr->createEntity("mapleLeavesClusterizedEntitiesMerged.mesh", "mapleLeavesClusterizedEntitiesMerged.mesh"); 151 154 mClusterizedEntitiesMergedSceneNode->attachObject(mClusterizedEntities); 152 155 … … 157 160 Ogre::MaterialPtr materialPtr1 = Ogre::MaterialManager::getSingleton().create("textureAtlasMaterial", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 158 161 materialPtr1->getTechnique(0)->getPass(0)->setDiffuse( 1.0, 1.0, 1.0, 1.0); 159 //materialPtr1->getTechnique(0)->getPass(0)->setAlphaRejectSettings(Ogre::CMPF_GREATER_EQUAL, 10);162 materialPtr1->getTechnique(0)->getPass(0)->setAlphaRejectSettings(Ogre::CMPF_GREATER_EQUAL, 10); 160 163 materialPtr1->getTechnique(0)->getPass(0)->createTextureUnitState("transparent.png"); 161 164 materialPtr1->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureFiltering(Ogre::FO_NONE, Ogre::FO_NONE, Ogre::FO_NONE); 162 165 materialPtr1->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureAddressingMode(Ogre::TextureUnitState::TAM_CLAMP); 163 materialPtr1->load();164 166 mTextureAtlas->setMaterial(materialPtr1.getPointer()); 165 167 mTextureAtlas->setCorners(-1.0, 1.0, 1.0, -1.0); 166 168 167 169 mClusterTexture = IMG::TexturePtr( new IMG::Texture() ); 168 mClusterTexture->create("clusterTexture", mTextureSize, mTextureSize, m TexturePixelFormat, mCamera);170 mClusterTexture->create("clusterTexture", mTextureSize, mTextureSize, mSrcPixelFormat, mCamera); 169 171 mClusterTexture->setRenderTargetListener(&mClusterTextureListener); 170 172 Ogre::MaterialPtr materialPtr = Ogre::MaterialManager::getSingleton().create("textureMaterial", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); … … 182 184 mClusterTextureListener.setEntity(mClusterizedEntities); 183 185 184 185 186 mNumTextures = mClusterizedEntities->getNumSubEntities(); 186 187 mCurrentTexture = 0; -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCEntityTextureAtlasViewMode.cpp
r745 r747 79 79 80 80 mTextureAtlas->update(); 81 mTextureAtlas->debug(); 82 std::cin.get(); 81 //mTextureAtlas->debug(); 83 82 mTextureAtlas->save(mTextureAtlasFolder, mTextureAtlasName, mDestPixelFormat); 84 83 mTextureAtlasGenerated = true; -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCManager.cpp
r745 r747 73 73 mLeaves = new Leaves(); 74 74 BBC::EntityPtr entityLeaves(new BBC::Entity); 75 BBC::MeshPtr meshLeaves(new BBC::Mesh(this->loadMesh(mSampleConfigFile->getEntitiesFolder(), mSampleConfigFile->getEntitiesMesh PrefixName() + ".mesh")) );75 BBC::MeshPtr meshLeaves(new BBC::Mesh(this->loadMesh(mSampleConfigFile->getEntitiesFolder(), mSampleConfigFile->getEntitiesMeshName())) ); 76 76 entityLeaves->setMesh(meshLeaves); 77 77 mLeaves->setEntity(entityLeaves); … … 114 114 } 115 115 116 entity->getSubEntity(numSerializedEntities)->setMaterialName(mSampleConfigFile->getEntityDistributionMergedMaterial PrefixName());116 entity->getSubEntity(numSerializedEntities)->setMaterialName(mSampleConfigFile->getEntityDistributionMergedMaterialName()); 117 117 numSerializedEntities++; 118 118 } … … 124 124 mOgreMeshSerializer->setEntity(entity); 125 125 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityClustersFolder() + 126 mSampleConfigFile->getEntityClusters MeshPrefixName() + "Splitted.mesh", false, false);126 mSampleConfigFile->getEntityClustersSplittedMeshName(), false, false); 127 127 128 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entity->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntit iesMeshPrefixName() + "Splitted.mesh");128 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entity->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntityDistributionSplittedMeshName()); 129 129 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entity->getMesh().get(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntitiesMeshPrefixName() + "Splitted.mesh" + ".xml"); 130 130 } … … 134 134 { 135 135 entity->mergeSubEntities(); 136 entity->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityDistributionMergedMaterial PrefixName());136 entity->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityDistributionMergedMaterialName()); 137 137 138 138 mOgreMeshSerializer->setEntity(entity); 139 139 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityClustersFolder() + 140 mSampleConfigFile->getEntityClustersMe shPrefixName() + "Merged.mesh", false, false);141 142 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh((Ogre::Mesh*)entity->getMesh().get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntit iesMeshPrefixName() + "Merged.mesh");140 mSampleConfigFile->getEntityClustersMergedMeshName(), false, false); 141 142 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh((Ogre::Mesh*)entity->getMesh().get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntityClustersMergedMeshName()); 143 143 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entity->getMesh(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntitiesMeshPrefixName() + "Merged.mesh" + ".xml"); 144 144 } … … 149 149 TiXmlDocument *document = mLeafDistributionSerializer->create( 150 150 mSampleConfigFile->getEntityDistributionFolder() + 151 mSampleConfigFile->getEntityDistributionXML PrefixName() + ".xml");151 mSampleConfigFile->getEntityDistributionXMLName()); 152 152 mLeafDistributionSerializer->setLeafDistribution(mLeaves->getDistribution()); 153 153 mLeafDistributionSerializer->writeLeafDistribution(document); … … 159 159 TiXmlDocument *document = mLeafDistributionSerializer->load( 160 160 mSampleConfigFile->getEntityDistributionFolder() + 161 mSampleConfigFile->getEntityDistributionXML PrefixName() + ".xml");161 mSampleConfigFile->getEntityDistributionXMLName()); 162 162 mLeafDistributionSerializer->setLeafDistribution(mLeaves->getDistribution()); 163 163 mLeafDistributionSerializer->getEntity()->setMesh(mLeaves->getEntity()->getMesh()); … … 167 167 BBC::EntityDistribution *entityDistribution; 168 168 169 BBC::MeshPtr pMeshLeavesSplitted(new BBC::Mesh(this->loadMesh(mSampleConfigFile->getEntitiesFolder(), mSampleConfigFile->getEntit iesMeshPrefixName() + "Splitted.mesh")));169 BBC::MeshPtr pMeshLeavesSplitted(new BBC::Mesh(this->loadMesh(mSampleConfigFile->getEntitiesFolder(), mSampleConfigFile->getEntityDistributionSplittedMeshName()))); 170 170 entity = BBC::EntityPtr(new BBC::Entity()); 171 171 entity->setMesh(pMeshLeavesSplitted); … … 205 205 { 206 206 BBC::SubEntityPtr subEntity = mLeaves->getBillboardCloud()->getEntity()->getSubEntity(iSubEntity); 207 subEntity->setMaterialName(mSampleConfigFile->getBillboardCloud BillboardGroupMaterialPrefixName());207 subEntity->setMaterialName(mSampleConfigFile->getBillboardCloudGroupedMaterialName()); 208 208 } 209 209 mOgreMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntity()); … … 211 211 Ogre::LogManager::getSingleton().logMessage("Num.SubEntities:" + Ogre::StringConverter::toString(mLeaves->getBillboardCloud()->getEntity()->getNumSubEntities())); 212 212 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 213 mSampleConfigFile->getBillboardCloud MeshPrefixName() + "Grouped.mesh",false, false);214 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloud MeshPrefixName() + "Grouped.mesh");215 OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloud MeshPrefixName() + "Grouped.mesh.xml");213 mSampleConfigFile->getBillboardCloudGroupedMeshName(),false, false); 214 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudGroupedMeshName()); 215 OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudGroupedMeshName() + ".xml"); 216 216 } 217 217 … … 222 222 { 223 223 BBC::SubEntityPtr subEntity = mLeaves->getBillboardCloud()->getEntity()->getSubEntity(iSubEntity); 224 subEntity->setMaterialName(mSampleConfigFile->getBillboardCloud BillboardMaterialPrefixName());224 subEntity->setMaterialName(mSampleConfigFile->getBillboardCloudSplittedMaterialName()); 225 225 } 226 226 … … 230 230 231 231 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 232 mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Splitted.mesh",false, false); 233 234 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Splitted.mesh"); 235 236 OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Splitted.mesh.xml"); 232 mSampleConfigFile->getBillboardCloudSplittedMeshName(),false, false); 233 234 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudSplittedMeshName()); 235 OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudSplittedMeshName() + ".xml"); 237 236 } 238 237 … … 242 241 { 243 242 BBC::SubEntityPtr subEntity = mLeaves->getBillboardCloud()->getEntity()->getSubEntity(iSubEntity); 244 subEntity->setMaterialName(mSampleConfigFile->getBillboardCloud BillboardGroupMaterialPrefixName());243 subEntity->setMaterialName(mSampleConfigFile->getBillboardCloudGroupedMaterialName()); 245 244 } 246 245 mOgreMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntity()); … … 248 247 Ogre::LogManager::getSingleton().logMessage("Num.SubEntities:" + Ogre::StringConverter::toString(mLeaves->getBillboardCloud()->getEntity()->getNumSubEntities())); 249 248 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 250 mSampleConfigFile->getBillboardCloudMe shPrefixName() + "Merged.mesh",false, false);251 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMe shPrefixName() + "Merged.mesh");252 OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMe shPrefixName() + "Merged.mesh.xml");249 mSampleConfigFile->getBillboardCloudMergedMeshName(),false, false); 250 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMergedMeshName()); 251 OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMergedMeshName() + ".xml"); 253 252 } 254 253 … … 257 256 TiXmlDocument *document2 = mBillboardCloudSerializer->create( 258 257 mSampleConfigFile->getBillboardCloudFolder() + 259 mSampleConfigFile->getBillboardCloud XMLPrefixName() + ".xml");258 mSampleConfigFile->getBillboardCloudSplittedXMLName()); 260 259 mBillboardCloudSerializer->setBillboardCloud(mLeaves->getBillboardCloud()); 261 260 mBillboardCloudSerializer->writeBillboardCloud(document2, false); … … 267 266 TiXmlDocument *document2 = mBillboardCloudSerializer->create( 268 267 mSampleConfigFile->getBillboardCloudFolder() + 269 mSampleConfigFile->getBillboardCloud XMLPrefixName() + "Grouped.xml");268 mSampleConfigFile->getBillboardCloudGroupedXMLName()); 270 269 mBillboardCloudSerializer->setBillboardCloud(mLeaves->getBillboardCloud()); 271 270 mBillboardCloudSerializer->writeBillboardCloud(document2, true); … … 277 276 TiXmlDocument *document2 = mBillboardCloudSerializer->create( 278 277 mSampleConfigFile->getBillboardCloudFolder() + 279 mSampleConfigFile->getBillboardCloud XMLPrefixName() + "Merged.xml");278 mSampleConfigFile->getBillboardCloudMergedXMLName()); 280 279 mBillboardCloudSerializer->setBillboardCloud(mLeaves->getBillboardCloud()); 281 280 mBillboardCloudSerializer->writeBillboardCloud(document2, true); … … 287 286 TiXmlDocument *document = mBillboardCloudSerializer->load( 288 287 mSampleConfigFile->getBillboardCloudFolder() + 289 mSampleConfigFile->getBillboardCloud XMLPrefixName() + ".xml");288 mSampleConfigFile->getBillboardCloudSplittedXMLName()); 290 289 291 290 mBillboardCloudSerializer->setBillboardCloud(mLeaves->getBillboardCloud()); … … 297 296 TiXmlDocument *document = mBillboardCloudSerializer->load( 298 297 mSampleConfigFile->getBillboardCloudFolder() + 299 mSampleConfigFile->getBillboardCloud XMLPrefixName() + "Grouped.xml");298 mSampleConfigFile->getBillboardCloudGroupedXMLName()); 300 299 301 300 mBillboardCloudSerializer->setBillboardCloud(mLeaves->getBillboardCloud()); … … 307 306 TiXmlDocument *document = mBillboardCloudSerializer->load( 308 307 mSampleConfigFile->getBillboardCloudFolder() + 309 mSampleConfigFile->getBillboardCloud XMLPrefixName() + "Merged.xml");308 mSampleConfigFile->getBillboardCloudMergedXMLName()); 310 309 311 310 mBillboardCloudSerializer->setBillboardCloud(mLeaves->getBillboardCloud()); … … 330 329 { 331 330 BBC::EntityPtr entityClusterized = entityCluster->getEntity(); 332 entityClusterized->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityClustersSplittedMaterial PrefixName());331 entityClusterized->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityClustersSplittedMaterialName()); 333 332 mOgreMeshSerializer->setEntity(entityClusterized); 334 333 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityDistributionFolder() + 335 mSampleConfigFile->getEntityClusters MeshPrefixName() +334 mSampleConfigFile->getEntityClustersSplittedMeshName() + 336 335 Ogre::StringConverter::toString(numSerializedBillboards) + ".mesh", !(mSampleConfigFile->getEntityClustersSplittedClusters()), false); 337 336 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entityClusterized->getMesh()->get(), 338 337 mSampleConfigFile->getEntityClustersFolder() + 339 mSampleConfigFile->getEntityClusters MeshPrefixName() +338 mSampleConfigFile->getEntityClustersSplittedMeshName() + 340 339 Ogre::StringConverter::toString(numSerializedBillboards) + ".mesh"); 341 340 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entityClusterized->getMesh(), entityClusterized->getMesh()->getName() + ".xml"); … … 360 359 { 361 360 BBC::EntityPtr entityClusterized = entityCluster->getEntity(); 362 entityClusterized->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityClustersMergedMaterial PrefixName());361 entityClusterized->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityClustersMergedMaterialName()); 363 362 BBC::SubEntityPtr subEntity = entityClusterized->getSubEntity(0); 364 363 … … 384 383 mOgreMeshSerializer->setEntity(entity); 385 384 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityClustersFolder() + 386 mSampleConfigFile->getEntityClustersMe shPrefixName() + "Merged.mesh", false, false);387 388 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entity->getMesh()->get(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntityClustersMe shPrefixName() + "Merged.mesh");385 mSampleConfigFile->getEntityClustersMergedMeshName(), false, false); 386 387 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entity->getMesh()->get(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntityClustersMergedMeshName()); 389 388 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entity->getMesh(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntityClustersMeshPrefixName() + "Merged.mesh" + ".xml"); 390 391 Ogre::LogManager::getSingleton().logMessage("Before deleting:" + mSampleConfigFile->getEntityClustersMeshPrefixName() + "Merged.mesh");392 389 } 393 390 } … … 406 403 { 407 404 BBC::EntityPtr entityLeaf = mLeaves->getDistribution()->getEntity(2); 408 entityLeaf->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntitySampleMaterial PrefixName());405 entityLeaf->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntitySampleMaterialName()); 409 406 mOgreMeshSerializer->setEntity(entityLeaf); 410 407 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityDistributionFolder() + 411 mSampleConfigFile->getEntitySampleMesh PrefixName(), false, false);412 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entityLeaf->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitySampleMesh PrefixName() + ".mesh");413 OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entityLeaf->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitySampleMesh PrefixName() + ".mesh.xml");408 mSampleConfigFile->getEntitySampleMeshName(), false, false); 409 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entityLeaf->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitySampleMeshName()); 410 OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entityLeaf->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitySampleMeshName() + ".xml"); 414 411 } 415 412 416 413 void LBBCManager::generateEntityClusters() 417 414 { 418 Ogre::LogManager::getSingleton().logMessage("EntityClustersMeshPrefixName:" + mSampleConfigFile->getEntityClustersMeshPrefixName());419 415 createEntityClusters(); 420 416 saveEntityClusters(); -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCSampleConfigFile.cpp
r745 r747 11 11 } 12 12 13 Ogre::String SampleConfigFile::getEntitySampleMaterial PrefixName()14 { 15 return getSetting("Entity Sample Material PrefixName");16 } 17 18 Ogre::String SampleConfigFile::getEntitySampleMesh PrefixName()19 { 20 return getSetting("Entity Sample Mesh PrefixName");13 Ogre::String SampleConfigFile::getEntitySampleMaterialName() 14 { 15 return getSetting("Entity Sample Material Name"); 16 } 17 18 Ogre::String SampleConfigFile::getEntitySampleMeshName() 19 { 20 return getSetting("Entity Sample Mesh Name"); 21 21 } 22 22 … … 31 31 } 32 32 33 Ogre::String SampleConfigFile::getEntityDistributionSplittedMaterialPrefixName() 34 { 35 return getSetting("Entity Distribution Splitted Material Prefix Name"); 36 } 37 38 Ogre::String SampleConfigFile::getEntityDistributionMergedMaterialPrefixName() 39 { 40 return getSetting("Entity Distribution Merged Material Prefix Name"); 33 Ogre::String SampleConfigFile::getEntityDistributionSplittedMeshName() 34 { 35 return getSetting("Entity Distribution Splitted Mesh Name"); 36 } 37 38 Ogre::String SampleConfigFile::getEntityDistributionSplittedMaterialName() 39 { 40 return getSetting("Entity Distribution Splitted Material Name"); 41 } 42 43 Ogre::String SampleConfigFile::getEntityDistributionMergedMeshName() 44 { 45 return getSetting("Entity Distribution Merged Mesh Name"); 46 } 47 48 Ogre::String SampleConfigFile::getEntityDistributionMergedMaterialName() 49 { 50 return getSetting("Entity Distribution Merged Material Name"); 41 51 } 42 52 … … 46 56 } 47 57 48 Ogre::String SampleConfigFile::getEntityDistributionXML PrefixName()49 { 50 return getSetting("Entity Distribution XML PrefixName");58 Ogre::String SampleConfigFile::getEntityDistributionXMLName() 59 { 60 return getSetting("Entity Distribution XML Name"); 51 61 } 52 62 … … 57 67 58 68 59 Ogre::String SampleConfigFile::getEntitiesMesh PrefixName()60 { 61 return getSetting("Entities Mesh PrefixName");62 } 63 64 Ogre::String SampleConfigFile::getBillboardCloud XMLPrefixName()65 { 66 return getSetting("Billboard Cloud XML PrefixName");69 Ogre::String SampleConfigFile::getEntitiesMeshName() 70 { 71 return getSetting("Entities Mesh Name"); 72 } 73 74 Ogre::String SampleConfigFile::getBillboardCloudGroupedXMLName() 75 { 76 return getSetting("Billboard Cloud Grouped XML Name"); 67 77 } 68 78 … … 127 137 } 128 138 129 Ogre::String SampleConfigFile::getEntityClustersMeshPrefixName() 130 { 131 return getSetting("Entity Clusters Mesh Prefix Name"); 132 } 133 134 Ogre::String SampleConfigFile::getEntityClustersMergedMaterialPrefixName() 135 { 136 return getSetting("Entity Clusters Merged Material Prefix Name"); 137 } 138 139 Ogre::String SampleConfigFile::getEntityClustersSplittedMaterialPrefixName() 140 { 141 return getSetting("Entity Clusters Splitted Material Prefix Name"); 139 Ogre::String SampleConfigFile::getEntityClustersMergedMeshName() 140 { 141 return getSetting("Entity Clusters Merged Mesh Name"); 142 } 143 144 Ogre::String SampleConfigFile::getEntityClustersSplittedMeshName() 145 { 146 return getSetting("Entity Clusters Splitted Mesh Name"); 147 } 148 149 Ogre::String SampleConfigFile::getEntityClustersMergedMaterialName() 150 { 151 return getSetting("Entity Clusters Merged Material Name"); 152 } 153 154 Ogre::String SampleConfigFile::getEntityClustersSplittedMaterialName() 155 { 156 return getSetting("Entity Clusters Splitted Material Name"); 142 157 } 143 158 … … 147 162 } 148 163 149 Ogre::String SampleConfigFile::getBillboardCloudMeshPrefixName() 150 { 151 return getSetting("Billboard Cloud Mesh Prefix Name"); 152 } 153 154 Ogre::String SampleConfigFile::getBillboardCloudBillboardMaterialPrefixName() 155 { 156 return getSetting("Billboard Cloud Billboard Material Prefix Name"); 157 } 158 159 Ogre::String SampleConfigFile::getBillboardCloudBillboardGroupMaterialPrefixName() 160 { 161 return getSetting("Billboard Cloud Billboard Group Material Prefix Name"); 162 } 163 164 Ogre::String SampleConfigFile::getBillboardCloudBillboardTextureUnit0PrefixName() 165 { 166 return getSetting("Billboard Cloud Billboard Texture Unit 0 Prefix Name"); 167 } 168 169 Ogre::String SampleConfigFile::getBillboardCloudBillboardGroupTextureUnit0PrefixName() 170 { 171 return getSetting("Billboard Cloud Billboard Group Texture Unit 0 Prefix Name"); 172 } 173 174 Ogre::String SampleConfigFile::getBillboardCloudIndirectBillboardGroupTextureAtlasPrefixName() 175 { 176 return getSetting("Billboard Cloud Indirect Billboard Group Texture Atlas Prefix Name"); 164 Ogre::String SampleConfigFile::getBillboardCloudMergedMeshName() 165 { 166 return getSetting("Billboard Cloud Merged Mesh Name"); 167 } 168 169 Ogre::String SampleConfigFile::getBillboardCloudGroupedMeshName() 170 { 171 return getSetting("Billboard Cloud Grouped Mesh Name"); 172 } 173 174 Ogre::String SampleConfigFile::getBillboardCloudSplittedMeshName() 175 { 176 return getSetting("Billboard Cloud Splitted Mesh Name"); 177 } 178 179 Ogre::String SampleConfigFile::getBillboardCloudGroupedMaterialName() 180 { 181 return getSetting("Billboard Cloud Grouped Material Name"); 182 } 183 184 Ogre::String SampleConfigFile::getBillboardCloudMergedMaterialName() 185 { 186 return getSetting("Billboard Cloud Merged Material Name"); 187 } 188 189 Ogre::String SampleConfigFile::getBillboardCloudSplittedMaterialName() 190 { 191 return getSetting("Billboard Cloud Splitted Material Name"); 192 } 193 194 Ogre::String SampleConfigFile::getBillboardCloudMergedTextureUnit0Name() 195 { 196 return getSetting("Billboard Cloud Merged Texture Unit 0 Name"); 197 } 198 199 Ogre::String SampleConfigFile::getBillboardCloudGroupedTextureUnit0Name() 200 { 201 return getSetting("Billboard Cloud Grouped Texture Unit 0 Name"); 202 } 203 204 Ogre::String SampleConfigFile::getBillboardCloudSplittedTextureUnit0Name() 205 { 206 return getSetting("Billboard Cloud Splitted Texture Unit 0 Name"); 207 } 208 209 Ogre::String SampleConfigFile::getBillboardCloudIndirectBillboardGroupTextureAtlasName() 210 { 211 return getSetting("Billboard Cloud Indirect Billboard Group Texture Atlas Name"); 177 212 } 178 213 … … 232 267 } 233 268 234 Ogre::String SampleConfigFile::getBillboardCloudDiffuseColorEntityTexture PrefixName()235 { 236 return getSetting("Billboard Cloud Diffuse Color Entity Texture PrefixName");237 } 238 239 Ogre::String SampleConfigFile::getBillboardCloudDiffuseColorEntityTextureAtlas PrefixName()240 { 241 return getSetting("Billboard Cloud Diffuse Color Entity Texture Atlas PrefixName");269 Ogre::String SampleConfigFile::getBillboardCloudDiffuseColorEntityTextureName() 270 { 271 return getSetting("Billboard Cloud Diffuse Color Entity Texture Name"); 272 } 273 274 Ogre::String SampleConfigFile::getBillboardCloudDiffuseColorEntityTextureAtlasName() 275 { 276 return getSetting("Billboard Cloud Diffuse Color Entity Texture Atlas Name"); 242 277 } 243 278 … … 257 292 } 258 293 259 Ogre::String SampleConfigFile::getBillboardCloudDiffuseColorMergedBillboardsTextureAtlas PrefixName()260 { 261 return getSetting("Billboard Cloud Diffuse Color Merged Billboards Texture Atlas PrefixName");294 Ogre::String SampleConfigFile::getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasName() 295 { 296 return getSetting("Billboard Cloud Diffuse Color Merged Billboards Texture Atlas Name"); 262 297 } 263 298 … … 282 317 } 283 318 284 Ogre::String SampleConfigFile::getBillboardCloudIndirectMergedBillboardsTextureAtlasPrefixName() 285 { 286 return getSetting("Billboard Cloud Indirect Merged Billboards Texture Atlas Prefix Name"); 319 Ogre::String SampleConfigFile::getBillboardCloudIndirectMergedBillboardsTextureAtlasName() 320 { 321 return getSetting("Billboard Cloud Indirect Merged Billboards Texture Atlas Name"); 322 } 323 324 Ogre::String SampleConfigFile::getBillboardCloudSplittedXMLName() 325 { 326 return getSetting("Billboard Cloud Splitted XML Name"); 327 } 328 329 Ogre::String SampleConfigFile::getBillboardCloudMergedXMLName() 330 { 331 return getSetting("Billboard Cloud Merged XML Name"); 287 332 } 288 333
Note: See TracChangeset
for help on using the changeset viewer.