Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Aug 15, 2005, 9:59:57 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: obb trees are now created for every object in the world. this will use some extra seconds in the startup and will also take some ms in the collision detection algorithm test. took 30fps here… will try to optimize it…

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

Legend:

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

    r5029 r5033  
    3333{
    3434  this->setClassID(CL_ENVIRONMENT, "Environment");
    35   this->model = (Model*)ResourceManager::getInstance()->load("models/bolido.obj", OBJ, RP_CAMPAIGN);
     35  this->model = (Model*)ResourceManager::getInstance()->load("models/ships/bolido.obj", OBJ, RP_CAMPAIGN);
    3636
    37   this->obbTree = new OBBTree(15, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
     37  if(this->obbTree == NULL)
     38    this->obbTree = new OBBTree(5, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
    3839}
    3940
  • orxonox/trunk/src/world_entities/npc.cc

    r5029 r5033  
    2020
    2121#include "npc.h"
     22#include "obb_tree.h"
    2223
    2324#include "state.h"
     
    3233
    3334  this->loadModel("models/ships/bolido.obj");
     35  if(this->obbTree == NULL)
     36    this->obbTree = new OBBTree(5, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
    3437}
    3538
     
    5356
    5457
     58
  • orxonox/trunk/src/world_entities/world_entity.cc

    r5029 r5033  
    7373    PRINTF(4)("loading %s\n", fileName);
    7474    this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN);
     75    PRINTF(4)("creating obb tree\n");
     76    this->obbTree = new OBBTree(5, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
    7577  }
    7678  else
Note: See TracChangeset for help on using the changeset viewer.