Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7959 in orxonox.OLD for branches/cr/src/lib


Ignore:
Timestamp:
May 29, 2006, 5:43:10 PM (19 years ago)
Author:
patrick
Message:

cr: introducing CollisionEvent and some cleanup

Location:
branches/cr/src/lib/collision_reaction
Files:
2 added
4 edited

Legend:

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

    r7940 r7959  
    66libORXcr_a_SOURCES = cr_engine.cc \
    77                     collision.cc \
     8                     collision_event.cc \
    89                     collision_handle.cc
    910
     
    1213noinst_HEADERS =     cr_engine.h \
    1314                     collision.h \
     15                     collision_event.h \
    1416                     collision_handle.h \
    1517                     cr_defs.h
  • branches/cr/src/lib/collision_reaction/collision.cc

    r7955 r7959  
    2929  this->entityA = NULL;
    3030  this->entityB = NULL;
    31   this->bvA = NULL;
    32   this->bvB = NULL;
    3331}
    3432
  • branches/cr/src/lib/collision_reaction/collision.h

    r7940 r7959  
    11/*!
    22 * @file collision.h
    3  *  Definition of a collision event
     3 *  Definition of a collision as a two WE hit each other
    44 */
    55
     
    1111class WorldEntity;
    1212class BoundingVolume;
    13 
     13class CollisionEvent;
    1414
    1515//! A class representing a simple collision
     
    2121
    2222  /** collides two WorldEntities @param entityA world entity A, @param entityB world entity B, @param bvA volume A @param bvB volumeB */
    23   inline void collide(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
    24   { this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }
     23  inline void collide(WorldEntity* entityA, WorldEntity* entityB) { this->entityA = entityA; this->entityB = entityB; }
    2524
    2625
     
    2928  /** @return Collision WorldEntity B */
    3029  inline const WorldEntity* getEntityB() const { return this->entityB; }
    31   /** @return Bounding Volume from EntityA */
    32   inline const BoundingVolume* getBVA() const { return this->bvA; }
    33   /** @return Bounding Volume from EntityB */
    34   inline const BoundingVolume* getBVB() const { return this->bvB; }
     30
     31  /** registers a @param event CollisionEvent to take place */
     32  inline void registerCollisionEvent(CollisionEvent* event) { this->collisionList.push_back(event); }
    3533
    3634
    3735 private:
    38   WorldEntity*      entityA;                       //!< the collision body A
    39   WorldEntity*      entityB;                       //!< the collision body B
     36  WorldEntity*                 entityA;                       //!< the collision body A
     37  WorldEntity*                 entityB;                       //!< the collision body B
    4038
    41   BoundingVolume*   bvA;                          //!< reference to the bounding volume A
    42   BoundingVolume*   bvB;                          //!< reference to the bounding volume B
     39  std::vector<CollisionEvent*> collisionList;                 //!< the collision event list
    4340};
    4441
  • branches/cr/src/lib/collision_reaction/collision_handle.h

    r7947 r7959  
    1616class WorldEntity;
    1717
    18 // struct CRType;
    1918
    2019
Note: See TracChangeset for help on using the changeset viewer.