Changeset 6911 in orxonox.OLD for branches/current_cd/src/world_entities
- Timestamp:
- Jan 31, 2006, 7:12:41 PM (19 years ago)
- Location:
- branches/current_cd/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/current_cd/src/world_entities/world_entity.cc
r6909 r6911 204 204 * @param depth the depth to calculate 205 205 */ 206 bool WorldEntity::buildObbTree(unsigned int depth) 207 { 208 <<<<<<< .working 206 bool WorldEntity::buildObbTree(int depth) 207 { 209 208 if (this->obbTree) 210 209 delete this->obbTree; … … 212 211 if (this->models[0] != NULL) 213 212 { 214 ======= 215 if( this->model != NULL) { 216 >>>>>>> .merge-right.r6905 217 PRINTF(4)("creating obb tree\n"); 218 <<<<<<< .working 219 220 221 this->obbTree = new OBBTree(depth, (sVec3D*)this->models[0]->getVertexArray(), this->models[0]->getVertexCount()); 222 ======= 223 //this->obbTree = new OBBTree(depth, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount()); 224 this->obbTree = new OBBTree(depth, *model->getModelInfo()); 225 >>>>>>> .merge-right.r6905 213 this->obbTree = new OBBTree(depth, models[0]->getModelInfo()); 226 214 return true; 227 215 } … … 266 254 * Implement behaviour like damage application or other miscellaneous collision stuff in this function 267 255 */ 268 void WorldEntity::collidesWith( const WorldEntity& entity, const Vector& location) const256 void WorldEntity::collidesWith(WorldEntity* entity, const Vector& location) 269 257 { 270 258 /** -
branches/current_cd/src/world_entities/world_entity.h
r6910 r6911 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; }; 41 bool buildObbTree(int depth); 41 42 42 43 inline void loadMD2Texture(const char* fileName) { this->md2TextureFileName = fileName; } 43 44 bool buildObbTree(unsigned int depth);45 /** @returns a reference to the obb tree of this worldentity */46 BVTree* getOBBTree() const { return this->obbTree; };47 44 48 45 /** @param visibility if the Entity should be visible (been draw) */ … … 51 48 inline bool isVisible() const { return this->bVisible; }; 52 49 53 54 55 50 virtual void postSpawn (); 56 51 virtual void leftWorld (); 57 52 58 53 virtual void tick (float time); 59 60 54 virtual void draw () const; 61 55 62 63 56 virtual void collidesWith (WorldEntity* entity, const Vector& location); 64 65 57 void drawBVTree(unsigned int depth, int drawMode) const; 66 58 /** @returns a reference to the obb tree of this worldentity */ 67 inline const BVTree* getOBBTree() const { return this->obbTree; }; 68 59 inline BVTree* getOBBTree() const { return this->obbTree; }; 69 60 70 61
Note: See TracChangeset
for help on using the changeset viewer.