Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Oct 24, 2005, 7:07:00 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: fixed a bug in the CD engine

Location:
trunk/src/world_entities
Files:
3 edited

Legend:

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

    r5419 r5428  
    3838  this->loadModel("models/ships/bolido.obj");
    3939
    40 /*  if(this->obbTree == NULL)
    41     this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());*/
     40  if(this->obbTree == NULL)
     41    this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
    4242}
    4343
  • trunk/src/world_entities/test_entity.cc

    r5427 r5428  
    3737//   this->md2Model = new MD2Model("models/tris.md2", "models/tris.pcx");
    3838// this->md2Model = new MD2Model("models/goblin.md2", "maps/goblin.bmp");
    39 //  this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices);
     39  this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices);
    4040
    4141  this->md2Model->setAnim(RUN);
  • trunk/src/world_entities/world_entity.cc

    r5419 r5428  
    9898bool WorldEntity::buildObbTree(unsigned int depth)
    9999{
    100 //   if (this->obbTree)
    101 //     delete this->obbTree;
    102 //
    103 //   if (this->model)
    104 //   {
    105 //     PRINTF(4)("creating obb tree\n");
    106 //     this->obbTree = new OBBTree(depth, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
    107 //     return true;
    108 //   }
    109 //   else
    110 //   {
    111 //     PRINTF(2)("could not create obb-tree, because no model was loaded yet\n");
    112 //     this->obbTree = NULL;
    113 //     return false;
    114 //  }
     100  if (this->obbTree)
     101    delete this->obbTree;
     102
     103  if (this->model)
     104  {
     105    PRINTF(4)("creating obb tree\n");
     106    this->obbTree = new OBBTree(depth, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
     107    return true;
     108  }
     109  else
     110  {
     111    PRINTF(2)("could not create obb-tree, because no model was loaded yet\n");
     112    this->obbTree = NULL;
     113    return false;
     114  }
    115115}
    116116
Note: See TracChangeset for help on using the changeset viewer.