Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 15, 2006, 9:34:48 PM (18 years ago)
Author:
patrick
Message:

merged the bsp branche back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_reaction/collision_event.h

    r8190 r8490  
    2525  { this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }
    2626  /** 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; }
     27  inline void collide(WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position)
     28  { this->entityA = entity; this->entityB = groundEntity, this->groundNormal = normal; this->position = position; }
    2929
    3030
     
    3838  inline BoundingVolume* getBVB() const { return this->bvB; }
    3939
     40  /** @return ground plane if collided with bsp model */
     41  inline Vector getGroundNormal() { return this->groundNormal; }
    4042
    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 
     43  /** @return position of the position, only accurate if this is a collision with the ground!!! */
     44  inline Vector getCollisionPosition() { return this->position; }
    4445
    4546 private:
     
    5051  BoundingVolume*   bvB;                           //!< reference to the bounding volume B
    5152
    52   Plane*            ground;                        //!< the ground plane with which it collides (only for bsp-model collisions
     53  Vector            groundNormal;                  //!< the ground plane with which it collides (only for bsp-model collisions
    5354  Vector            position;                      //!< position of the collision on the ground plane
    5455};
Note: See TracChangeset for help on using the changeset viewer.