Index: branches/coll_rect/src/lib/collision_reaction/collision.cc
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision.cc	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/collision.cc	(revision 9889)
@@ -19,35 +19,38 @@
 #include "debug.h"
 
-/**
- *  standard constructor
- */
-Collision::Collision ()
+namespace CoRe
 {
-  this->flushCollisionEvents();
-}
+
+  /**
+   *  standard constructor
+   */
+  Collision::Collision ()
+  {
+    this->flushCollisionEvents();
+  }
 
 
-/**
- *  standard deconstructor
- */
-Collision::~Collision ()
-{
-}
+  /**
+   *  standard deconstructor
+   */
+  Collision::~Collision ()
+  {}
 
 
-/**
- * flushes the CollisionEvent list
- */
-void Collision::flushCollisionEvents()
-{
-  this->entityA = NULL;
-  this->entityB = NULL;
+  /**
+   * flushes the CollisionEvent list
+   */
+  void Collision::flushCollisionEvents()
+  {
+    this->entityA = NULL;
+    this->entityB = NULL;
 
-  this->entityACollide = false;
-  this->entityBCollide = false;
+    this->entityACollide = false;
+    this->entityBCollide = false;
 
-  this->bDispatched = true;
+    this->bDispatched = true;
 
-  this->collisionEvents.clear();
+    this->collisionEvents.clear();
+  }
+
 }
-
Index: branches/coll_rect/src/lib/collision_reaction/collision.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision.h	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/collision.h	(revision 9889)
@@ -18,11 +18,17 @@
 #include <vector>
 
+
+
 class WorldEntity;
 class BoundingVolume;
-class CollisionEvent;
 
-//! A class representing a simple collision
-class Collision
+namespace CoRe
 {
+
+  class CollisionEvent;
+
+  //! A class representing a simple collision
+  class Collision
+  {
   public:
     Collision();
@@ -70,5 +76,6 @@
 
     std::vector<CollisionEvent*> collisionEvents;               //!< the collision event list
-};
+  };
+}
 
 #endif /* _COLLISION_H */
Index: branches/coll_rect/src/lib/collision_reaction/collision_event.cc
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision_event.cc	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/collision_event.cc	(revision 9889)
@@ -19,23 +19,25 @@
 #include "debug.h"
 
-/**
- *  standard constructor
- */
-CollisionEvent::CollisionEvent ()
+namespace CoRe
 {
-  this->entityA = NULL;
-  this->entityB = NULL;
-  this->bvA = NULL;
-  this->bvB = NULL;
+
+  /**
+   *  standard constructor
+   */
+  CollisionEvent::CollisionEvent ()
+  {
+    this->entityA = NULL;
+    this->entityB = NULL;
+    this->bvA = NULL;
+    this->bvB = NULL;
+  }
+
+
+  /**
+   *  standard deconstructor
+   */
+  CollisionEvent::~CollisionEvent ()
+  {}
+
 }
 
-
-/**
- *  standard deconstructor
- */
-CollisionEvent::~CollisionEvent ()
-{
-}
-
-
-
Index: branches/coll_rect/src/lib/collision_reaction/collision_event.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision_event.h	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/collision_event.h	(revision 9889)
@@ -22,55 +22,89 @@
 class Plane;
 
+namespace CoRe
+{
+
+  //! A class representing a simple collision
+  class CollisionEvent
+  {
+  public:
+    CollisionEvent();
+    virtual ~CollisionEvent();
+
+    /** 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)
+    { 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)
+    {
+      this->collisionType = type;
+      this->entityA = entity;
+      this->entityB = groundEntity;
+      this->groundNormal = normal;
+      this->position = position;
+      this->bInWall = bInWall;
+    }
 
 
-//! A class representing a simple collision
-class CollisionEvent {
- public:
-   CollisionEvent();
-  virtual ~CollisionEvent();
+    /** @return CollisionEvent WorldEntity A */
+    inline WorldEntity* getEntityA() const
+    {
+      return this->entityA;
+    }
+    /** @return CollisionEvent WorldEntity B */
+    inline WorldEntity* getEntityB() const
+    {
+      return this->entityB;
+    }
+    /** @return Bounding Volume from EntityA */
+    inline BoundingVolume* getBVA() const
+    {
+      return this->bvA;
+    }
+    /** @return Bounding Volume from EntityB */
+    inline BoundingVolume* getBVB() const
+    {
+      return this->bvB;
+    }
 
-  /** 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)
-  { 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)
-  { this->collisionType = type; this->entityA = entity; this->entityB = groundEntity, this->groundNormal = normal; this->position = position; this->bInWall = bInWall; }
+    /** @return ground plane if collided with bsp model */
+    inline Vector getGroundNormal()
+    {
+      return this->groundNormal;
+    }
+
+    /** @return position of the position, only accurate if this is a collision with the ground!!! */
+    inline Vector getCollisionPosition()
+    {
+      return this->position;
+    }
+
+    /** @return the type of the collision */
+    inline int getType()
+    {
+      return this->collisionType;
+    }
+
+    /** @return true if the entity is in the wall */
+    inline bool isInWall()
+    {
+      return this->bInWall;
+    }
 
 
-  /** @return CollisionEvent WorldEntity A */
-  inline WorldEntity* getEntityA() const { return this->entityA; }
-  /** @return CollisionEvent WorldEntity B */
-  inline WorldEntity* getEntityB() const { return this->entityB; }
-  /** @return Bounding Volume from EntityA */
-  inline BoundingVolume* getBVA() const { return this->bvA; }
-  /** @return Bounding Volume from EntityB */
-  inline BoundingVolume* getBVB() const { return this->bvB; }
+  private:
+    WorldEntity*      entityA;                       //!< the collision body A
+    WorldEntity*      entityB;                       //!< the collision body B
 
-  /** @return ground plane if collided with bsp model */
-  inline Vector getGroundNormal() { return this->groundNormal; }
+    BoundingVolume*   bvA;                           //!< reference to the bounding volume A
+    BoundingVolume*   bvB;                           //!< reference to the bounding volume B
 
-  /** @return position of the position, only accurate if this is a collision with the ground!!! */
-  inline Vector getCollisionPosition() { return this->position; }
+    Vector            groundNormal;                  //!< the ground plane with which it collides (only for bsp-model collisions
+    Vector            position;                      //!< position of the collision on the ground plane
 
-  /** @return the type of the collision */
-  inline int getType() { return this->collisionType; }
+    bool              bInWall;                       //!< true if is in wall
+    int               collisionType;                 //!< collision type
+  };
 
-  /** @return true if the entity is in the wall */
-  inline bool isInWall() { return this->bInWall; }
-
-
- private:
-  WorldEntity*      entityA;                       //!< the collision body A
-  WorldEntity*      entityB;                       //!< the collision body B
-
-  BoundingVolume*   bvA;                           //!< reference to the bounding volume A
-  BoundingVolume*   bvB;                           //!< reference to the bounding volume B
-
-  Vector            groundNormal;                  //!< the ground plane with which it collides (only for bsp-model collisions
-  Vector            position;                      //!< position of the collision on the ground plane
-
-  bool              bInWall;                       //!< true if is in wall
-  int               collisionType;                 //!< collision type
-};
-
+}
 #endif /* _COLLISION_EVENT_H */
Index: branches/coll_rect/src/lib/collision_reaction/collision_handle.cc
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision_handle.cc	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/collision_handle.cc	(revision 9889)
@@ -29,291 +29,305 @@
 #include "debug.h"
 
