Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6909 in orxonox.OLD for branches/current_cd/src/world_entities


Ignore:
Timestamp:
Jan 31, 2006, 6:02:16 PM (19 years ago)
Author:
patrick
Message:

current_cd: merged with the current version of the trunk

Location:
branches/current_cd/src/world_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/current_cd/src/world_entities/environment.cc

    r6512 r6909  
    3737  this->init();
    3838  this->loadModel("models/ships/bolido.obj");
     39//   if(this->obbTree == NULL)
     40//     this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
    3941}
    4042
  • branches/current_cd/src/world_entities/test_entity.cc

    r6512 r6909  
    3838{
    3939  this->init();
     40  this->md2Model = new MD2Model("models/droidika.md2", "models/droideka.pcx");
    4041}
    4142
     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);
    4247
    4348
  • branches/current_cd/src/world_entities/world_entity.cc

    r6815 r6909  
    206206bool WorldEntity::buildObbTree(unsigned int depth)
    207207{
     208<<<<<<< .working
    208209  if (this->obbTree)
    209210    delete this->obbTree;
     
    211212  if (this->models[0] != NULL)
    212213  {
     214=======
     215  if( this->model != NULL) {
     216>>>>>>> .merge-right.r6905
    213217    PRINTF(4)("creating obb tree\n");
     218<<<<<<< .working
    214219
    215220
    216221    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
    217226    return true;
    218227  }
    219228  else
    220229  {
    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");
    222231    this->obbTree = NULL;
    223232    return false;
     
    257266 * Implement behaviour like damage application or other miscellaneous collision stuff in this function
    258267 */
    259 void WorldEntity::collidesWith(WorldEntity* entity, const Vector& location)
     268void WorldEntity::collidesWith(const WorldEntity& entity, const Vector& location) const
    260269{
    261270  /**
  • branches/current_cd/src/world_entities/world_entity.h

    r6700 r6909  
    6060  virtual void draw () const;
    6161
     62
    6263  virtual void collidesWith (WorldEntity* entity, const Vector& location);
     64
    6365  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
    6469
    6570
     
    7883  void toList(OM_LIST list);
    7984
     85<<<<<<< .working
    8086  /** @returns a Reference to the objectListNumber to set. */
    8187  OM_LIST& getOMListNumber() { return this->objectListNumber; }
     
    100106  void setHealthMax(float healthMax);
    101107  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
    102113  //  CharacterAttributes*    charAttr;         //!< the character attributes of a world_entity
    103114private:
Note: See TracChangeset for help on using the changeset viewer.