Changeset 7537 in orxonox.OLD for branches/cd/src/world_entities
- Timestamp:
- May 4, 2006, 4:35:25 PM (19 years ago)
- Location:
- branches/cd/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cd/src/world_entities/world_entity.cc
r7365 r7537 36 36 SHELL_COMMAND(model, WorldEntity, loadModel) 37 37 ->describe("sets the Model of the WorldEntity") 38 ->defaultValues("models/ships/fighter.obj", 1.0 );38 ->defaultValues("models/ships/fighter.obj", 1.0f); 39 39 40 40 SHELL_COMMAND(debugEntity, WorldEntity, debugWE); … … 118 118 * @param fileName the name of the model to load 119 119 * @param scaling the Scaling of the model 120 */ 121 void WorldEntity::loadModel(const std::string& fileName, float scaling, unsigned int modelNumber) 120 * 121 * FIXME 122 * @todo: separate the obb tree generation from the model 123 */ 124 void WorldEntity::loadModel(const std::string& fileName, float scaling, unsigned int modelNumber, unsigned int obbTreeDepth) 122 125 { 123 126 this->modelLODName = fileName; … … 154 157 155 158 if( modelNumber == 0) 156 this->buildObbTree( 4);159 this->buildObbTree(obbTreeDepth); 157 160 } 158 161 else if(fileName.find(".md2") != std::string::npos) … … 164 167 165 168 if( m != NULL) 166 this->buildObbTree( 4);169 this->buildObbTree(obbTreeDepth); 167 170 } 168 171 } … … 571 574 std::string name = getModel( 0 )->getName(); 572 575 573 if ( name.find( ResourceManager::getInstance()->getDataDir() ) == 0 ) 576 if ( name.find( ResourceManager::getInstance()->getDataDir() ) == 0 ) 574 577 { 575 578 name.erase(ResourceManager::getInstance()->getDataDir().size()); -
branches/cd/src/world_entities/world_entity.h
r7365 r7537 36 36 virtual void loadParams(const TiXmlElement* root); 37 37 38 void loadModel(const std::string& fileName, float scaling = 1.0f, unsigned int modelNumber = 0 );38 void loadModel(const std::string& fileName, float scaling = 1.0f, unsigned int modelNumber = 0, unsigned int obbTreeDepth = 4); 39 39 void setModel(Model* model, unsigned int modelNumber = 0); 40 40 Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
Note: See TracChangeset
for help on using the changeset viewer.