-
-ObjectListDefinition(CollisionHandle);
-
-/**
- * standard constructor
- * @todo this constructor is not jet implemented - do it
-*/
-CollisionHandle::CollisionHandle (WorldEntity* owner, CREngine::CRType type)
+namespace CoRe
 {
-  this->registerObject(this, CollisionHandle::_objectList);
-
-  this->owner = owner;
-  this->type = type;
-
-  this->bCollided = false;
-  this->bDispatched = true;
-
-  this->collisionReaction = NULL;
-  this->bContinuousPoll = false;
-  this->bStopOnFirstCollision = false;
-
-
-  switch( type)
-  {
-    case CREngine::CR_PHYSICS_FULL_WALK:
-      this->collisionReaction = new CRPhysicsFullWalk();
-      this->bContinuousPoll = true;
-      break;
-    case CREngine::CR_PHYSICS_GROUND_WALK:
-      this->collisionReaction = new CRPhysicsGroundWalk();
-      this->bContinuousPoll = true;
-      break;
-    case CREngine::CR_OBJECT_DAMAGE:
-      this->collisionReaction = new CRObjectDamage();
-      this->bStopOnFirstCollision = true;
-      break;
-    default:
-      break;
-  };
+
+  ObjectListDefinition(CollisionHandle);
+
+  /**
+   * standard constructor
+   * @todo this constructor is not jet implemented - do it
+  */
+  CollisionHandle::CollisionHandle (WorldEntity* owner, CREngine::CRType type)
+  {
+    this->registerObject(this, CollisionHandle::_objectList);
+
+    this->owner = owner;
+    this->type = type;
+
+    this->bCollided = false;
+    this->bDispatched = true;
+
+    this->collisionReaction = NULL;
+    this->bContinuousPoll = false;
+    this->bStopOnFirstCollision = false;
+
+
+    switch( type)
+    {
+        case CREngine::CR_PHYSICS_FULL_WALK:
+        this->collisionReaction = new CRPhysicsFullWalk();
+        this->bContinuousPoll = true;
+        break;
+        case CREngine::CR_PHYSICS_GROUND_WALK:
+        this->collisionReaction = new CRPhysicsGroundWalk();
+        this->bContinuousPoll = true;
+        break;
+        case CREngine::CR_OBJECT_DAMAGE:
+        this->collisionReaction = new CRObjectDamage();
+        this->bStopOnFirstCollision = true;
+        break;
+        default:
+        break;
+    };
+  }
+
+
+  /**
+   * standard deconstructor
+  */
+  CollisionHandle::~CollisionHandle ()
+  {
+    // delete what has to be deleted here
+    if( this->collisionReaction != NULL)
+      delete this->collisionReaction;
+  }
+
+  /**
+   * restores the CollisionHandle to its initial state
+   */
+  void CollisionHandle::reset()
+  {
+    this->flushCollisions();
+  }
+
+
+  /**
+   * add more filter targets to this collision handle
+   *  @param classID the classid to look for
+   */
+  void CollisionHandle::addTarget(const ClassID& target)
+  {
+    // make sure there is no dublicate
+    std::vector<ClassID>::iterator it = this->targetList.begin();
+    for( ; it < this->targetList.end(); it++)
+      if( (*it) == target)
+        return;
+
+
+    // add element
+    this->targetList.push_back(target);
+    PRINTF(5)("addTarget: %i \n", target.id());
+  }
+
+
+  /**
+   * registers a new Collision Object
+   *  @param entityA WorldEntity A of the collision
+   *  @param entityB WorldEntity B of the collision
+   * if a there is already a collision object with the same stats
+   * registration will be skipped and the last collision object is returned
+   */
+  Collision* CollisionHandle::registerCollision(WorldEntity* entityA, WorldEntity* entityB)
+  {
+    //first get the collision object, multiple sources
+    Collision* c;
+    if( this->collisionList.empty() ||
+        ((this->collisionList.back())->getEntityA() != entityA && (this->collisionList.back())->getEntityB() != entityB ))
+    {
+      c = CREngine::getInstance()->popCollisionObject();
+      c->collide(entityA, entityB);
+      this->collisionList.push_back(c);
+
+      // now register it as a shared collision with the other collision entity
+      CollisionHandle* ch = entityB->getCollisionHandle(this->type);
+      if( ch != NULL)
+        ch->registerSharedCollision(c);
+    }
+    else
+      c = this->collisionList.back();
+
+    return c;
+  }
+
+
+  /**
+   * register a Collision to the Collision handle.
+   *  @param collision the collision object to register
+   *
+   * This is used for internal collision registration: sharing the collision objects between Collision Reactions
+   * Therefore dispatching it only once
+   */
+  void CollisionHandle::registerSharedCollision(Collision* collision)
+  {
+    // fist check if we are listening for this Collision
+    if( !this->filterCollision(collision))
+      return;
+
+    // set the state to not dispatched
+    this->bDispatched = false;
+    this->bCollided = true;
+    collision->setEntityBCollide(true);
+
+    this->collisionList.push_back(collision);
+  }
+
+
+  /**
+   * this is the function to be called on a collision event for this handle
+   *  @param collision the collision objects containing all collision informations
+   */
+  void CollisionHandle::registerCollisionEvent(CollisionEvent* collisionEvent)
+  {
+    if( !this->filterCollisionEvent(collisionEvent))
+      return;
+
+    // set the state to not dispatched
+    this->bDispatched = false;
+    this->bCollided = true;
+
+    // checks if these WorldEntities have already collided or if its a new collision -> create a new Collision object
+    Collision* c = this->registerCollision(collisionEvent->getEntityA(), collisionEvent->getEntityB());
+    c->setEntityACollide(true);
+
+    c->registerCollisionEvent(collisionEvent);
+    PRINTF(5)("Registering Collision Event: %s, %s\n", collisionEvent->getEntityA()->getClassCName(), collisionEvent->getEntityB()->getClassCName());
+  }
+
+
+  /**
+   * flushes the collision list
+   */
+  void CollisionHandle::flushCollisions()
+  {
+    this->collisionList.clear();
+  }
+
+
+  /**
+   * handles the collisions and react according to algorithm
+   */
+  void CollisionHandle::handleCollisions()
+  {
+    // if continuous poll poll the reaction
+    if( this->bContinuousPoll && !this->bCollided)
+    {
+      this->collisionReaction->update(this->owner);
+      return;
+    }
+
+    // collision reaction calculations (for every collision there will be a reaction)
+    std::vector<Collision*>::iterator it = this->collisionList.begin();
+    for(; it < this->collisionList.end(); it++)
+    {
+      if( !(*it)->isDispatched())
+      {
+        this->collisionReaction->reactToCollision(*it);
+        (*it)->flushCollisionEvents();
+      }
+    }
+
+    // now set state to dispatched
+    this->bDispatched = true;
+    this->bCollided = false;
+
+    this->flushCollisions();
+  }
+
+
+  /**
+   * filter out the CollisionEvents that are not wanted
+   *  @param collisionEvent the collision event to filter
+   */
+  bool CollisionHandle::filterCollisionEvent(CollisionEvent* collisionEvent)
+  {
+    std::vector<ClassID>::iterator it = this->targetList.begin();
+    for(; it < this->targetList.end(); it++)
+    {
+      //     if(collisionEvent->getEntityB()->isA(CL_AIMING_SYSTEM) || collisionEvent->getEntityA()->isA(CL_AIMING_SYSTEM))
+      //     {
+      //        PRINTF(0)("I am: %s colliding with: %s\n", owner->getClassCName(), collisionEvent->getEntityB()->getClassCName(), *it);
+      //        if( collisionEvent->getEntityA() == this->owner) {
+      //          PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
+      //          collisionEvent->getEntityB()->getClassCName(), *it);
+      //          if( collisionEvent->getEntityB()->isA((ClassID)(*it))) {
+      //            PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
+      //            collisionEvent->getEntityB()->getClassCName(), *it);
+      //             }
+      //        }
+      //        else {
+      //          PRINTF(0)("I am not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
+      //          collisionEvent->getEntityB()->getClassCName(), *it);
+      //          if( collisionEvent->getEntityA()->isA((ClassID)(*it))) {
+      //            PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
+      //            collisionEvent->getEntityA()->getClassCName(), *it);
+      //             }
+      //        }
+      //
+      //     }
+
+      if( collisionEvent->getEntityA() == this->owner)
+      {
+        if( collisionEvent->getEntityB()->isA((*it)))
+        {
+          PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
+                    collisionEvent->getEntityB()->getClassCName(), (*it).id());
+          return true;
+        }
+      }
+      else
+      {
+        if( collisionEvent->getEntityA()->isA((*it)))
+        {
+          PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
+                    collisionEvent->getEntityA()->getClassCName(), (*it).id());
+          return true;
+        }
+      }
+    }
+
+    return false;
+  }
+
+
+  /**
+   * filter Collisions that are not wanted to be reacted to
+   *  @param collision the collision object to filter
+   */
+  bool CollisionHandle::filterCollision(Collision* collision)
+  {
+    std::vector<ClassID>::iterator it = this->targetList.begin();
+    for(; it < this->targetList.end(); it++)
+    {
+
+      //     if(collision->getEntityB()->isA(CL_AIMING_SYSTEM) || collision->getEntityA()->isA(CL_AIMING_SYSTEM))
+      //     {
+      //       PRINTF(0)("Shared!!! I am: %s colliding with: %s\n", owner->getClassCName(), collision->getEntityB()->getClassCName(), *it);
+      //       if( collision->getEntityA() == this->owner) {
+      //         PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
+      //         collision->getEntityB()->getClassCName(), *it);
+      //         if( collision->getEntityB()->isA((ClassID)(*it))) {
+      //           PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
+      //           collision->getEntityB()->getClassCName(), *it);
+      //         }
+      //       }
+      //       else {
+      //         PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
+      //         collision->getEntityB()->getClassCName(), *it);
+      //         if( collision->getEntityA()->isA((ClassID)(*it))) {
+      //           PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
+      //           collision->getEntityA()->getClassCName(), *it);
+      //         }
+      //       }
+      //     }
+
+      if( collision->getEntityA() == this->owner)
+      {
+        if( collision->getEntityA()->isA(*it))
+          return true;
+      }
+      else
+      {
+        if( collision->getEntityB()->isA(*it))
+          return true;
+      }
+    }
+
+    return false;
+  }
+
+
+
 }
 
 
