Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7968 in orxonox.OLD for branches/cr/src


Ignore:
Timestamp:
May 30, 2006, 1:28:36 AM (18 years ago)
Author:
patrick
Message:

cr: process call line almost clear now

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

Legend:

Unmodified
Added
Removed
  • branches/cr/src/lib/collision_reaction/collision.cc

    r7959 r7968  
    4040
    4141
     42/**
     43 * handles the collision events
     44 */
     45void Collision::handleCollisionEvents()
     46{
    4247
     48
     49  this->flushCollisionEvents();
     50}
     51
     52
     53/**
     54 * flushes the CollisionEvent list
     55 */
     56void Collision::flushCollisionEvents()
     57{
     58  this->collisionEvents.clear();
     59}
     60
  • branches/cr/src/lib/collision_reaction/collision.h

    r7964 r7968  
    1515
    1616//! A class representing a simple collision
    17 class Collision {
     17class Collision
     18{
    1819
    19  public:
    20    Collision();
    21   virtual ~Collision();
     20  public:
     21    Collision();
     22    virtual ~Collision();
    2223
    23   /** collides two WorldEntities @param entityA world entity A, @param entityB world entity B, @param bvA volume A @param bvB volumeB */
    24   inline void collide(WorldEntity* entityA, WorldEntity* entityB) { this->entityA = entityA; this->entityB = entityB; }
     24    /** collides two WorldEntities @param entityA world entity A, @param entityB world entity B, @param bvA volume A @param bvB volumeB */
     25    inline void collide(WorldEntity* entityA, WorldEntity* entityB) { this->entityA = entityA; this->entityB = entityB; }
    2526
    2627
    27   /** @return Collision WorldEntity A */
    28   inline WorldEntity* getEntityA() const { return this->entityA; }
    29   /** @return Collision WorldEntity B */
    30   inline WorldEntity* getEntityB() const { return this->entityB; }
     28    /** @return Collision WorldEntity A */
     29    inline WorldEntity* getEntityA() const { return this->entityA; }
     30    /** @return Collision WorldEntity B */
     31    inline WorldEntity* getEntityB() const { return this->entityB; }
    3132
    32   /** registers a @param event CollisionEvent to take place */
    33   inline void registerCollisionEvent(CollisionEvent* event) { this->collisionList.push_back(event); }
     33    /** registers a @param event CollisionEvent to take place */
     34    inline void registerCollisionEvent(CollisionEvent* event) { this->collisionEvents.push_back(event); }
     35
     36    void handleCollisionEvents();
    3437
    3538
    36  private:
    37   WorldEntity*                 entityA;                       //!< the collision body A
    38   WorldEntity*                 entityB;                       //!< the collision body B
     39  private:
     40    void flushCollisionEvents();
    3941
    40   std::vector<CollisionEvent*> collisionList;                 //!< the collision event list
     42
     43  private:
     44    WorldEntity*                 entityA;                       //!< the collision body A
     45    WorldEntity*                 entityB;                       //!< the collision body B
     46
     47    std::vector<CollisionEvent*> collisionEvents;               //!< the collision event list
    4148};
    4249
Note: See TracChangeset for help on using the changeset viewer.