Index: /branches/coll_rect/src/lib/collision_reaction/collision.h
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/collision.h	(revision 9891)
+++ /branches/coll_rect/src/lib/collision_reaction/collision.h	(revision 9892)
@@ -53,5 +53,6 @@
 
 
-    inline bool match(const WorldEntity& entityA, WorldEntity& entityB) const { return (this->entityA == &entityA && this->entityB == &entityB); }
+    inline bool match(const WorldEntity& entityA, WorldEntity& entityB) const {
+      return ((this->entityA == &entityA && this->entityB == &entityB) || (this->entityA == &entityB && this->entityB == &entityA)); }
     /** @returns true if this Collision has already been dispatched */
     inline bool isDispatched() { return this->bDispatched; }
Index: /branches/coll_rect/src/lib/collision_reaction/collision_event.h
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/collision_event.h	(revision 9891)
+++ /branches/coll_rect/src/lib/collision_reaction/collision_event.h	(revision 9892)
@@ -14,4 +14,5 @@
 
 #include "vector.h"
+#include "cr_engine.h"
 
 #include "cr_defs.h"
@@ -33,8 +34,8 @@
 
     /** collides two WorldEntities @param entityA world entity A, @param entityB world entity B, @param bvA volume A @param bvB volumeB */
-    inline void collide(int type, WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
+    inline void collide(CREngine::CollisionType type, WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
     { this->collisionType = type; this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }
     /** collides two WorldEntities @param entity world entity , @param ground ground plane, @param position position on the ground */
-    inline void collide(int type, WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall)
+    inline void collide(CREngine::CollisionType type, WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall)
     {
       this->collisionType = type;
Index: /branches/coll_rect/src/lib/collision_reaction/collision_handle.cc
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/collision_handle.cc	(revision 9891)
+++ /branches/coll_rect/src/lib/collision_reaction/collision_handle.cc	(revision 9892)
@@ -38,5 +38,5 @@
    * @todo this constructor is not jet implemented - do it
   */
-  CollisionHandle::CollisionHandle (WorldEntity* owner, CREngine::CRType type)
+  CollisionHandle::CollisionHandle (WorldEntity* owner, CREngine::ReactionType type)
   {
     this->registerObject(this, CollisionHandle::_objectList);
Index: /branches/coll_rect/src/lib/collision_reaction/collision_handle.h
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/collision_handle.h	(revision 9891)
+++ /branches/coll_rect/src/lib/collision_reaction/collision_handle.h	(revision 9892)
@@ -30,5 +30,5 @@
 
   public:
-    CollisionHandle(WorldEntity* owner, CREngine::CRType type);
+    CollisionHandle(WorldEntity* owner, CREngine::ReactionType type);
     virtual ~CollisionHandle();
 
@@ -47,5 +47,5 @@
     inline bool isContinuousPoll() const { return this->bContinuousPoll; }
     /** @returns the type */
-    inline CREngine::CRType getType() const { return this->type; }
+    inline CREngine::ReactionType getType() const { return this->type; }
 
     void handleCollisions();
@@ -61,5 +61,5 @@
   private:
     WorldEntity*                  owner;                   //!< the worldenity this reaction will be applied on
-    CREngine::CRType              type;                    //!< the reaction type
+    CREngine::ReactionType              type;                    //!< the reaction type
 
     bool                          bContinuousPoll;         //!< if this is true
Index: /branches/coll_rect/src/lib/collision_reaction/collision_tube.cc
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/collision_tube.cc	(revision 9891)
+++ /branches/coll_rect/src/lib/collision_reaction/collision_tube.cc	(revision 9892)
@@ -40,5 +40,5 @@
   CollisionTube::CollisionTube ()
   {
-
+    this->registerObject(this, CollisionTube::_objectList);
   }
 
@@ -65,6 +65,12 @@
   {
     Collision* collision = this->_collisionList.back();
+
+    // check if there is already a collision defined between these objects
     if( collision->match(*entityA, *entityB))
-    {}
+    {
+      CollisionEvent* collisionEvent = CREngine::getInstance()->popCollisionEventObject();
+      collisionEvent->collide( CREngine::CR_COLLISION_TYPE_OBB, entityA, entityB, bvA, bvB);
+      collision->registerCollisionEvent( collisionEvent);
+    }
   }
 
Index: /branches/coll_rect/src/lib/collision_reaction/collision_tube.h
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/collision_tube.h	(revision 9891)
+++ /branches/coll_rect/src/lib/collision_reaction/collision_tube.h	(revision 9892)
@@ -3,4 +3,23 @@
  *
  * collision tube collects all collisions from all entities
+ *
+ *  The collision events are saved in the _collisionList vector in a fixed hirarchy: a collision is defined by the world entities
+ *  that collide. For each collision there is an entry in _collisionList. Each collision itself again contains collision events which are
+ *  defined as collisions between the boundibg volumes (BV) of the world entities. This could look like this:
+ *
+ *  - Collision (WorldEntity_i  <=> WorldEntity_j)
+ *     +- CollisionEvent( some BV <=> some other BV)
+ *     +- CollisionEvent( some BV <=> some other BV)
+ *  - Collision (WorldEntity_k <=> WorldEntity_l)
+ *     +- CollisionEvent( some BV <=> some other BV)
+ *     +- CollisionEvent( some BV <=> some other BV)
+ *     +- CollisionEvent( some BV <=> some other BV)
+ *     +- CollisionEvent( some BV <=> some other BV)
+ *  - ... etc ...
+ *
+ *
+ *  When the collisions are processed by the handleCollision() function each collision pair is checked for their reactions (since each
+ *  WorldEntity can define several reactions to a collision). After all the reactions are calculated and applied the collision object is
+ *  put back.
  */
 
@@ -24,5 +43,5 @@
   class CollisionReaction;
 
-  //! A class for defining collision reactions and storing events
+  //! A class containing all CollisionEvents (structured as defined in the file doxygen tags)
   class CollisionTube : public BaseObject
   {
@@ -32,5 +51,5 @@
   public:
     CollisionTube();
-    ~CollisionTube();
+    virtual ~CollisionTube();
 
     /** @returns true if at least one of both WorldEntities are subscribed for a collision check */
Index: /branches/coll_rect/src/lib/collision_reaction/cr_defs.h
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/cr_defs.h	(revision 9891)
+++ /branches/coll_rect/src/lib/collision_reaction/cr_defs.h	(revision 9892)
@@ -38,5 +38,5 @@
 #define COLLISION_TYPE_AXIS_Z_NEG  6
 //!< the collision is a obb collision
-#define COLLISION_TYPE_OBB      8
+#define COLLISION_TYPE_OBB         8
 
 
Index: /branches/coll_rect/src/lib/collision_reaction/cr_engine.cc
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/cr_engine.cc	(revision 9891)
+++ /branches/coll_rect/src/lib/collision_reaction/cr_engine.cc	(revision 9892)
@@ -89,4 +89,33 @@
 
   /**
+   * @returns an instance to a collision object. instead of creating new object this ones can be resycled
+   */
+  Collision* CREngine::popCollisionObject()
+  {
+    if( !this->collisionsUnused.empty())
+    {
+      this->collisionsUsed.push_back(this->collisionsUnused.back());
+      this->collisionsUnused.pop_back();
+      return this->collisionsUsed.back();
+    }
+    else return NULL;
+  }
+
+  /**
+   * @return an instanco of a CollisionEvent object. instead of creating a new object this ones can be used and resycled
+   */
+  CollisionEvent* CREngine::popCollisionEventObject()
+  {
+    if( !this->collisionEventsUnused.empty())
+    {
+      this->collisionEventsUsed.push_back(this->collisionEventsUnused.back());
+      this->collisionEventsUnused.pop_back();
+      return this->collisionEventsUsed.back();
+    }
+    else return NULL;
+  }
+
+
+  /**
    * flushes the CollisionHandles and restores the CREngine to the initial state
    */
@@ -112,5 +141,5 @@
    *  @return the newly created CollisionHandle
    */
-  CollisionHandle* CREngine::subscribeReaction(WorldEntity* owner, CRType type)
+  CollisionHandle* CREngine::subscribeReaction(WorldEntity* owner, ReactionType type)
   {
     CollisionHandle* ch = new CollisionHandle(owner, type);
Index: /branches/coll_rect/src/lib/collision_reaction/cr_engine.h
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/cr_engine.h	(revision 9891)
+++ /branches/coll_rect/src/lib/collision_reaction/cr_engine.h	(revision 9892)
@@ -31,20 +31,44 @@
 
   public:
-    typedef enum CRType {
-      CR_PHYSICS_MOMENTUM   = 0,    //!< physical reaction: conservervation of momentum
-      CR_PHYSICS_STEP_BACK,         //!< physical reaction: just go to the last position without collisions
-      CR_PHYSICS_GROUND_WALK,       //!< physical reaction: stand on the ground, no movement: simulating simple normal force away from the gravity force
-      CR_PHYSICS_FULL_WALK,         //!< physical reaction: walking on the ground (inkl. hills etc)
-      CR_PHYSICS_DAMAGE,            //!< physical reaction: daling damage according to the object energy and their structural stability
+    typedef enum ReactionType {
+      CR_PHYSICS_MOMENTUM   = 0,           //!< physical reaction: conservervation of momentum
+      CR_PHYSICS_STEP_BACK,                //!< physical reaction: just go to the last position without collisions
+      CR_PHYSICS_GROUND_WALK,              //!< physical reaction: stand on the ground, no movement: simple normal force away from the gravity force
+      CR_PHYSICS_FULL_WALK,                //!< physical reaction: walking on the ground (inkl. hills etc)
+      CR_PHYSICS_DAMAGE,                   //!< physical reaction: daling damage according to the object energy and their structural stability
 
-      CR_OBJECT_DAMAGE,             //!< object raction: deals damage according to the objects specific damage potential (like weapons, nukes, etc.)
-      CR_OBJECT_PICKUP,             //!< object rection: calling the objects pickup functions, let them handle the collision (once!)
+      CR_OBJECT_DAMAGE,                    //!< object raction: deals damage according to the objects specific damage potential (like weapons, nukes, etc.)
+      CR_OBJECT_PICKUP,                    //!< object rection: calling the objects pickup functions, let them handle the collision (once!)
 
-      CR_VERTEX_TRAFO,              //!< vertex trafo: transforming the vertex according to the damage
+      CR_VERTEX_TRAFO,                     //!< vertex trafo: transforming the vertex according to the damage
 
-      CR_SPECIAL_CALLBACK,          //!< special: call a callback function
+      CR_SPECIAL_CALLBACK,                 //!< special: call a callback function
 
       CR_NUMBER
     };
+
+    typedef enum CollisionType {
+      CR_COLLISION_TYPE_AXIS_X       = 0,  //!< collision on x axis
+      CR_COLLISION_TYPE_AXIS_X_NEG,        //!< collision on negative x axis
+      CR_COLLISION_TYPE_AXIS_Y,            //!< collision on y axis
+      CR_COLLISION_TYPE_AXIS_Y_NEG,        //!< collision on negative y axis
+      CR_COLLISION_TYPE_AXIS_Z,            //!< collision on z axis
+      CR_COLLISION_TYPE_AXIS_Z_NEG,        //!< collision on negative z axis
+      CR_COLLISION_TYPE_OBB,               //!< object aligned bounding box collide
+
+      CR_COLLISION_TYPE_NUMBER
+    };
+
+
+#define COLLISION_TYPE_AXIS_X      1
+#define COLLISION_TYPE_AXIS_X_NEG  2
+//!< the collision axis y collision event
+#define COLLISION_TYPE_AXIS_Y      3
+#define COLLISION_TYPE_AXIS_Y_NEG  4
+//!< the collision axis z collision event
+#define COLLISION_TYPE_AXIS_Z      5
+#define COLLISION_TYPE_AXIS_Z_NEG  6
+//!< the collision is a obb collision
+#define COLLISION_TYPE_OBB         8
 
     virtual ~CREngine(void);
@@ -53,33 +77,13 @@
     inline static CREngine* getInstance() { if (!singletonRef) singletonRef = new CREngine();  return singletonRef; };
 
+    CollisionHandle* subscribeReaction(WorldEntity* worldEntity, ReactionType type);
+    bool unsubscribeReaction(CollisionHandle* collisionHandle);
+
+
+    Collision* popCollisionObject();
+    CollisionEvent* popCollisionEventObject();
     void reset();
 
-
-    CollisionHandle* subscribeReaction(WorldEntity* worldEntity, CRType type);
-
-    bool unsubscribeReaction(CollisionHandle* collisionHandle);
-
     void handleCollisions();
-
-    /** @returns an instance to a collision object. instead of creating new object this ones can be resycled */
-    inline Collision* popCollisionObject()
-    {
-      if( !this->collisionsUnused.empty())
-      {
-        this->collisionsUsed.push_back(this->collisionsUnused.back()); this->collisionsUnused.pop_back(); return this->collisionsUsed.back();
-      }
-      else return NULL;
-    }
-
-
-    /** @return an instanco of a CollisionEvent object. instead of creating a new object this ones can be used and resycled */
-    inline CollisionEvent* popCollisionEventObject()
-    {
-      if( !this->collisionEventsUnused.empty())
-      {
-        this->collisionEventsUsed.push_back(this->collisionEventsUnused.back()); this->collisionEventsUnused.pop_back(); return this->collisionEventsUsed.back();
-      }
-      else return NULL;
-    }
 
     void debug();
Index: /branches/coll_rect/src/lib/collision_reaction/cr_physics_full_walk.cc
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/cr_physics_full_walk.cc	(revision 9891)
+++ /branches/coll_rect/src/lib/collision_reaction/cr_physics_full_walk.cc	(revision 9892)
@@ -72,5 +72,5 @@
 
     float CR_MAX_WALK_HEIGHT = 15.0f;
-    float CR_THRESHOLD = 0.2f;
+//    float CR_THRESHOLD = 0.2f;
 
     float height = 0.0f;
Index: /branches/coll_rect/src/world_entities/world_entity.cc
===================================================================
--- /branches/coll_rect/src/world_entities/world_entity.cc	(revision 9891)
+++ /branches/coll_rect/src/world_entities/world_entity.cc	(revision 9892)
@@ -302,5 +302,5 @@
  *  @param target1 a filter target (classID)
  */
-void WorldEntity::subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1)
+void WorldEntity::subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1)
 {
   this->subscribeReaction(type);
@@ -316,5 +316,5 @@
  *  @param target1 a filter target (classID)
  */
-void WorldEntity::subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1, const ClassID& target2)
+void WorldEntity::subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1, const ClassID& target2)
 {
   this->subscribeReaction(type);
@@ -331,5 +331,5 @@
  *  @param target1 a filter target (classID)
  */
-void WorldEntity::subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1, const ClassID& target2, const ClassID& target3)
+void WorldEntity::subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1, const ClassID& target2, const ClassID& target3)
 {
   this->subscribeReaction(type);
@@ -349,5 +349,5 @@
  *  @param ... the targets as classIDs
  */
-void WorldEntity::subscribeReaction(CoRe::CREngine::CRType type)
+void WorldEntity::subscribeReaction(CoRe::CREngine::ReactionType type)
 {
   if( this->collisionHandles[type] != NULL)
@@ -368,5 +368,5 @@
  *  @param type the reaction to unsubscribe
  */
-void WorldEntity::unsubscribeReaction(CoRe::CREngine::CRType type)
+void WorldEntity::unsubscribeReaction(CoRe::CREngine::ReactionType type)
 {
   if( this->collisionHandles[type] == NULL)
@@ -395,5 +395,5 @@
 {
   for( int i = 0; i < CoRe::CREngine::CR_NUMBER; i++)
-    this->unsubscribeReaction((CoRe::CREngine::CRType)i);
+    this->unsubscribeReaction((CoRe::CREngine::ReactionType)i);
 
   // there are no reactions subscribed from now on
@@ -419,5 +419,5 @@
   CoRe::CollisionEvent* c = CoRe::CREngine::getInstance()->popCollisionEventObject();
   assert(c != NULL); // if this should fail: we got not enough precached CollisionEvents: alter value in cr_defs.h
-  c->collide(COLLISION_TYPE_OBB, entityA, entityB, bvA, bvB);
+//  c->collide(COLLISION_TYPE_OBB, entityA, entityB, bvA, bvB);
 
   for( int i = 0; i < CoRe::CREngine::CR_NUMBER; ++i)
@@ -443,5 +443,5 @@
   CoRe::CollisionEvent* c = CoRe::CREngine::getInstance()->popCollisionEventObject();
   assert(c != NULL); // if this should fail: we got not enough precached CollisionEvents: alter value in cr_defs.h
-  c->collide(type, entity, groundEntity, normal, position, bInWall);
+//  c->collide(type, entity, groundEntity, normal, position, bInWall);
 
   for( int i = 0; i < CoRe::CREngine::CR_NUMBER; ++i)
Index: /branches/coll_rect/src/world_entities/world_entity.h
===================================================================
--- /branches/coll_rect/src/world_entities/world_entity.h	(revision 9891)
+++ /branches/coll_rect/src/world_entities/world_entity.h	(revision 9892)
@@ -78,10 +78,10 @@
 
   /* --- Collision Reaction Block --- */
-  void subscribeReaction(CoRe::CREngine::CRType type);
-  void subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1);
-  void subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1, const ClassID& target2);
-  void subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1, const ClassID& target2, const ClassID& target3);
-
-  void unsubscribeReaction(CoRe::CREngine::CRType type);
+  void subscribeReaction(CoRe::CREngine::ReactionType type);
+  void subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1);
+  void subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1, const ClassID& target2);
+  void subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1, const ClassID& target2, const ClassID& target3);
+
+  void unsubscribeReaction(CoRe::CREngine::ReactionType type);
   void unsubscribeReaction();
 
@@ -91,5 +91,5 @@
   inline bool isReactive() const { return this->bReactive; }
 
-  CoRe::CollisionHandle* getCollisionHandle(CoRe::CREngine::CRType type) const { return this->collisionHandles[type]; }
+  CoRe::CollisionHandle* getCollisionHandle(CoRe::CREngine::ReactionType type) const { return this->collisionHandles[type]; }
 
   /** @returns true if this entity is standing on ground (BSP model) */