-/**
- * standard deconstructor
-*/
-CollisionHandle::~CollisionHandle ()
-{
-  // delete what has to be deleted here
-  if( this->collisionReaction != NULL)
-    delete this->collisionReaction;
-}
-
-/**
- * restores the CollisionHandle to its initial state
- */
-void CollisionHandle::reset()
-{
-  this->flushCollisions();
-}
-
-
-/**
- * add more filter targets to this collision handle
- *  @param classID the classid to look for
- */
-void CollisionHandle::addTarget(const ClassID& target)
-{
-  // make sure there is no dublicate
-  std::vector<ClassID>::iterator it = this->targetList.begin();
-  for( ; it < this->targetList.end(); it++)
-    if( (*it) == target)
-      return;
-
-
-  // add element
-  this->targetList.push_back(target);
-   PRINTF(5)("addTarget: %i \n", target.id());
-}
-
-
-/**
- * registers a new Collision Object
- *  @param entityA WorldEntity A of the collision
- *  @param entityB WorldEntity B of the collision
- * if a there is already a collision object with the same stats
- * registration will be skipped and the last collision object is returned
- */
-Collision* CollisionHandle::registerCollision(WorldEntity* entityA, WorldEntity* entityB)
-{
-  //first get the collision object, multiple sources
-  Collision* c;
-  if( this->collisionList.empty() ||
-      ((this->collisionList.back())->getEntityA() != entityA && (this->collisionList.back())->getEntityB() != entityB )) {
-    c = CREngine::getInstance()->popCollisionObject();
-    c->collide(entityA, entityB);
-    this->collisionList.push_back(c);
-
-    // now register it as a shared collision with the other collision entity
-    CollisionHandle* ch = entityB->getCollisionHandle(this->type);
-    if( ch != NULL)
-      ch->registerSharedCollision(c);
-  }
-  else
-    c = this->collisionList.back();
-
-  return c;
-}
-
-
-/**
- * register a Collision to the Collision handle.
- *  @param collision the collision object to register
- *
- * This is used for internal collision registration: sharing the collision objects between Collision Reactions
- * Therefore dispatching it only once
- */
-void CollisionHandle::registerSharedCollision(Collision* collision)
-{
-  // fist check if we are listening for this Collision
-  if( !this->filterCollision(collision))
-    return;
-
-  // set the state to not dispatched
-  this->bDispatched = false;
-  this->bCollided = true;
-  collision->setEntityBCollide(true);
-
-  this->collisionList.push_back(collision);
-}
-
-
-/**
- * this is the function to be called on a collision event for this handle
- *  @param collision the collision objects containing all collision informations
- */
-void CollisionHandle::registerCollisionEvent(CollisionEvent* collisionEvent)
-{
-  if( !this->filterCollisionEvent(collisionEvent))
-    return;
-
-  // set the state to not dispatched
-  this->bDispatched = false;
-  this->bCollided = true;
-
-  // checks if these WorldEntities have already collided or if its a new collision -> create a new Collision object
- Collision* c = this->registerCollision(collisionEvent->getEntityA(), collisionEvent->getEntityB());
- c->setEntityACollide(true);
-
- c->registerCollisionEvent(collisionEvent);
- PRINTF(5)("Registering Collision Event: %s, %s\n", collisionEvent->getEntityA()->getClassCName(), collisionEvent->getEntityB()->getClassCName());
-}
-
-
-/**
- * flushes the collision list
- */
-void CollisionHandle::flushCollisions()
-{
-  this->collisionList.clear();
-}
-
-
-/**
- * handles the collisions and react according to algorithm
- */
-void CollisionHandle::handleCollisions()
-{
-  // if continuous poll poll the reaction
-  if( this->bContinuousPoll && !this->bCollided)
-  {
-    this->collisionReaction->update(this->owner);
-    return;
-  }
-
-  // collision reaction calculations (for every collision there will be a reaction)
-  std::vector<Collision*>::iterator it = this->collisionList.begin();
-  for(; it < this->collisionList.end(); it++) {
-    if( !(*it)->isDispatched())
-    {
-      this->collisionReaction->reactToCollision(*it);
-      (*it)->flushCollisionEvents();
-    }
-  }
-
-  // now set state to dispatched
-  this->bDispatched = true;
-  this->bCollided = false;
-
-  this->flushCollisions();
-}
-
-
-/**
- * filter out the CollisionEvents that are not wanted
- *  @param collisionEvent the collision event to filter
- */
-bool CollisionHandle::filterCollisionEvent(CollisionEvent* collisionEvent)
-{
-  std::vector<ClassID>::iterator it = this->targetList.begin();
-  for(; it < this->targetList.end(); it++)
-  {
-//     if(collisionEvent->getEntityB()->isA(CL_AIMING_SYSTEM) || collisionEvent->getEntityA()->isA(CL_AIMING_SYSTEM))
-//     {
-//        PRINTF(0)("I am: %s colliding with: %s\n", owner->getClassCName(), collisionEvent->getEntityB()->getClassCName(), *it);
-//        if( collisionEvent->getEntityA() == this->owner) {
-//          PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
-//          collisionEvent->getEntityB()->getClassCName(), *it);
-//          if( collisionEvent->getEntityB()->isA((ClassID)(*it))) {
-//            PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
-//            collisionEvent->getEntityB()->getClassCName(), *it);
-//             }
-//        }
-//        else {
-//          PRINTF(0)("I am not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
-//          collisionEvent->getEntityB()->getClassCName(), *it);
-//          if( collisionEvent->getEntityA()->isA((ClassID)(*it))) {
-//            PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
-//            collisionEvent->getEntityA()->getClassCName(), *it);
-//             }
-//        }
-//
-//     }
-
-    if( collisionEvent->getEntityA() == this->owner) {
-      if( collisionEvent->getEntityB()->isA((*it))) {
-        PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
-	collisionEvent->getEntityB()->getClassCName(), (*it).id());
-        return true; }
-    }
-    else {
-      if( collisionEvent->getEntityA()->isA((*it))) {
-        PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
-	collisionEvent->getEntityA()->getClassCName(), (*it).id());
-      return true; }
-    }
-  }
-
-  return false;
-}
-
-
-/**
- * filter Collisions that are not wanted to be reacted to
- *  @param collision the collision object to filter
- */
-bool CollisionHandle::filterCollision(Collision* collision)
-{
-  std::vector<ClassID>::iterator it = this->targetList.begin();
-  for(; it < this->targetList.end(); it++)
-  {
-
-//     if(collision->getEntityB()->isA(CL_AIMING_SYSTEM) || collision->getEntityA()->isA(CL_AIMING_SYSTEM))
-//     {
-//       PRINTF(0)("Shared!!! I am: %s colliding with: %s\n", owner->getClassCName(), collision->getEntityB()->getClassCName(), *it);
-//       if( collision->getEntityA() == this->owner) {
-//         PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
-//         collision->getEntityB()->getClassCName(), *it);
-//         if( collision->getEntityB()->isA((ClassID)(*it))) {
-//           PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
-//           collision->getEntityB()->getClassCName(), *it);
-//         }
-//       }
-//       else {
-//         PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
-//         collision->getEntityB()->getClassCName(), *it);
-//         if( collision->getEntityA()->isA((ClassID)(*it))) {
-//           PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
-//           collision->getEntityA()->getClassCName(), *it);
-//         }
-//       }
-//     }
-
-    if( collision->getEntityA() == this->owner) {
-      if( collision->getEntityA()->isA(*it))
-        return true; }
-      else {
-        if( collision->getEntityB()->isA(*it))
-          return true; }
-  }
-
-  return false;
-}
-
-
-
-
-
-
-
+
Index: branches/coll_rect/src/lib/collision_reaction/collision_handle.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision_handle.h	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/collision_handle.h	(revision 9889)
@@ -16,12 +16,16 @@
 class Collision;
 class WorldEntity;
