Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4682 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
Jun 24, 2005, 12:50:34 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: now there is a possibility to render the bvtree through the world entities, the bvtree is a member of the worldentity

Location:
orxonox/trunk/src/world_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/environment.cc

    r4679 r4682  
    2222#include "vector.h"
    2323#include "objModel.h"
     24#include "obb_tree.h"
    2425
    2526using namespace std;
     
    3334  this->setClassID(CL_ENVIRONMENT, "Environment");
    3435  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());
    3538}
    3639
  • orxonox/trunk/src/world_entities/test_entity.cc

    r4679 r4682  
    2121#include "model.h"
    2222#include "md2Model.h"
     23#include "obb_tree.h"
    2324
    2425using namespace std;
     
    3132
    3233  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);
    3335  this->md2Model->debug();
    3436}
     
    7274  this->getAbsDir().matrix (matrix);
    7375  glMultMatrixf((float*)matrix);
    74   glScalef(0.2, 0.2, 0.2);
    7576  this->md2Model->draw();
    7677
  • orxonox/trunk/src/world_entities/world_entity.cc

    r4680 r4682  
    2121#include "list.h"
    2222#include "vector.h"
     23#include "obb_tree.h"
    2324
    2425using namespace std;
     
    3233
    3334  this->model = NULL;
     35  this->obbTree = NULL;
    3436
    3537  if (root)
  • orxonox/trunk/src/world_entities/world_entity.h

    r4680 r4682  
    1212#include "factory.h"
    1313#include "load_param.h"
     14#include "bv_tree.h"
    1415#include "model.h"
    1516
    16 //class CollisionCluster;
     17
     18
    1719class CharacterAttributes;
    1820class SoundEngine;
    1921class SoundBuffer;
    2022class SoundSource;
     23
    2124
    2225//! Basic class from which all interactive stuff in the world is derived from
     
    5255  void processDraw ();
    5356  virtual void draw ();
     57  inline void drawBVTree(int depth, int drawMode) { this->obbTree->drawBV(depth, drawMode); }
    5458  virtual void tick (float time);
    5559
    5660 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.
    5862  CharacterAttributes* charAttr;      //!< the character attributes of a world_entity
     63  BVTree*             obbTree;       //!< this is the obb tree reference needed for collision detection
    5964
    6065 private:
Note: See TracChangeset for help on using the changeset viewer.