Changeset 7005 in orxonox.OLD for branches/current_cd/src/world_entities
- Timestamp:
- Feb 3, 2006, 9:34:57 AM (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
r6911 r7005 211 211 if (this->models[0] != NULL) 212 212 { 213 this->obbTree = new OBBTree(depth, models[0]->getModelInfo() );213 this->obbTree = new OBBTree(depth, models[0]->getModelInfo(), this); 214 214 return true; 215 215 } … … 461 461 * @param drawMode the mode to draw this entity under 462 462 */ 463 void WorldEntity::drawBVTree( unsignedint depth, int drawMode) const463 void WorldEntity::drawBVTree(int depth, int drawMode) const 464 464 { 465 465 glMatrixMode(GL_MODELVIEW); … … 473 473 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 474 474 475 475 476 if (this->obbTree) 476 477 this->obbTree->drawBV(depth, drawMode); 478 479 477 480 glPopMatrix(); 478 481 } -
branches/current_cd/src/world_entities/world_entity.h
r6911 r7005 2 2 * @file world_entity.h 3 3 * Definition of the basic WorldEntity 4 */4 */ 5 5 6 6 #ifndef _WORLD_ENTITY_H … … 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);42 41 43 42 inline void loadMD2Texture(const char* fileName) { this->md2TextureFileName = fileName; } … … 54 53 virtual void draw () const; 55 54 55 bool buildObbTree(int depth); 56 56 virtual void collidesWith (WorldEntity* entity, const Vector& location); 57 void drawBVTree(unsigned int depth, int drawMode) const;58 57 /** @returns a reference to the obb tree of this worldentity */ 59 58 inline BVTree* getOBBTree() const { return this->obbTree; }; 60 59 void drawBVTree(int depth, int drawMode) const; 61 60 62 61 void debugWE() { this->debugEntity(); }
Note: See TracChangeset
for help on using the changeset viewer.