Changeset 6909 in orxonox.OLD for branches/current_cd/src/world_entities
- Timestamp:
- Jan 31, 2006, 6:02:16 PM (19 years ago)
- Location:
- branches/current_cd/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/current_cd/src/world_entities/environment.cc
r6512 r6909 37 37 this->init(); 38 38 this->loadModel("models/ships/bolido.obj"); 39 // if(this->obbTree == NULL) 40 // this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount()); 39 41 } 40 42 -
branches/current_cd/src/world_entities/test_entity.cc
r6512 r6909 38 38 { 39 39 this->init(); 40 this->md2Model = new MD2Model("models/droidika.md2", "models/droideka.pcx"); 40 41 } 41 42 43 44 // this->md2Model = new MD2Model("models/tris.md2", "models/tris.pcx"); 45 // this->md2Model = new MD2Model("models/goblin.md2", "maps/goblin.bmp"); 46 // this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices); 42 47 43 48 -
branches/current_cd/src/world_entities/world_entity.cc
r6815 r6909 206 206 bool WorldEntity::buildObbTree(unsigned int depth) 207 207 { 208 <<<<<<< .working 208 209 if (this->obbTree) 209 210 delete this->obbTree; … … 211 212 if (this->models[0] != NULL) 212 213 { 214 ======= 215 if( this->model != NULL) { 216 >>>>>>> .merge-right.r6905 213 217 PRINTF(4)("creating obb tree\n"); 218 <<<<<<< .working 214 219 215 220 216 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 217 226 return true; 218 227 } 219 228 else 220 229 { 221 PRINTF( 2)("could not create obb-tree, because no model was loaded yet\n");230 PRINTF(1)("could not create obb-tree, because no model was loaded yet\n"); 222 231 this->obbTree = NULL; 223 232 return false; … … 257 266 * Implement behaviour like damage application or other miscellaneous collision stuff in this function 258 267 */ 259 void WorldEntity::collidesWith( WorldEntity* entity, const Vector& location)268 void WorldEntity::collidesWith(const WorldEntity& entity, const Vector& location) const 260 269 { 261 270 /** -
branches/current_cd/src/world_entities/world_entity.h
r6700 r6909 60 60 virtual void draw () const; 61 61 62 62 63 virtual void collidesWith (WorldEntity* entity, const Vector& location); 64 63 65 void drawBVTree(unsigned int depth, int drawMode) const; 66 /** @returns a reference to the obb tree of this worldentity */ 67 inline const BVTree* getOBBTree() const { return this->obbTree; }; 68 64 69 65 70 … … 78 83 void toList(OM_LIST list); 79 84 85 <<<<<<< .working 80 86 /** @returns a Reference to the objectListNumber to set. */ 81 87 OM_LIST& getOMListNumber() { return this->objectListNumber; } … … 100 106 void setHealthMax(float healthMax); 101 107 void createHealthWidget(); 108 ======= 109 protected: 110 Model* model; //!< The model that should be loaded for this entity. 111 const BVTree* obbTree; //!< this is the obb tree reference needed for collision detection 112 >>>>>>> .merge-right.r6905 102 113 // CharacterAttributes* charAttr; //!< the character attributes of a world_entity 103 114 private:
Note: See TracChangeset
for help on using the changeset viewer.