Index: /branches/cr/src/lib/collision_reaction/collision.h
===================================================================
--- /branches/cr/src/lib/collision_reaction/collision.h	(revision 7963)
+++ /branches/cr/src/lib/collision_reaction/collision.h	(revision 7964)
@@ -8,4 +8,5 @@
 
 #include "vector.h"
+#include <vector>
 
 class WorldEntity;
@@ -25,7 +26,7 @@
 
   /** @return Collision WorldEntity A */
-  inline const WorldEntity* getEntityA() const { return this->entityA; }
+  inline WorldEntity* getEntityA() const { return this->entityA; }
   /** @return Collision WorldEntity B */
-  inline const WorldEntity* getEntityB() const { return this->entityB; }
+  inline WorldEntity* getEntityB() const { return this->entityB; }
 
   /** registers a @param event CollisionEvent to take place */
Index: /branches/cr/src/lib/collision_reaction/collision_event.h
===================================================================
--- /branches/cr/src/lib/collision_reaction/collision_event.h	(revision 7963)
+++ /branches/cr/src/lib/collision_reaction/collision_event.h	(revision 7964)
@@ -26,11 +26,11 @@
 
   /** @return CollisionEvent WorldEntity A */
-  inline const WorldEntity* getEntityA() const { return this->entityA; }
+  inline WorldEntity* getEntityA() const { return this->entityA; }
   /** @return CollisionEvent WorldEntity B */
-  inline const WorldEntity* getEntityB() const { return this->entityB; }
+  inline WorldEntity* getEntityB() const { return this->entityB; }
   /** @return Bounding Volume from EntityA */
-  inline const BoundingVolume* getBVA() const { return this->bvA; }
+  inline BoundingVolume* getBVA() const { return this->bvA; }
   /** @return Bounding Volume from EntityB */
-  inline const BoundingVolume* getBVB() const { return this->bvB; }
+  inline BoundingVolume* getBVB() const { return this->bvB; }
 
 
Index: /branches/cr/src/lib/collision_reaction/collision_handle.cc
===================================================================
--- /branches/cr/src/lib/collision_reaction/collision_handle.cc	(revision 7963)
+++ /branches/cr/src/lib/collision_reaction/collision_handle.cc	(revision 7964)
@@ -18,5 +18,6 @@
 
 
-
+#include "collision.h"
+#include "collision_event.h"
 
 using namespace std;
@@ -75,7 +76,20 @@
  *  @param collision the collision objects containing all collision informations
  */
-void CollisionHandle::registerCollision(Collision* collision)
+void CollisionHandle::registerCollisionEvent(CollisionEvent* collisionEvent)
 {
-  this->collisionList.push_back(collision);
+  // first element only
+  if( this->collisionList.empty())
+  {
+    Collision* c = CREngine::getInstance()->popCollisionObject();
+    c->collide(collisionEvent->getEntityA(), collisionEvent->getEntityB());
+    this->collisionList.push_back(c);
+  }
+  if( ((this->collisionList.back())->getEntityA() == collisionEvent->getEntityA()) &&
+        ((this->collisionList.back())->getEntityB() == collisionEvent->getEntityB()))
+  {
+    (this->collisionList.back())->registerCollisionEvent(collisionEvent);
+  }
+
+  //this->collisionList.push_back(collisionEvent);
 }
 
@@ -85,7 +99,4 @@
 void CollisionHandle::flushCollisions()
 {
-  std::vector<Collision*>::iterator it;
-  for( it = this->collisionList.begin(); it != this->collisionList.end(); it++)
-    CREngine::getInstance()->pushCollisionObject(*it);
   this->collisionList.clear();
 }
Index: /branches/cr/src/lib/collision_reaction/collision_handle.h
===================================================================
--- /branches/cr/src/lib/collision_reaction/collision_handle.h	(revision 7963)
+++ /branches/cr/src/lib/collision_reaction/collision_handle.h	(revision 7964)
@@ -29,5 +29,5 @@
 
     void addTarget(long classID);
-    void registerCollision(Collision* collision);
+    void registerCollisionEvent(CollisionEvent* collisionEvent);
     /** @returns true if regiestered some new collision events in this tick frame */
     inline bool isCollided() const { return this->bCollided; }
Index: /branches/cr/src/lib/collision_reaction/cr_defs.h
===================================================================
--- /branches/cr/src/lib/collision_reaction/cr_defs.h	(revision 7963)
+++ /branches/cr/src/lib/collision_reaction/cr_defs.h	(revision 7964)
@@ -11,5 +11,4 @@
 ### File Specific:
    main-programmer: Patrick Boenzli
-   co-programmer: Christian Meyer
 */
 
@@ -22,6 +21,9 @@
 #define _CR_DEFS_H
 
+//!< the maximal number of touching objects (collisions) per frame
+#define CR_MAX_COLLISIONS          500
 
