Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jun 7, 2006, 11:41:16 AM (19 years ago)
Author:
patrick
Message:

cr: extended the collisionevent and added the interface to the WE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cr/src/lib/collision_reaction/collision_event.h

    r8028 r8182  
    1111class WorldEntity;
    1212class BoundingVolume;
     13class Plane;
    1314
    1415
     
    2324  inline void collide(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
    2425  { this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }
     26  /** collides two WorldEntities @param entity world entity , @param ground ground plane, @param position position on the ground */
     27  inline void collide(WorldEntity* entity, Plane* ground, Vector position)
     28  { this->entityA = entity; this->ground = ground; this->position = position; }
    2529
    2630
     
    3539
    3640
     41  inline void operator()(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB) { this->collide(entityA, entityB, bvA, bvB); }
     42  inline void operator()(WorldEntity* entity, Plane* ground, Vector position) { this->collide(entity, ground, position); }
     43
     44
    3745 private:
    3846  WorldEntity*      entityA;                       //!< the collision body A
     
    4149  BoundingVolume*   bvA;                           //!< reference to the bounding volume A
    4250  BoundingVolume*   bvB;                           //!< reference to the bounding volume B
     51
     52  Plane*            ground;                        //!< the ground plane with which it collides (only for bsp-model collisions
     53  Vector            position;                      //!< position of the collision on the ground plane
    4354};
    4455
Note: See TracChangeset for help on using the changeset viewer.