Changeset 4682 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Jun 24, 2005, 12:50:34 AM (20 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/environment.cc
r4679 r4682 22 22 #include "vector.h" 23 23 #include "objModel.h" 24 #include "obb_tree.h" 24 25 25 26 using namespace std; … … 33 34 this->setClassID(CL_ENVIRONMENT, "Environment"); 34 35 this->model = (Model*)ResourceManager::getInstance()->load("models/reaplow.obj", OBJ, RP_CAMPAIGN); 36 37 this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount()); 35 38 } 36 39 -
orxonox/trunk/src/world_entities/test_entity.cc
r4679 r4682 21 21 #include "model.h" 22 22 #include "md2Model.h" 23 #include "obb_tree.h" 23 24 24 25 using namespace std; … … 31 32 32 33 this->md2Model = new MD2Model("models/tris.md2", "models/tris.pcx"); 34 this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices); 33 35 this->md2Model->debug(); 34 36 } … … 72 74 this->getAbsDir().matrix (matrix); 73 75 glMultMatrixf((float*)matrix); 74 glScalef(0.2, 0.2, 0.2);75 76 this->md2Model->draw(); 76 77 -
orxonox/trunk/src/world_entities/world_entity.cc
r4680 r4682 21 21 #include "list.h" 22 22 #include "vector.h" 23 #include "obb_tree.h" 23 24 24 25 using namespace std; … … 32 33 33 34 this->model = NULL; 35 this->obbTree = NULL; 34 36 35 37 if (root) -
orxonox/trunk/src/world_entities/world_entity.h
r4680 r4682 12 12 #include "factory.h" 13 13 #include "load_param.h" 14 #include "bv_tree.h" 14 15 #include "model.h" 15 16 16 //class CollisionCluster; 17 18 17 19 class CharacterAttributes; 18 20 class SoundEngine; 19 21 class SoundBuffer; 20 22 class SoundSource; 23 21 24 22 25 //! Basic class from which all interactive stuff in the world is derived from … … 52 55 void processDraw (); 53 56 virtual void draw (); 57 inline void drawBVTree(int depth, int drawMode) { this->obbTree->drawBV(depth, drawMode); } 54 58 virtual void tick (float time); 55 59 56 60 protected: 57 Model* model; //!< The model that should be loaded for this entity.61 Model* model; //!< The model that should be loaded for this entity. 58 62 CharacterAttributes* charAttr; //!< the character attributes of a world_entity 63 BVTree* obbTree; //!< this is the obb tree reference needed for collision detection 59 64 60 65 private:
Note: See TracChangeset
for help on using the changeset viewer.