-#define CR_MAX_COLLISIONS  1000
+//!< the maximal number of bounding volumes collision events per frame
+#define CR_MAX_COLLISION_EVENTS   3000
 
 
Index: /branches/cr/src/lib/collision_reaction/cr_engine.cc
===================================================================
--- /branches/cr/src/lib/collision_reaction/cr_engine.cc	(revision 7963)
+++ /branches/cr/src/lib/collision_reaction/cr_engine.cc	(revision 7964)
@@ -19,4 +19,5 @@
 
 #include "collision.h"
+#include "collision_event.h"
 #include "collision_handle.h"
 #include "cr_defs.h"
@@ -51,14 +52,20 @@
   CREngine::singletonRef = NULL;
 
-  if( this->cachedCollisions.size() != CR_MAX_COLLISIONS)
-    PRINTF(0)("CollisionReaction Error: cache size missmatch: %i of %i\n", this->cachedCollisions.size(), CR_MAX_COLLISIONS);
+  if( this->collisionsUnused.size() != CR_MAX_COLLISIONS)
+    PRINTF(0)("CollisionReaction Error: Collision cache size missmatch: %i of %i\n", this->collisionsUnused.size(), CR_MAX_COLLISIONS);
+  if( this->collisionEventsUnused.size() != CR_MAX_COLLISION_EVENTS)
+    PRINTF(0)("CollisionReaction Error: CollisionEvent cache size missmatch: %i of %i\n", this->collisionEventsUnused.size(), CR_MAX_COLLISION_EVENTS);
 
   this->reset();
 
-  vector<Collision*>::iterator it = this->cachedCollisions.begin();
-  for(; it < this->cachedCollisions.end(); it++)
-    delete *it;
+  vector<Collision*>::iterator it1 = this->collisionsUnused.begin();
+  for(; it1 < this->collisionsUnused.end(); it1++)
+    delete *it1;
+  vector<CollisionEvent*>::iterator it2 = this->collisionEventsUnused.begin();
+  for(; it2 < this->collisionEventsUnused.end(); it2++)
+    delete *it2;
 
-  this->cachedCollisions.clear();
+  this->collisionsUnused.clear();
+  this->collisionEventsUnused.clear();
 }
 
@@ -70,5 +77,7 @@
   // create a list of Collision events (precaching)
   for( int i = 0; i < CR_MAX_COLLISIONS; i++)
-    this->cachedCollisions.push_back(new Collision());
+    this->collisionsUnused.push_back(new Collision());
+  for( int i = 0; i < CR_MAX_COLLISION_EVENTS; i++)
+    this->collisionEventsUnused.push_back(new CollisionEvent());
 }
 
Index: /branches/cr/src/lib/collision_reaction/cr_engine.h
===================================================================
--- /branches/cr/src/lib/collision_reaction/cr_engine.h	(revision 7963)
+++ /branches/cr/src/lib/collision_reaction/cr_engine.h	(revision 7964)
@@ -2,5 +2,10 @@
  * @file cr_engine.h
  * @brief The collision reaction engine, defining generic collision reactions to collision events
-*/
+ *
+ * some parts of this module are tuned for efficiency. They are probably not self-explenatory anymore :D
+ *  - Collision/ CollisionEvent objects recycling: This class contains a class of precached objects of these types
+ *      they are used for fast registration of collision events: These objects can be get by the interface functions and
+ *      are returned after one cycle automaticly by reseting the cached lists to its initial state. So do not wonder :D
+ */
 
 #ifndef _CR_ENGINE_
@@ -14,4 +19,5 @@
 class CollisionHandle;
 class Collision;
+class CollisionEvent;
 class WorldEntity;
 
@@ -51,8 +57,12 @@
 
   /** @returns an instance to a collision object. instead of creating new object this ones can be resycled */
-  inline Collision* popCollisionObject() { if(!this->collisionsUnused.empty()) { return this->collisionsUnused.back(); this->collisionsUnused.pop_back();} else return NULL; }
-  /** @param collision: returns the Collision object back to the cache list */
-  inline void pushCollisionObject(Collision* collision) { this->collisionsUsed.push_back(collision); }
+  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();
@@ -70,6 +80,6 @@
   std::vector<Collision*>             collisionsUnused;         //!< a list of unused, cached collisions
 
-  std::vector<Collision*>             collisionEventsUsed;      //!< a list of used, cached collision events
-  std::vector<Collision*>             collisionEventsUnused;    //!< a list of unused, cached collision events
+  std::vector<CollisionEvent*>        collisionEventsUsed;      //!< a list of used, cached collision events
+  std::vector<CollisionEvent*>        collisionEventsUnused;    //!< a list of unused, cached collision events
 
   static CREngine*                    singletonRef;             //!< the reference to the CREngine object (singleton)