-class CollisionReaction;
+
+namespace CoRe
+{
+
+  class CollisionReaction;
 
 
 
-//! A class for defining collision reactions and storing events
-class CollisionHandle : public BaseObject
-{
-  ObjectListDeclaration(CollisionHandle);
+  //! A class for defining collision reactions and storing events
+  class CollisionHandle : public BaseObject
+  {
+    ObjectListDeclaration(CollisionHandle);
   public:
     CollisionHandle(WorldEntity* owner, CREngine::CRType type);
@@ -68,5 +72,6 @@
     CollisionReaction*            collisionReaction;       //!< reference to the collision reaction object
 
-};
+  };
 
+}
 #endif /* _COLLISION_HANDLE_H */
Index: branches/coll_rect/src/lib/collision_reaction/collision_reaction.cc
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision_reaction.cc	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/collision_reaction.cc	(revision 9889)
@@ -17,23 +17,24 @@
 #include "collision_reaction.h"
 
+namespace CoRe
+{
+
+  ObjectListDefinition(CollisionReaction);
+
+  /**
+   *  standard constructor
+   */
+  CollisionReaction::CollisionReaction ()
+      : BaseObject()
+  {
+    this->registerObject(this, CollisionReaction::_objectList);
+  }
 
 
-ObjectListDefinition(CollisionReaction);
+  /**
+   *  standard deconstructor
+   */
+  CollisionReaction::~CollisionReaction ()
+  {}
 
-/**
- *  standard constructor
- */
-CollisionReaction::CollisionReaction ()
-  : BaseObject()
-{
-  this->registerObject(this, CollisionReaction::_objectList);
 }
-
-
-/**
- *  standard deconstructor
- */
-CollisionReaction::~CollisionReaction ()
-{
-}
-
Index: branches/coll_rect/src/lib/collision_reaction/collision_reaction.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision_reaction.h	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/collision_reaction.h	(revision 9889)
@@ -9,14 +9,15 @@
 #include "base_object.h"
 
-
-
-class Collision;
 class WorldEntity;
 
+namespace CoRe
+{
 
-//! A class representing a simple collision
-class CollisionReaction : public BaseObject
-{
-  ObjectListDeclaration(CollisionReaction);
+  class Collision;
+
+  //! A class representing a simple collision
+  class CollisionReaction : public BaseObject
+  {
+    ObjectListDeclaration(CollisionReaction);
   public:
     CollisionReaction();
@@ -32,5 +33,6 @@
   private:
     bool                    bContinuousPoll;       //!< if true the collision rection function is also called, if there was no collision
-};
+  };
 
+}
 #endif /* _COLLISION_REACTION_H */
Index: branches/coll_rect/src/lib/collision_reaction/cr_engine.cc
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/cr_engine.cc	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/cr_engine.cc	(revision 9889)
@@ -27,152 +27,155 @@
 #include "debug.h"
 
+namespace CoRe
+{
+
+  ObjectListDefinition(CREngine);
+  /**
+   * standard constructor
+   */
+  CREngine::CREngine ()
+      : BaseObject()
+  {
+    this->registerObject(this, CREngine::_objectList);
+    this->setName("CREngine");
+
+    this->init();
+  }
+
+  /**
+   *  the singleton reference to this class
+   */
+  CREngine* CREngine::singletonRef = NULL;
+
+  /**
+     @brief standard deconstructor
+   */
+  CREngine::~CREngine ()
+  {
+    CREngine::singletonRef = NULL;
+
+    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();
+
+    std::vector<Collision*>::iterator it1 = this->collisionsUnused.begin();
+    for(; it1 < this->collisionsUnused.end(); it1++)
+      delete *it1;
+    std::vector<CollisionEvent*>::iterator it2 = this->collisionEventsUnused.begin();
+    for(; it2 < this->collisionEventsUnused.end(); it2++)
+      delete *it2;
+
+    this->collisionsUnused.clear();
+    this->collisionEventsUnused.clear();
+  }
+
+  /**
+   * inits the CREngine to a working state
+   */
+  void CREngine::init()
+  {
+    // create a list of Collision events (precaching)
+    for( int i = 0; i < CR_MAX_COLLISIONS; i++)
+      this->collisionsUnused.push_back(new Collision());
+    for( int i = 0; i < CR_MAX_COLLISION_EVENTS; i++)
+      this->collisionEventsUnused.push_back(new CollisionEvent());
+  }
 
 
-ObjectListDefinition(CREngine);
-/**
- * standard constructor
- */
-CREngine::CREngine ()
-  : BaseObject()
-{
-  this->registerObject(this, CREngine::_objectList);
-   this->setName("CREngine");
+  /**
+   * flushes the CollisionHandles and restores the CREngine to the initial state
+   */
+  void CREngine::reset()
+  {
+    // first clear all CollisionHandles
 
-   this->init();
-}
+    std::vector<CollisionHandle*>::iterator it = this->collisionHandles.begin();
+    for(; it < this->collisionHandles.end(); it++)
+    {
+      (*it)->reset();
+      delete *it;
+    }
 
-/**
- *  the singleton reference to this class
- */
-CREngine* CREngine::singletonRef = NULL;
-
-/**
-   @brief standard deconstructor
- */
-CREngine::~CREngine ()
-{
-  CREngine::singletonRef = NULL;
-
-  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();
-
-  std::vector<Collision*>::iterator it1 = this->collisionsUnused.begin();
-  for(; it1 < this->collisionsUnused.end(); it1++)
-    delete *it1;
-  std::vector<CollisionEvent*>::iterator it2 = this->collisionEventsUnused.begin();
-  for(; it2 < this->collisionEventsUnused.end(); it2++)
-    delete *it2;
-
-  this->collisionsUnused.clear();
-  this->collisionEventsUnused.clear();
-}
-
-/**
- * inits the CREngine to a working state
- */
-void CREngine::init()
-{
-  // create a list of Collision events (precaching)
-  for( int i = 0; i < CR_MAX_COLLISIONS; i++)
-    this->collisionsUnused.push_back(new Collision());
-  for( int i = 0; i < CR_MAX_COLLISION_EVENTS; i++)
-    this->collisionEventsUnused.push_back(new CollisionEvent());
-}
+    this->collisionHandles.clear();
+  }
 
 
-/**
- * flushes the CollisionHandles and restores the CREngine to the initial state
- */
-void CREngine::reset()
-{
-  // first clear all CollisionHandles
+  /**
+   * subscribes a WorldEntity for a CollisionReaction
+   *  @param owner: the WE to subscribe
+   *  @param type: the type of collision reaction to perform
+   *  @return the newly created CollisionHandle
+   */
+  CollisionHandle* CREngine::subscribeReaction(WorldEntity* owner, CRType type)
+  {
+    CollisionHandle* ch = new CollisionHandle(owner, type);
+    this->collisionHandles.push_back(ch);
 
-  std::vector<CollisionHandle*>::iterator it = this->collisionHandles.begin();
-  for(; it < this->collisionHandles.end(); it++)
-  {
-    (*it)->reset();
-    delete *it;
+    return ch;
   }
 
-  this->collisionHandles.clear();
-}
+
+  /**
+   * unsubscribe reaction from the reaction list
+   *  @param collisionHandle the CollisionHandle to remove
+   *  @param returns true if worked collrectly
+   */
+  bool CREngine::unsubscribeReaction(CollisionHandle* collisionHandle)
+  {
+    std::vector<CollisionHandle*>::iterator it;
+    for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++)
+    {
+      if( *it == collisionHandle)
+      {
+        this->collisionHandles.erase(it);
+        delete collisionHandle;
+        return true;
+      }
+    }
+    return false;
+  }
 
 
-/**
- * subscribes a WorldEntity for a CollisionReaction
- *  @param owner: the WE to subscribe
- *  @param type: the type of collision reaction to perform
- *  @return the newly created CollisionHandle
- */
-CollisionHandle* CREngine::subscribeReaction(WorldEntity* owner, CRType type)
-{
-  CollisionHandle* ch = new CollisionHandle(owner, type);
-  this->collisionHandles.push_back(ch);
-
-  return ch;
-}
+  /**
+   * processes the collisions by calling the EventHandlers
+   */
+  void CREngine::handleCollisions()
+  {
+    std::vector<CollisionHandle*>::iterator it;
+    for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++)
+    {
+      if( !(*it)->isDispatched() || (*it)->isContinuousPoll())  //does it have any collisions to report at all
+      {
+        (*it)->handleCollisions();
+      }
+    }
+    this->flushCollisions();
+  }
 
 
-/**
- * unsubscribe reaction from the reaction list
- *  @param collisionHandle the CollisionHandle to remove
- *  @param returns true if worked collrectly
- */
-bool CREngine::unsubscribeReaction(CollisionHandle* collisionHandle)
-{
-  std::vector<CollisionHandle*>::iterator it;
-  for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++)  {
-    if( *it == collisionHandle) {
-      this->collisionHandles.erase(it);
-      delete collisionHandle;
-      return true;
-    }
+  /**
+   * flushes all the collision lists and puts them to their initial state
+   */
+  void CREngine::flushCollisions()
+  {
+    std::vector<Collision*>::iterator it1 = this->collisionsUsed.begin();
+    for(; it1 < this->collisionsUsed.end(); it1++)
+      this->collisionsUnused.push_back(*it1);
+
+    std::vector<CollisionEvent*>::iterator it2 = this->collisionEventsUsed.begin();
+    for(; it2 < this->collisionEventsUsed.end(); it2++)
+      this->collisionEventsUnused.push_back(*it2);
+
+    this->collisionsUsed.clear();
+    this->collisionEventsUsed.clear();
   }
-  return false;
-}
 
 
-/**
- * processes the collisions by calling the EventHandlers
- */
-void CREngine::handleCollisions()
-{
-  std::vector<CollisionHandle*>::iterator it;
-  for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++)
+  void CREngine::debug()
   {
-    if( !(*it)->isDispatched() || (*it)->isContinuousPoll())  //does it have any collisions to report at all
-    {
-      (*it)->handleCollisions();
-    }
   }
-  this->flushCollisions();
-}
-
-
-/**
- * flushes all the collision lists and puts them to their initial state
- */
-void CREngine::flushCollisions()
-{
-  std::vector<Collision*>::iterator it1 = this->collisionsUsed.begin();
-  for(; it1 < this->collisionsUsed.end(); it1++)
-    this->collisionsUnused.push_back(*it1);
-
-  std::vector<CollisionEvent*>::iterator it2 = this->collisionEventsUsed.begin();
-  for(; it2 < this->collisionEventsUsed.end(); it2++)
-    this->collisionEventsUnused.push_back(*it2);
-
-  this->collisionsUsed.clear();
-  this->collisionEventsUsed.clear();
-}
-
-
-void CREngine::debug()
-{
 
 }
