Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9890 in orxonox.OLD for branches/coll_rect/src/world_entities


Ignore:
Timestamp:
Oct 13, 2006, 9:48:13 PM (18 years ago)
Author:
patrick
Message:

intruducing new container collision_tube. which serves as a central collision registration tube.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/coll_rect/src/world_entities/world_entity.h

    r9889 r9890  
    2525namespace OrxSound { class SoundBuffer; class SoundSource; }
    2626namespace OrxGui { class GLGuiWidget; class GLGuiBar; class GLGuiEnergyWidget; };
     27namespace CoRe { class CollisionHandle; class Collision; }
    2728
    2829class BVTree;
     
    3031class AABBTreeNode;
    3132class Model;
    32 class CollisionHandle;
    33 class Collision;
    34 
    35 
    36 //class CharacterAttributes;
    37 
    3833
    3934
     
    4237{
    4338  ObjectListDeclaration(WorldEntity);
     39
    4440public:
    4541  WorldEntity();
     
    5147  void loadModel2(const std::string& fileN, float scal = 1.0f){this->loadModel(fileN,scal,0,4);}
    5248  void setModel(Model* model, unsigned int modelNumber = 0);
    53 Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
     49  Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
    5450
    5551  inline void loadMD2Texture(const std::string& fileName) { this->md2TextureFileName = fileName; }
     
    127123
    128124  void hide() { if( this->objectListNumber != OM_DEAD) this->lastObjectListNumber = this->objectListNumber; this->toList(OM_DEAD); }
    129 void unhide() { if( this->objectListNumber != this->lastObjectListNumber) this->toList(this->lastObjectListNumber); }
     125  void unhide() { if( this->objectListNumber != this->lastObjectListNumber) this->toList(this->lastObjectListNumber); }
    130126
    131127
    132128  /* --- Character Attribute Block --- */
    133129  /** @returns the scaling of the model */
    134 float getScaling(){return this->scaling;}
     130  float getScaling(){return this->scaling;}
    135131  /** @returns the damage dealt by this world entity */
    136132  float getDamage() const { return this->damage; }
     
    169165  void setHealthMax(float healthMax);
    170166  void createHealthWidget();
    171 
    172   //  CharacterAttributes*    charAttr;         //!< the character attributes of a world_entity
     167    //  CharacterAttributes*    charAttr;         //!< the character attributes of a world_entity
     168
     169
    173170private:
    174171  void updateHealthWidget();
     172
    175173
    176174private:
     
    194192  OM_LIST                 lastObjectListNumber;            //!< the last ObjectList from the ObjectManager this Entity was is in
    195193
    196 
    197 
     194  /* collision reaction stuff */
     195  CoRe::CollisionHandle*  collisionHandles[CoRe::CREngine::CR_NUMBER];  //!< the list of the collision reactions
     196  bool                    bReactive;                              //!< true if there is at least one collision reaction subscibed
     197
     198
     199  PhysicsInterface        physicsInterface;                //!< the physics object of the WorldEntity
     200  bool                    bOnGround;                       //!< true if this entity is standing on the ground
     201
     202  /* network help structures */
    198203  float                   scaling;                         //!< model's scaling factor
    199204  int                     scaling_handle;                  //!< handle for syncing var
     
    211216  int                     healthMax_handle;
    212217
    213   CoRe::CollisionHandle*  collisionHandles[CoRe::CREngine::CR_NUMBER];  //!< the list of the collision reactions
    214   bool                    bReactive;                              //!< true if there is at least one collision reaction subscibed
    215 
    216 
    217   PhysicsInterface        physicsInterface;                //!< the physics object of the WorldEntity
    218   bool                    bOnGround;                       //!< true if this entity is standing on the ground
     218
    219219
    220220protected:
Note: See TracChangeset for help on using the changeset viewer.