Changeset 5061 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Aug 17, 2005, 12:17:00 AM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/world_entity.cc
r5057 r5061 78 78 this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, &scaling); 79 79 80 PRINTF(4)("creating obb tree\n"); 81 this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount()); 80 this->buildObbTree(4); 82 81 } 83 82 else … … 85 84 } 86 85 86 /** 87 * builds the obb-tree 88 * @param depth the depth to calculate 89 */ 90 bool WorldEntity::buildObbTree(unsigned int depth) 91 { 92 if (this->obbTree) 93 delete this->obbTree; 94 95 if (this->model) 96 { 97 PRINTF(4)("creating obb tree\n"); 98 this->obbTree = new OBBTree(depth, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount()); 99 return true; 100 } 101 else 102 { 103 PRINTF(2)("could not create obb-tree, because no model was loaded yet\n"); 104 this->obbTree = NULL; 105 return false; 106 } 107 } 87 108 88 109 -
orxonox/trunk/src/world_entities/world_entity.h
r5057 r5061 34 34 void loadModel(const char* fileName) { this->loadModelWithScale(fileName, 1.0); }; 35 35 void loadModelWithScale(const char* fileName, float scaling); 36 37 bool buildObbTree(unsigned int depth); 36 38 37 39
Note: See TracChangeset
for help on using the changeset viewer.