-
Index: branches/coll_rect/src/lib/collision_reaction/cr_engine.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/cr_engine.h	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/cr_engine.h	(revision 9889)
@@ -16,79 +16,93 @@
 #include <vector>
 
-// FORWARD DECLARATION
-class CollisionHandle;
-class Collision;
-class CollisionEvent;
 class WorldEntity;
 
-//! A default singleton class.
-class CREngine : public BaseObject
+
+namespace CoRe
 {
-  ObjectListDeclaration(CREngine);
+  class CollisionHandle;
+  class Collision;
+  class CollisionEvent;
+
+  //! A default singleton class.
+  class CREngine : public BaseObject
+  {
+    ObjectListDeclaration(CREngine);
 
   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 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
 
-    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
+      CR_NUMBER
+    };
+
+    virtual ~CREngine(void);
+
+    /** @returns a Pointer to the only object of this Class */
+    inline static CREngine* getInstance() { if (!singletonRef) singletonRef = new CREngine();  return singletonRef; };
+
+    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();
+
+
+  private:
+    CREngine();
+    void init();
+
+    void flushCollisions();
+
+
+  private:
+    std::vector<CollisionHandle*>       collisionHandles;         //!< list with the collision handles
+
+    std::vector<Collision*>             collisionsUsed;           //!< a list of used, cached collisions
+    std::vector<Collision*>             collisionsUnused;         //!< a list of unused, cached collisions
+
+    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)
   };
 
-  virtual ~CREngine(void);
-
-  /** @returns a Pointer to the only object of this Class */
-  inline static CREngine* getInstance() { if (!singletonRef) singletonRef = new CREngine();  return singletonRef; };
-
-  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();
-
-
-private:
-  CREngine();
-  void init();
-
-  void flushCollisions();
-
-
-private:
-  std::vector<CollisionHandle*>       collisionHandles;         //!< list with the collision handles
-
-  std::vector<Collision*>             collisionsUsed;           //!< a list of used, cached collisions
-  std::vector<Collision*>             collisionsUnused;         //!< a list of unused, cached collisions
-
-  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)
-};
-
+}
 #endif /* _CR_ENGINE_ */
