Changeset 5717 in orxonox.OLD for branches/collision_detection/src/world_entities
- Timestamp:
- Nov 23, 2005, 12:31:47 AM (19 years ago)
- Location:
- branches/collision_detection/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/collision_detection/src/world_entities/world_entity.cc
r5713 r5717 104 104 } 105 105 else 106 this->model = NULL; 106 { 107 this->model = NULL; 108 this->obbTree = NULL; 109 } 107 110 } 108 111 … … 113 116 bool WorldEntity::buildObbTree(unsigned int depth) 114 117 { 115 if (this->obbTree) 116 delete this->obbTree; 117 118 if (this->model != NULL) 119 { 118 if( this->model != NULL) { 120 119 PRINTF(4)("creating obb tree\n"); 121 122 123 120 //this->obbTree = new OBBTree(depth, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount()); 124 121 this->obbTree = new OBBTree(depth, *model->getModelInfo()); … … 127 124 else 128 125 { 129 PRINTF( 2)("could not create obb-tree, because no model was loaded yet\n");126 PRINTF(1)("could not create obb-tree, because no model was loaded yet\n"); 130 127 this->obbTree = NULL; 131 128 return false; -
branches/collision_detection/src/world_entities/world_entity.h
r5511 r5717 47 47 void drawBVTree(unsigned int depth, int drawMode) const; 48 48 /** @returns a reference to the obb tree of this worldentity */ 49 BVTree* getOBBTree() const { return this->obbTree; };49 inline const BVTree* getOBBTree() const { return this->obbTree; }; 50 50 51 51 /* @returns the Count of Faces on this WorldEntity */ … … 59 59 protected: 60 60 Model* model; //!< The model that should be loaded for this entity. 61 BVTree*obbTree; //!< this is the obb tree reference needed for collision detection61 const BVTree* obbTree; //!< this is the obb tree reference needed for collision detection 62 62 // CharacterAttributes* charAttr; //!< the character attributes of a world_entity 63 63
Note: See TracChangeset
for help on using the changeset viewer.