Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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.

Location:
branches/coll_rect/src
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/coll_rect/src/lib/collision_reaction/Makefile.am

    r9235 r9890  
    55
    66libORXcr_a_SOURCES = cr_engine.cc \
     7                     collision_tube.cc \
    78                     collision.cc \
    89                     collision_event.cc \
     
    1617
    1718noinst_HEADERS =     cr_engine.h \
     19                     collision_tube.h \
    1820                     collision.h \
    1921                     collision_event.h \
  • branches/coll_rect/src/lib/collision_reaction/collision_handle.cc

    r9889 r9890  
    199199  void CollisionHandle::handleCollisions()
    200200  {
    201     // if continuous poll poll the reaction
     201    // if continuous poll the reaction
    202202    if( this->bContinuousPoll && !this->bCollided)
    203203    {
  • branches/coll_rect/src/lib/collision_reaction/collision_handle.h

    r9889 r9890  
    2828  {
    2929    ObjectListDeclaration(CollisionHandle);
     30
    3031  public:
    3132    CollisionHandle(WorldEntity* owner, CREngine::CRType type);
  • branches/coll_rect/src/lib/collision_reaction/cr_engine.cc

    r9889 r9890  
    3131
    3232  ObjectListDefinition(CREngine);
     33
     34
    3335  /**
    3436   * standard constructor
  • 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.