Index: branches/coll_rect/src/lib/collision_reaction/cr_object_damage.cc
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/cr_object_damage.cc	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/cr_object_damage.cc	(revision 9889)
@@ -26,61 +26,64 @@
 #include "debug.h"
 
+namespace CoRe
+{
+
+  ObjectListDefinition(CRObjectDamage);
+  /**
+   *  standard constructor
+   */
+  CRObjectDamage::CRObjectDamage ()
+      : CollisionReaction()
+  {
+    this->registerObject(this, CRObjectDamage::_objectList);
+  }
 
 
-ObjectListDefinition(CRObjectDamage);
-/**
- *  standard constructor
- */
-CRObjectDamage::CRObjectDamage ()
-  : CollisionReaction()
-{
-  this->registerObject(this, CRObjectDamage::_objectList);
-}
+  /**
+   *  standard deconstructor
+   */
+  CRObjectDamage::~CRObjectDamage ()
+  {}
 
 
-/**
- *  standard deconstructor
- */
-CRObjectDamage::~CRObjectDamage ()
-{
-}
+  /**
+   * caluculates and applys the reaction to a specific collision
+   *  @param collision the collision
+   */
+  void CRObjectDamage::reactToCollision(Collision* collision)
+  {
+    float damage = 0.0f;
 
+    PRINTF(4)("Dealing damage - Handling collision: %s vs %s\n",
+              collision->getEntityA()->getClassCName(),
+              collision->getEntityB()->getClassCName());
 
-/**
- * caluculates and applys the reaction to a specific collision
- *  @param collision the collision
- */
-void CRObjectDamage::reactToCollision(Collision* collision)
-{
-  float damage = 0.0f;
+    // the collision damage been dealed by the entity
+    if( collision->isEntityACollide())
+    {
+      damage = collision->getEntityB()->getDamage();
+      collision->getEntityA()->hit(damage, collision->getEntityB());
+      PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassCName());
+    }
 
-  PRINTF(4)("Dealing damage - Handling collision: %s vs %s\n",
-            collision->getEntityA()->getClassCName(),
-            collision->getEntityB()->getClassCName());
+    if( collision->isEntityBCollide())
+    {
+      damage = collision->getEntityA()->getDamage();
+      collision->getEntityB()->hit(damage, collision->getEntityA());
+      PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassCName());
+    }
 
-  // the collision damage been dealed by the entity
-  if( collision->isEntityACollide()) {
-    damage = collision->getEntityB()->getDamage();
-    collision->getEntityA()->hit(damage, collision->getEntityB());
-    PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassCName());
+    collision->flushCollisionEvents();
+    collision->dispatched();
+
+    //   const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents());
+    //   std::vector<CollisionEvent*>::const_iterator it = collisionEvents->begin();
+    //   for(; it != collisionEvents->end(); it++)
+    //   {
+    //     // go through the collisions and try to estimate the damage
+    //     mass = (*it)->getEntityA()->getMass();
+    //   }
+
   }
 
-  if( collision->isEntityBCollide()) {
-    damage = collision->getEntityA()->getDamage();
-    collision->getEntityB()->hit(damage, collision->getEntityA());
-    PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassCName());
-  }
-
-  collision->flushCollisionEvents();
-  collision->dispatched();
-
-//   const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents());
-//   std::vector<CollisionEvent*>::const_iterator it = collisionEvents->begin();
-//   for(; it != collisionEvents->end(); it++)
-//   {
-//     // go through the collisions and try to estimate the damage
-//     mass = (*it)->getEntityA()->getMass();
-//   }
-
 }
-
Index: branches/coll_rect/src/lib/collision_reaction/cr_object_damage.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/cr_object_damage.h	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/cr_object_damage.h	(revision 9889)
@@ -7,13 +7,17 @@
 #define _CR_OBJECT_DAMAGE_H
 
+
 #include "collision_reaction.h"
 
 
-class Collision;
+namespace CoRe
+{
 
-//! A class representing a reaction to a collision: dealing damage to an object
-class CRObjectDamage : public CollisionReaction
-{
-  ObjectListDeclaration(CRObjectDamage);
+  class Collision;
+
+  //! A class representing a reaction to a collision: dealing damage to an object
+  class CRObjectDamage : public CollisionReaction
+  {
+    ObjectListDeclaration(CRObjectDamage);
   public:
     CRObjectDamage();
@@ -24,5 +28,6 @@
   private:
 
-};
+  };
+}
 
 #endif /* _CR_OBJECT_DAMAGE_H */
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 9888)
+++ branches/coll_rect/src/lib/collision_reaction/cr_physics_full_walk.cc	(revision 9889)
@@ -33,196 +33,196 @@
 #include "cr_defs.h"
 
-
-
-ObjectListDefinition(CRPhysicsFullWalk);
-/**
- *  standard constructor
- */
-CRPhysicsFullWalk::CRPhysicsFullWalk ()
-    : CollisionReaction()
+namespace CoRe
 {
-  this->registerObject(this, CRPhysicsFullWalk::_objectList);
+
+  ObjectListDefinition(CRPhysicsFullWalk);
+  /**
+   *  standard constructor
+   */
+  CRPhysicsFullWalk::CRPhysicsFullWalk ()
+      : CollisionReaction()
+  {
+    this->registerObject(this, CRPhysicsFullWalk::_objectList);
+  }
+
+
+  /**
+   *  standard deconstructor
+   */
+  CRPhysicsFullWalk::~CRPhysicsFullWalk ()
+  {}
+
+
+  /**
+   * caluculates and applys the reaction to a specific collision
+   *  @param collision the collision
+   */
+  void CRPhysicsFullWalk::reactToCollision(Collision* collision)
+  {
+
+    AABB* box = collision->getEntityB()->getModelAABB();
+    WorldEntity* entity = collision->getEntityB();
+
+    if( box == NULL)
+    {
+      PRINTF(2)("this model has no aabb box so there is no correct collision reaction implemented. skipping\n");
+      return;
+    }
+
+
+    float CR_MAX_WALK_HEIGHT = 15.0f;
+    float CR_THRESHOLD = 0.2f;
+
+    float height = 0.0f;
+    float front = 0.0f;
+    float back = 0.0f;
+    float right = 0.0f;
+    float left = 0.0f;
+
+
+    const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents());
+    std::vector<CollisionEvent*>::const_iterator it = collisionEvents->begin();
+    for(; it != collisionEvents->end(); it++)
+    {
+
+      CollisionEvent* ce = (*it);
+      Vector normal = ce->getGroundNormal();
+
+      // calculate the collision position
+      Vector collPos =  collision->getEntityB()->getAbsCoor()  + box->center - ce->getCollisionPosition();
+
+      // test the 3 axis differently
+      switch( ce->getType())
+      {
+          /* collision in the X-AXIS */
+          case COLLISION_TYPE_AXIS_X:
+          front = collPos.len() - box->halfLength[0];
+
+          // object is beneath the plane (ground)
+          if( front <= 0.0f )
+          {
+            Vector dirX = entity->getAbsDirX();
+            dirX.y = 0.0f;
+            dirX.normalize();
+            Vector backoff = dirX * front;
+
+            entity->shiftCoor(backoff);
+          }
+          else if( ce->isInWall())
+          {
+            // object is already in the wall
+            entity->setAbsCoor(entity->getLastAbsCoor());
+          }
+          break;
+
+          case COLLISION_TYPE_AXIS_X_NEG:
+          back = collPos.len() - box->halfLength[0];
+
+          // object is beneath the plane (ground)
+          if( back <= 0.0f)
+          {
+            Vector dirX = entity->getAbsDirX();
+            dirX.y = 0.0f;
+            dirX.normalize();
+            Vector backoff = dirX * back * -1.0f;
+
+            entity->shiftCoor(backoff);
+          }
+          else if( ce->isInWall())
+          {
+            // object is already in the wall
+            entity->setAbsCoor(entity->getLastAbsCoor());
+          }
+          break;
+
+
+          /* collision in the Y-AXIS */
+          case COLLISION_TYPE_AXIS_Y_NEG:
+          // calulate the height above ground
+          height = collPos.len() - box->halfLength[1];
+
+
+          // object is beneath the plane (ground)
+          //         if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing
+          if( height < 0.0f && -height < CR_MAX_WALK_HEIGHT)
+          {
+            entity->shiftCoor(Vector(0.0f, -height + 0.00001, 0.0f));
+            entity->setOnGround(true);
+          }
+          // object is already in the wall
+          else if( ce->isInWall())
+          {
+            entity->setAbsCoor(entity->getLastAbsCoor());
+            PRINTF(0)("ground collision: reset pos\n");
+          }
+          else
+          {
+            // entity is not on ground
+            entity->setOnGround(false);
+          }
+          break;
+
+
+          /* collision in the Z-AXIS */
+          case COLLISION_TYPE_AXIS_Z:
+
+          right = collPos.len()  - box->halfLength[2];
+
+          // object is beneath the plane (ground)
+          if( right <= 0.0f )
+          {
+            Vector dirZ = entity->getAbsDirZ();
+            dirZ.y = 0.0f;
+            dirZ.normalize();
+            Vector backoff = dirZ * right;
+            entity->shiftCoor(backoff);
+          }
+          else if( ce->isInWall())
+          {
+            // object is already in the wall
+            entity->setAbsCoor(entity->getLastAbsCoor());
+          }
+          break;
+
+
+          // collision in the z-axis
+          case COLLISION_TYPE_AXIS_Z_NEG:
+
+          left = collPos.len()  - box->halfLength[2];
+
+          // object is beneath the plane (ground)
+          if( left <= 0.0f )
+          {
+            Vector dirZ = entity->getAbsDirZ();
+            dirZ.y = 0.0f;
+            dirZ.normalize();
+            Vector backoff = dirZ * left*-1.0f;
+            entity->shiftCoor(backoff);
+          }
+          // object is already in the wall
+          else if( ce->isInWall())
+          {
+            entity->setAbsCoor(entity->getLastAbsCoor());
+          }
+          break;
+      }
+    }
+    //PRINTF(0)("collision distances: x: %f, y: %f, z: %f\n", front, height, side);
+
+
+
+
+
+
+
+  }
+
+
+
+
+  /**
+   * use this to do some collision offline calculations, only called for bContinuousPoll == true
+   */
+  void CRPhysicsFullWalk::update(WorldEntity* owner)
+  {}
 }
