Changeset 950 for GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src
- Timestamp:
- 05/11/06 15:39:05 (19 years ago)
- Location:
- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/BBCEntity.cpp
r936 r950 350 350 351 351 Ogre::ColourValue colour; 352 colour.setAsARGB((Ogre::ARGB)(*pSrcARGB)); 352 //colour.setAsARGB((Ogre::ARGB)(*pSrcARGB) & 0xFF); 353 colour.setAsARGB((Ogre::ARGB)(pSrcARGB[0])); 353 354 354 355 if (!mergeSubMeshes) -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IBRBillboardCloudTreeApplication.cpp
r900 r950 48 48 mLBBCManager->generateBillboardCloud(); 49 49 } 50 50 51 51 mLBBCManager->shutdown(); 52 52 delete mLBBCManager; 53 53 54 mOgreBase->shutdown(); 54 55 delete mOgreBase; 56 55 57 //---------------------------------------------------------------------------- 56 58 this->setup(true,"IBR Billboard Cloud Tree Generator", 512, 512, false); -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCManager.cpp
r909 r950 13 13 mBillboardCloudUVMapper = new BBC::BillboardCloudUVMapper(); 14 14 mOgreMeshSerializer = new BBC::OgreMeshSerializer(); 15 mColladaMeshSerializer = new BBC::ColladaMeshSerializer(); 15 16 } 16 17 17 18 LBBCManager::~LBBCManager() 18 19 { 20 if (mColladaMeshSerializer) 21 { 22 delete mColladaMeshSerializer; 23 } 19 24 if (mOgreMeshSerializer) 20 25 { … … 204 209 subEntity->setMaterialName(mSampleConfigFile->getBillboardCloudGroupedIndirectTexturingMaterialName() + Ogre::StringConverter::toString(iSubEntity)); 205 210 } 206 mOgreMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntityGrouped());207 211 208 212 Ogre::LogManager::getSingleton().logMessage("Num.SubEntities:" + Ogre::StringConverter::toString(mLeaves->getBillboardCloud()->getEntityGrouped()->getNumSubEntities())); 213 214 mOgreMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntityGrouped()); 209 215 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 210 mSampleConfigFile->getBillboardCloudGroupedIndirectTexturingMeshName(),false, false); 216 mSampleConfigFile->getBillboardCloudGroupedIndirectTexturingMeshName(), false, false); 217 211 218 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntityGrouped()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudGroupedIndirectTexturingMeshName()); 212 219 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntityGrouped()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudGroupedIndirectTexturingMeshName() + ".xml"); 220 221 mColladaMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntityGrouped()); 222 mColladaMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 223 mSampleConfigFile->getBillboardCloudGroupedIndirectTexturingMeshName(), false, false); 213 224 } 214 225 … … 222 233 } 223 234 235 Ogre::LogManager::getSingleton().logMessage("Num.SubEntities:" + Ogre::StringConverter::toString(mLeaves->getBillboardCloud()->getEntity()->getNumSubEntities())); 236 224 237 mOgreMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntity()); 225 226 Ogre::LogManager::getSingleton().logMessage("Num.SubEntities:" + Ogre::StringConverter::toString(mLeaves->getBillboardCloud()->getEntity()->getNumSubEntities()));227 228 238 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 229 239 mSampleConfigFile->getBillboardCloudSplittedMeshName(),false, false); … … 231 241 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudSplittedMeshName()); 232 242 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudSplittedMeshName() + ".xml"); 243 244 mColladaMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntity()); 245 mColladaMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 246 mSampleConfigFile->getBillboardCloudSplittedMeshName(),false, false); 233 247 } 234 248 … … 240 254 subEntity->setMaterialName(mSampleConfigFile->getBillboardCloudGroupedDiffuseColorMaterialName() + Ogre::StringConverter::toString(iSubEntity)); 241 255 } 242 mOgreMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntityGrouped());243 256 244 257 Ogre::LogManager::getSingleton().logMessage("Num.SubEntities:" + Ogre::StringConverter::toString(mLeaves->getBillboardCloud()->getEntityGrouped()->getNumSubEntities())); 258 259 mOgreMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntityGrouped()); 245 260 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 246 261 mSampleConfigFile->getBillboardCloudGroupedDiffuseColorMeshName(),false, false); 262 247 263 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntityGrouped()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudGroupedDiffuseColorMeshName()); 248 264 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntityGrouped()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudGroupedDiffuseColorMeshName() + ".xml"); 265 266 mColladaMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntityGrouped()); 267 mColladaMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 268 mSampleConfigFile->getBillboardCloudGroupedDiffuseColorMeshName(),false, false); 249 269 } 250 270 … … 331 351 BBC::EntityPtr entityClusterized = entityCluster->getEntity(); 332 352 entityClusterized->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityClustersSplittedMaterialName()); 353 333 354 mOgreMeshSerializer->setEntity(entityClusterized); 334 355 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityDistributionFolder() + 335 356 mSampleConfigFile->getEntityClustersSplittedMeshName() + 336 357 Ogre::StringConverter::toString(numSerializedBillboards) + ".mesh", !(mSampleConfigFile->getEntityClustersSplittedClusters()), false); 358 337 359 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entityClusterized->getMesh()->get(), 338 360 mSampleConfigFile->getEntityClustersFolder() + … … 341 363 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entityClusterized->getMesh(), entityClusterized->getMesh()->getName() + ".xml"); 342 364 365 //mColladaMeshSerializer->setEntity(entityClusterized); 366 //mColladaMeshSerializer->exportMesh(mSampleConfigFile->getEntityDistributionFolder() + 367 // mSampleConfigFile->getEntityClustersSplittedMeshName() + 368 // Ogre::StringConverter::toString(numSerializedBillboards) + ".mesh", !(mSampleConfigFile->getEntityClustersSplittedClusters()), false); 369 343 370 numSerializedBillboards++; 344 371 } … … 388 415 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entity->getMesh()->get(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntityClustersGroupedMeshName()); 389 416 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entity->getMesh(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntityClustersMeshPrefixName() + "Merged.mesh" + ".xml"); 417 418 //mColladaMeshSerializer->setEntity(entity); 419 //mColladaMeshSerializer->exportMesh(mSampleConfigFile->getEntityClustersFolder() + 420 // mSampleConfigFile->getEntityClustersGroupedMeshName(), false, false); 390 421 } 391 422 } … … 405 436 BBC::EntityPtr entityLeaf = mLeaves->getDistribution()->getEntity(2); 406 437 entityLeaf->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntitySampleMaterialName()); 438 407 439 mOgreMeshSerializer->setEntity(entityLeaf); 408 440 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityDistributionFolder() + 409 441 mSampleConfigFile->getEntitySampleMeshName(), false, false); 442 410 443 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entityLeaf->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitySampleMeshName()); 411 444 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entityLeaf->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitySampleMeshName() + ".xml"); 445 446 mColladaMeshSerializer->setEntity(entityLeaf); 447 mColladaMeshSerializer->exportMesh(mSampleConfigFile->getEntityDistributionFolder() + 448 mSampleConfigFile->getEntitySampleMeshName(), false, false); 412 449 } 413 450 … … 452 489 mLeaves->getBillboardCloud()->generateBillboardCloudGroups(); 453 490 saveBillboardCloudGroupedIndirectTexturing(); 454 saveBillboardCloudGroupedIndirectTexturingXML(); 491 saveBillboardCloudGroupedIndirectTexturingXML(); 455 492 } 456 493
Note: See TracChangeset
for help on using the changeset viewer.