Changeset 8490 in orxonox.OLD for trunk/src/lib/collision_reaction/collision_event.h
- Timestamp:
- Jun 15, 2006, 9:34:48 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_reaction/collision_event.h
r8190 r8490 25 25 { this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; } 26 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; }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; } 29 29 30 30 … … 38 38 inline BoundingVolume* getBVB() const { return this->bvB; } 39 39 40 /** @return ground plane if collided with bsp model */ 41 inline Vector getGroundNormal() { return this->groundNormal; } 40 42 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; } 44 45 45 46 private: … … 50 51 BoundingVolume* bvB; //!< reference to the bounding volume B 51 52 52 Plane* ground;//!< the ground plane with which it collides (only for bsp-model collisions53 Vector groundNormal; //!< the ground plane with which it collides (only for bsp-model collisions 53 54 Vector position; //!< position of the collision on the ground plane 54 55 };
Note: See TracChangeset
for help on using the changeset viewer.