-
-
-/**
- *  standard deconstructor
- */
-CRPhysicsFullWalk::~CRPhysicsFullWalk ()
-{}
-
-
-/**
- * caluculates and applys the reaction to a specific collision
- *  @param collision the collision
- */
-void CRPhysicsFullWalk::reactToCollision(Collision* collision)
-{
-
-  AABB* box = collision->getEntityB()->getModelAABB();
-  WorldEntity* entity = collision->getEntityB();
-
-  if( box == NULL)
-  {
-    PRINTF(2)("this model has no aabb box so there is no correct collision reaction implemented. skipping\n");
-    return;
-  }
-
-
-  float CR_MAX_WALK_HEIGHT = 15.0f;
-  float CR_THRESHOLD = 0.2f;
-
-  float height = 0.0f;
-  float front = 0.0f;
-  float back = 0.0f;
-  float right = 0.0f;
-  float left = 0.0f;
-
-
-  const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents());
-  std::vector<CollisionEvent*>::const_iterator it = collisionEvents->begin();
-  for(; it != collisionEvents->end(); it++)
-  {
-
-    CollisionEvent* ce = (*it);
-    Vector normal = ce->getGroundNormal();
-
-    // calculate the collision position
-    Vector collPos =  collision->getEntityB()->getAbsCoor()  + box->center - ce->getCollisionPosition();
-
-    // test the 3 axis differently
-    switch( ce->getType())
-    {
-        /* collision in the X-AXIS */
-      case COLLISION_TYPE_AXIS_X:
-        front = collPos.len() - box->halfLength[0];
-
-        // object is beneath the plane (ground)
-        if( front <= 0.0f )
-        {
-          Vector dirX = entity->getAbsDirX();
-          dirX.y = 0.0f;
-          dirX.normalize();
-          Vector backoff = dirX * front;
-
-          entity->shiftCoor(backoff);
-        }
-        else if( ce->isInWall())
-        {
-          // object is already in the wall
-          entity->setAbsCoor(entity->getLastAbsCoor());
-        }
-        break;
-
-      case COLLISION_TYPE_AXIS_X_NEG:
-        back = collPos.len() - box->halfLength[0];
-
-        // object is beneath the plane (ground)
-        if( back <= 0.0f)
-        {
-          Vector dirX = entity->getAbsDirX();
-          dirX.y = 0.0f;
-          dirX.normalize();
-          Vector backoff = dirX * back * -1.0f;
-
-          entity->shiftCoor(backoff);
-        }
-        else if( ce->isInWall())
-        {
-          // object is already in the wall
-          entity->setAbsCoor(entity->getLastAbsCoor());
-        }
-        break;
-
-
-        /* collision in the Y-AXIS */
-      case COLLISION_TYPE_AXIS_Y_NEG:
-        // calulate the height above ground
-        height = collPos.len() - box->halfLength[1];
-
-
-        // object is beneath the plane (ground)
-        //         if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing
-        if( height < 0.0f && -height < CR_MAX_WALK_HEIGHT)
-        {
-          entity->shiftCoor(Vector(0.0f, -height + 0.00001, 0.0f));
-          entity->setOnGround(true);
-        }
-        // object is already in the wall
-        else if( ce->isInWall())
-        {
-          entity->setAbsCoor(entity->getLastAbsCoor());
-          PRINTF(0)("ground collision: reset pos\n");
-        }
-        else
-        {
-          // entity is not on ground
-          entity->setOnGround(false);
-        }
-        break;
-
-
-        /* collision in the Z-AXIS */
-      case COLLISION_TYPE_AXIS_Z:
-
-        right = collPos.len()  - box->halfLength[2];
-
-        // object is beneath the plane (ground)
-        if( right <= 0.0f )
-        {
-          Vector dirZ = entity->getAbsDirZ();
-          dirZ.y = 0.0f;
-          dirZ.normalize();
-          Vector backoff = dirZ * right;
-          entity->shiftCoor(backoff);
-        }
-        else if( ce->isInWall())
-        {
-          // object is already in the wall
-          entity->setAbsCoor(entity->getLastAbsCoor());
-        }
-        break;
-
-
-        // collision in the z-axis
-      case COLLISION_TYPE_AXIS_Z_NEG:
-
-        left = collPos.len()  - box->halfLength[2];
-
-        // object is beneath the plane (ground)
-        if( left <= 0.0f )
-        {
-          Vector dirZ = entity->getAbsDirZ();
-          dirZ.y = 0.0f;
-          dirZ.normalize();
-          Vector backoff = dirZ * left*-1.0f;
-          entity->shiftCoor(backoff);
-        }
-        // object is already in the wall
-        else if( ce->isInWall())
-        {
-          entity->setAbsCoor(entity->getLastAbsCoor());
-        }
-        break;
-    }
-  }
-  //PRINTF(0)("collision distances: x: %f, y: %f, z: %f\n", front, height, side);
-
-
-
-
-
-
-
-}
-
-
-
-
-/**
- * use this to do some collision offline calculations, only called for bContinuousPoll == true
- */
-void CRPhysicsFullWalk::update(WorldEntity* owner)
-{}
-
-
Index: branches/coll_rect/src/lib/collision_reaction/cr_physics_full_walk.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/cr_physics_full_walk.h	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/cr_physics_full_walk.h	(revision 9889)
@@ -9,11 +9,13 @@
 #include "collision_reaction.h"
 
