Index: /branches/coll_rect/src/lib/collision_reaction/Makefile.am
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/Makefile.am	(revision 9893)
+++ /branches/coll_rect/src/lib/collision_reaction/Makefile.am	(revision 9894)
@@ -8,5 +8,5 @@
                      collision.cc \
                      collision_event.cc \
-                     collision_handle.cc \
+                     collision_filter.cc \
                      collision_reaction.cc \
                      cr_object_damage.cc \
@@ -20,5 +20,5 @@
                      collision.h \
                      collision_event.h \
-                     collision_handle.h \
+                     collision_filter.h \
                      cr_defs.h \
                      collision_reaction.h \
Index: /branches/coll_rect/src/lib/collision_reaction/collision_filter.cc
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/collision_filter.cc	(revision 9894)
+++ /branches/coll_rect/src/lib/collision_reaction/collision_filter.cc	(revision 9894)
@@ -0,0 +1,250 @@
+/*
+   orxonox - the future of 3D-vertical-scrollersf
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION_REACTION
+
+#include "collision_handle.h"
+
+#include "world_entity.h"
+
+#include "collision.h"
+#include "collision_event.h"
+#include "collision_reaction.h"
+
+#include "cr_object_damage.h"
+#include "cr_physics_ground_walk.h"
+#include "cr_physics_full_walk.h"
+
+#include "debug.h"
+
+namespace CoRe
+{
+
+  ObjectListDefinition(CollisionHandle);
+
+  /**
+   * standard constructor
+   * @todo this constructor is not jet implemented - do it
+  */
+  CollisionHandle::CollisionHandle (WorldEntity* owner, CREngine::ReactionType 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());
+  }
+
+
+  /**
+   * handles the collisions and react according to algorithm
+   */
+  void CollisionHandle::handleCollisions()
+  {
+    // if continuous 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_filter.h
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/collision_filter.h	(revision 9894)
+++ /branches/coll_rect/src/lib/collision_reaction/collision_filter.h	(revision 9894)
@@ -0,0 +1,75 @@
+/*!
+ * @file collision_handle.h
+ * @brief Definition of a collision handle: used for accessing per world entity collision events and reactions
+*/
+
+#ifndef _COLLISION_HANDLE_H
+#define _COLLISION_HANDLE_H
+
+#include "base_object.h"
+#include "cr_engine.h"
+
+#include <vector>
+#include <list>
+
+
+class Collision;
+class WorldEntity;
+
+namespace CoRe
+{
+
+  class CollisionReaction;
+
+
+
+  //! A class for defining collision reactions and storing events
+  class CollisionHandle : public BaseObject
+  {
+    ObjectListDeclaration(CollisionHandle);
+
+  public:
+    CollisionHandle(WorldEntity* owner, CREngine::ReactionType type);
+    virtual ~CollisionHandle();
+
+    void reset();
+
+    void addTarget(const ClassID& target);
+
+    /** @returns true if regiestered some new collision events in this tick frame */
+    inline bool isCollided() const { return this->bCollided; }
+    /** @returns true if this collision handle has already been dispatched */
+    inline bool isDispatched() const { return this->bDispatched; }
+    /** @returns true if this handle should be pulled also if there are no collisions */
+    inline bool isContinuousPoll() const { return this->bContinuousPoll; }
+    /** @returns the type */
+    inline CREngine::ReactionType getType() const { return this->type; }
+
+    void handleCollisions();
+
+
+  private:
+    void flushCollisions();
+    bool filterCollisionEvent(CollisionEvent* collisionEvent);
+    bool filterCollision(Collision* collision);
+
+
+
+  private:
+    WorldEntity*                  owner;                   //!< the worldenity this reaction will be applied on
+    CREngine::ReactionType              type;                    //!< the reaction type
+
+    bool                          bContinuousPoll;         //!< if this is true
+    bool                          bDispatched;             //!< true if this handle has already been dispatched
+    bool                          bStopOnFirstCollision;   //!< true if the cd of this object should be terminated after one match
+    bool                          bCollided;               //!< true if the CollsionHandle has registered some new collisions
+
+    std::vector<Collision*>       collisionList;           //!< a list full of collisions
+    std::vector<ClassID>          targetList;              //!< a list of target classes for filtering @TODO TAKE SET INSTEAD OF VECTOR HERE
+
+    CollisionReaction*            collisionReaction;       //!< reference to the collision reaction object
+
+  };
+
+}
+#endif /* _COLLISION_HANDLE_H */
Index: anches/coll_rect/src/lib/collision_reaction/collision_handle.cc
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/collision_handle.cc	(revision 9893)
+++ 	(revision )
@@ -1,250 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollersf
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: Patrick Boenzli
-*/
-
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION_REACTION
-
-#include "collision_handle.h"
-
-#include "world_entity.h"
-
-#include "collision.h"
-#include "collision_event.h"
-#include "collision_reaction.h"
-
-#include "cr_object_damage.h"
-#include "cr_physics_ground_walk.h"
-#include "cr_physics_full_walk.h"
-
-#include "debug.h"
-
-namespace CoRe
-{
-
-  ObjectListDefinition(CollisionHandle);
-
-  /**
-   * standard constructor
-   * @todo this constructor is not jet implemented - do it
-  */
-  CollisionHandle::CollisionHandle (WorldEntity* owner, CREngine::ReactionType 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());
-  }
-
-
-  /**
-   * handles the collisions and react according to algorithm
-   */
-  void CollisionHandle::handleCollisions()
-  {
-    // if continuous 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: anches/coll_rect/src/lib/collision_reaction/collision_handle.h
===================================================================
--- /branches/coll_rect/src/lib/collision_reaction/collision_handle.h	(revision 9893)
+++ 	(revision )
@@ -1,75 +1,0 @@
-/*!
- * @file collision_handle.h
- * @brief Definition of a collision handle: used for accessing per world entity collision events and reactions
-*/
-
-#ifndef _COLLISION_HANDLE_H
-#define _COLLISION_HANDLE_H
-
-#include "base_object.h"
-#include "cr_engine.h"
-
-#include <vector>
-#include <list>
-
-
-class Collision;
-class WorldEntity;
-
-namespace CoRe
-{
-
-  class CollisionReaction;
-
-
-
-  //! A class for defining collision reactions and storing events
-  class CollisionHandle : public BaseObject
-  {
-    ObjectListDeclaration(CollisionHandle);
-
-  public:
-    CollisionHandle(WorldEntity* owner, CREngine::ReactionType type);
-    virtual ~CollisionHandle();
-
-    void reset();
-
-    void addTarget(const ClassID& target);
-
-    /** @returns true if regiestered some new collision events in this tick frame */
-    inline bool isCollided() const { return this->bCollided; }
-    /** @returns true if this collision handle has already been dispatched */
-    inline bool isDispatched() const { return this->bDispatched; }
-    /** @returns true if this handle should be pulled also if there are no collisions */
-    inline bool isContinuousPoll() const { return this->bContinuousPoll; }
-    /** @returns the type */
-    inline CREngine::ReactionType getType() const { return this->type; }
-
-    void handleCollisions();
-
-
-  private:
-    void flushCollisions();
-    bool filterCollisionEvent(CollisionEvent* collisionEvent);
-    bool filterCollision(Collision* collision);
-
-
-
-  private:
-    WorldEntity*                  owner;                   //!< the worldenity this reaction will be applied on
-    CREngine::ReactionType              type;                    //!< the reaction type
-
-    bool                          bContinuousPoll;         //!< if this is true
-    bool                          bDispatched;             //!< true if this handle has already been dispatched
-    bool                          bStopOnFirstCollision;   //!< true if the cd of this object should be terminated after one match
-    bool                          bCollided;               //!< true if the CollsionHandle has registered some new collisions
-
-    std::vector<Collision*>       collisionList;           //!< a list full of collisions
-    std::vector<ClassID>          targetList;              //!< a list of target classes for filtering @TODO TAKE SET INSTEAD OF VECTOR HERE
-
-    CollisionReaction*            collisionReaction;       //!< reference to the collision reaction object
-
-  };
-
-}
-#endif /* _COLLISION_HANDLE_H */
