Changeset 8894 in orxonox.OLD for trunk/src/lib/collision_reaction/collision_event.h
- Timestamp:
- Jun 29, 2006, 12:19:48 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_reaction/collision_event.h
r8490 r8894 9 9 #include "vector.h" 10 10 11 #include "cr_defs.h" 12 13 11 14 class WorldEntity; 12 15 class BoundingVolume; 13 16 class Plane; 17 14 18 15 19 … … 22 26 23 27 /** 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, BoundingVolume* bvA, BoundingVolume* bvB)25 { this-> entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }28 inline void collide(int type, WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB) 29 { this->collisionType = type; this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; } 26 30 /** collides two WorldEntities @param entity world entity , @param ground ground plane, @param position position on the ground */ 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; }31 inline void collide(int type, WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall) 32 { this->collisionType = type; this->entityA = entity; this->entityB = groundEntity, this->groundNormal = normal; this->position = position; this->bInWall = bInWall; } 29 33 30 34 … … 44 48 inline Vector getCollisionPosition() { return this->position; } 45 49 50 /** @return the type of the collision */ 51 inline int getType() { return this->collisionType; } 52 53 /** @return true if the entity is in the wall */ 54 inline bool isInWall() { return this->bInWall; } 55 56 46 57 private: 47 58 WorldEntity* entityA; //!< the collision body A … … 53 64 Vector groundNormal; //!< the ground plane with which it collides (only for bsp-model collisions 54 65 Vector position; //!< position of the collision on the ground plane 66 67 bool bInWall; //!< true if is in wall 68 int collisionType; //!< collision type 55 69 }; 56 70
Note: See TracChangeset
for help on using the changeset viewer.