+namespace CoRe
+{
 
-class Collision;
+  class Collision;
 
-//! A class representing a reaction to a collision: dealing damage to an object
-class CRPhysicsFullWalk : public CollisionReaction
-{
-  ObjectListDeclaration(CRPhysicsFullWalk);
+  //! A class representing a reaction to a collision: dealing damage to an object
+  class CRPhysicsFullWalk : public CollisionReaction
+  {
+    ObjectListDeclaration(CRPhysicsFullWalk);
   public:
     CRPhysicsFullWalk();
@@ -27,5 +29,5 @@
   private:
     float        downspeed;
-};
-
+  };
+}
 #endif /* _CR_PHYSICS_FULL_WALK_H */
Index: branches/coll_rect/src/lib/collision_reaction/cr_physics_ground_walk.cc
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/cr_physics_ground_walk.cc	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/cr_physics_ground_walk.cc	(revision 9889)
@@ -34,99 +34,103 @@
 
 
+namespace CoRe
+{
 
-ObjectListDefinition(CRPhysicsGroundWalk);
-/**
- *  standard constructor
- */
-CRPhysicsGroundWalk::CRPhysicsGroundWalk ()
-    : CollisionReaction()
-{
-  this->registerObject(this, CRPhysicsGroundWalk::_objectList);
-}
+  ObjectListDefinition(CRPhysicsGroundWalk);
 
 
-/**
- *  standard deconstructor
- */
-CRPhysicsGroundWalk::~CRPhysicsGroundWalk ()
-{}
-
-
-/**
- * caluculates and applys the reaction to a specific collision
- *  @param collision the collision
- */
-void CRPhysicsGroundWalk::reactToCollision(Collision* collision)
-{
-
-  AABB* box = collision->getEntityB()->getModelAABB();
-  WorldEntity* entity = collision->getEntityB();
-
-  if( box == NULL)
+  /**
+   *  standard constructor
+   */
+  CRPhysicsGroundWalk::CRPhysicsGroundWalk ()
+      : CollisionReaction()
   {
-    PRINTF(2)("this model has no aabb box so there is no correct collision reaction implemented. skipping\n");
-    return;
+    this->registerObject(this, CRPhysicsGroundWalk::_objectList);
   }
 
 
-  float CR_MAX_WALK_HEIGHT = 15.0f;
-
-  float height = 0.0f;
+  /**
+   *  standard deconstructor
+   */
+  CRPhysicsGroundWalk::~CRPhysicsGroundWalk ()
+  {}
 
 
-  const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents());
-  std::vector<CollisionEvent*>::const_iterator it = collisionEvents->begin();
-  for(; it != collisionEvents->end(); it++)
+  /**
+   * caluculates and applys the reaction to a specific collision
+   *  @param collision the collision
+   */
+  void CRPhysicsGroundWalk::reactToCollision(Collision* collision)
   {
 
-    CollisionEvent* ce = (*it);
-    Vector normal = ce->getGroundNormal();
+    AABB* box = collision->getEntityB()->getModelAABB();
+    WorldEntity* entity = collision->getEntityB();
 
-    // calculate the collision position
-    Vector collPos =  collision->getEntityB()->getAbsCoor()  + box->center - ce->getCollisionPosition();
-
-    // test the 3 axis differently
-    switch( ce->getType())
+    if( box == NULL)
     {
-        /* collision in the Y-AXIS */
-      case COLLISION_TYPE_AXIS_Y_NEG:
-        // calulate the height above ground
-        height = collPos.len() - box->halfLength[1];
+      PRINTF(2)("this model has no aabb box so there is no correct collision reaction implemented. skipping\n");
+      return;
+    }
 
 
-        // object is beneath the plane (ground)
-        //         if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing
-        if( height < 0.0f && -height < CR_MAX_WALK_HEIGHT)
-        {
-          entity->shiftCoor(Vector(0.0f, -height + 0.00001, 0.0f));
-          entity->setOnGround(true);
-        }
-        // object is already in the wall
-        else if( ce->isInWall())
-        {
-          entity->setAbsCoor(entity->getLastAbsCoor());
-        }
-        else
-        {
-          // entity is not on ground
-          entity->setOnGround(false);
-        }
-        break;
+    float CR_MAX_WALK_HEIGHT = 15.0f;
+
+    float height = 0.0f;
 
 
+    const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents());
+    std::vector<CollisionEvent*>::const_iterator it = collisionEvents->begin();
+    for(; it != collisionEvents->end(); it++)
+    {
+
+      CollisionEvent* ce = (*it);
+      Vector normal = ce->getGroundNormal();
+
+      // calculate the collision position
+      Vector collPos =  collision->getEntityB()->getAbsCoor()  + box->center - ce->getCollisionPosition();
+
+      // test the 3 axis differently
+      switch( ce->getType())
+      {
+          /* collision in the Y-AXIS */
+          case COLLISION_TYPE_AXIS_Y_NEG:
+          // calulate the height above ground
+          height = collPos.len() - box->halfLength[1];
+
+
+          // object is beneath the plane (ground)
+          //         if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing
+          if( height < 0.0f && -height < CR_MAX_WALK_HEIGHT)
+          {
+            entity->shiftCoor(Vector(0.0f, -height + 0.00001, 0.0f));
+            entity->setOnGround(true);
+          }
+          // object is already in the wall
+          else if( ce->isInWall())
+          {
+            entity->setAbsCoor(entity->getLastAbsCoor());
+          }
+          else
+          {
+            // entity is not on ground
+            entity->setOnGround(false);
+          }
+          break;
+
+
+      }
     }
+    //PRINTF(0)("collision distances: x: %f, y: %f, z: %f\n", front, height, side);
+
   }
-  //PRINTF(0)("collision distances: x: %f, y: %f, z: %f\n", front, height, side);
-
-}
 
 
 
 
-/**
- * use this to do some collision offline calculations, only called for bContinuousPoll == true
- */
-void CRPhysicsGroundWalk::update(WorldEntity* owner)
-{}
+  /**
+   * use this to do some collision offline calculations, only called for bContinuousPoll == true
+   */
+  void CRPhysicsGroundWalk::update(WorldEntity* owner)
+  {}
 
-
+}
Index: branches/coll_rect/src/lib/collision_reaction/cr_physics_ground_walk.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/cr_physics_ground_walk.h	(revision 9888)
+++ branches/coll_rect/src/lib/collision_reaction/cr_physics_ground_walk.h	(revision 9889)
@@ -9,11 +9,13 @@
 #include "collision_reaction.h"
 
+namespace CoRe
+{
 
-class Collision;
+  class Collision;
 
-//! A class representing a reaction to a collision: dealing damage to an object
-class CRPhysicsGroundWalk : public CollisionReaction
-{
-  ObjectListDeclaration(CRPhysicsGroundWalk);
+  //! A class representing a reaction to a collision: dealing damage to an object
+  class CRPhysicsGroundWalk : public CollisionReaction
+  {
+    ObjectListDeclaration(CRPhysicsGroundWalk);
   public:
     CRPhysicsGroundWalk();
@@ -27,5 +29,6 @@
   private:
     float        downspeed;
-};
+  };
 
+}
 #endif /* _CR_PHYSICS_GROUND_WALK_H */
