Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6089 in orxonox.OLD for branches/objectmanager/src/world_entities


Ignore:
Timestamp:
Dec 13, 2005, 2:58:57 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: objectManager first implementation

Location:
branches/objectmanager/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/objectmanager/src/world_entities/world_entity.cc

    r6005 r6089  
    5353
    5454  this->setVisibiliy(true);
     55
     56  this->objectListNumber = OM_INIT;
     57  this->objectListIterator = NULL;
     58
     59  ObjectManager::getInstance()->toList(this, OM_NULL);
    5560}
    5661
     
    6772  for (unsigned int i = 0; i < this->models.size(); i++)
    6873    this->setModel(NULL, i);
     74
     75  ObjectManager::getInstance()->toList(this, OM_INIT);
    6976}
    7077
     
    95102{
    96103  if (fileName != NULL)
    97   { 
     104  {
    98105    // search for the special character # in the LoadParam
    99106    if (strchr(fileName, '#') != NULL)
  • branches/objectmanager/src/world_entities/world_entity.h

    r6005 r6089  
    1111#include "model.h"
    1212
     13#include "object_manager.h"
    1314#include "glincl.h"
    1415#include <vector>
     
    6566  //  CharacterAttributes* getCharacterAttributes();
    6667
    67 
     68  /** @returns a Reference to the objectListNumber to set. */
     69  OM_LIST& getOMListNumber() { return this->objectListNumber; }
     70  /** @returns a Reference to the Iterator */
     71  std::list<WorldEntity*>::iterator& getEntityIterator() { return this->objectListIterator; }
    6872 protected:
    6973  //  CharacterAttributes*    charAttr;         //!< the character attributes of a world_entity
    7074
    7175 private:
    72   std::vector<Model*>     models;            //!< The model that should be loaded for this entity.
    73   BVTree*                 obbTree;          //!< this is the obb tree reference needed for collision detection
     76  std::vector<Model*>     models;             //!< The model that should be loaded for this entity.
     77  BVTree*                 obbTree;            //!< this is the obb tree reference needed for collision detection
    7478
    75   bool                    bCollide;         //!< If it should be considered for the collisiontest.
    76   bool                    bVisible;         //!< If it should be visible.
     79  bool                    bCollide;           //!< If it should be considered for the collisiontest.
     80  bool                    bVisible;           //!< If it should be visible.
     81
     82  OM_LIST                           objectListNumber;   //!< The ObjectList from ObjectManager this Entity is in.
     83  std::list<WorldEntity*>::iterator objectListIterator; //!< The iterator position of this Entity in the given list of the ObjectManager.
     84
    7785};
    7886
Note: See TracChangeset for help on using the changeset viewer.