Index: code/branches/physics/src/orxonox/objects/PhysicsTest.cc
===================================================================
--- code/branches/physics/src/orxonox/objects/PhysicsTest.cc	(revision 1932)
+++ code/branches/physics/src/orxonox/objects/PhysicsTest.cc	(revision 1933)
@@ -34,4 +34,5 @@
 #include <OgreEntity.h>
 #include "ogreode/OgreOde_Core.h"
+#include "ogreode/OgreOdeGeometry.h"
 #include "util/Convert.h"
 #include "core/CoreIncludes.h"
@@ -99,5 +100,5 @@
         // set up stepper
 
-        const Ogre::Real _time_step = 0.5;
+        const Ogre::Real _time_step = 0.5;http://isg.ee.ethz.ch/
         const Ogre::Real time_scale = Ogre::Real(1.7);
         const Ogre::Real max_frame_time = Ogre::Real(1.0 / 4);
@@ -110,4 +111,9 @@
         odeGround_ = new OgreOde::InfinitePlaneGeometry(Ogre::Plane(Ogre::Vector3(0,1,0),0),
             odeWorld_, odeWorld_->getDefaultSpace());
+
+	CollidingObject* collidingObject = new CollidingObject();
+       
+	odeGround_->setUserObject(static_cast<CollisionTestedObject*>(collidingObject));
+
         // Use a load of meshes to represent the floor
         int i = 0;
@@ -128,5 +134,6 @@
                 floor->addEntity(entity, Ogre::Vector3(x,0,z));
             }
-        }
+        }       
+
         floor->build();
 
@@ -156,4 +163,6 @@
         odeGeom_->setBody(odeBody_);
         entity_->setUserObject(odeGeom_);
+        odeGeom_->setUserObject(static_cast<CollisionTestedObject*>(this));
+
 
         odeBody_->setOrientation(Quaternion(Degree(30.0), Vector3(0,0,0)));
@@ -168,3 +177,50 @@
             odeWorld_->synchronise();
     }
+
+    bool PhysicsTest::collision(OgreOde::Contact *Contact)
+    {
+    	// Check for collisions between things that are connected and ignore them
+       	OgreOde::Geometry * const g1 = Contact->getFirstGeometry();
+       	OgreOde::Geometry * const g2 = Contact->getSecondGeometry();
+
+       	if (g1 && g2)
+       	{
+       		const OgreOde::Body * const b1 = g2->getBody();
+       		const OgreOde::Body * const  b2 = g1->getBody();
+       		if (b1 && b2 && OgreOde::Joint::areConnected(b1, b2)) 
+                  return false; 
+       	}
+       
+       	//set contact parameters:
+       	Contact->setBouncyness(1.0);
+       	Contact->setCoulombFriction(OgreOde::Utility::Infinity);
+       	Contact->setForceDependentSlip(1.0);
+       	Contact->setAdditionalFDS(1.0);
+       
+       	/*we have 2 collidable objects from our object system, if one of the Collide function returns false, e return false in this method, too, else we return true, so ode computes a normal collision.
+        true means ode will treat this like a normal collison => rigid body behavior
+        false means ode will not treat this collision at all => objects ignore each other*/
+        	
+        bool Return = true;
+        	
+        if (g1->getUserObject())
+        	if (!static_cast<CollisionTestedObject*>(g1->getUserObject())->Collide(true, Contact))
+        		Return = false;
+        
+        if (g2->getUserObject())
+        	if (!static_cast<CollisionTestedObject*>(g2->getUserObject())->Collide(false, Contact))
+        		Return = false;
+        
+        return Return;
+    }
+
+        bool CollidingObject::Collide(bool MineIsFirst, OgreOde::Contact *Contact)
+        {
+        	Contact->setForceDependentSlip(Contact->getForceDependentSlip() * ForceDependentSlip);
+        	Contact->setAdditionalFDS(Contact->getForceDependentSlip2() * ForceDependentSlip);
+        	Contact->setCoulombFriction(Contact->getCoulombFrictionMu() * Friction);
+        	Contact->setBouncyness(Contact->getBouncyness() * Bouncyness, Contact->getBouncynessVelocity() * BounceVelocity);
+        	return true;
+        }
+
 }
Index: code/branches/physics/src/orxonox/objects/PhysicsTest.h
===================================================================
--- code/branches/physics/src/orxonox/objects/PhysicsTest.h	(revision 1932)
+++ code/branches/physics/src/orxonox/objects/PhysicsTest.h	(revision 1933)
@@ -64,5 +64,50 @@
         bool                            bRunning_;
     };
+
+
+   class _OrxonoxExport CollisionTestedObject
+   {
+        public:
+        	CollisionTestedObject(void);
+        	virtual ~CollisionTestedObject(void);
+        	virtual bool Collide(bool MineIsFirst, OgreOde::Contact *Contact) = 0;
+   };
+
+   class _OrxonoxExport CollidingObject : public virtual CollisionTestedObject
+   {
+        protected:
+               float Friction;
+        	float Bouncyness;
+        	float BounceVelocity;
+        	float ForceDependentSlip;
+        
+        public:
+        	CollidingObject(void);
+        	virtual ~CollidingObject(void);
+        
+        //	bool virtual WriteToIni(IniFile& Ini)	const;
+        //	bool virtual LoadFromIni(const std::basic_string<wchar_t>& ObjectID, IniFile& Ini);
+        
+        	float GetFriction(void)			const	{return Friction;}
+        	float GetBouncyness(void)		const	{return Bouncyness;}
+        	float GetBounceVelocity(void)		const	{return BounceVelocity;}
+        	float GetFDS(void)			const	{return ForceDependentSlip;}
+        
+        	virtual bool Collide(bool MineIsFirst, OgreOde::Contact *Contact);
+        
+        private:
+        	static const wchar_t* KEY_FRICTION;
+        	static const float DEF_FRICTION;
+        	static const wchar_t* KEY_BOUNCYNESS;
+        	static const float DEF_BOUNCYNESS;
+        	static const wchar_t* KEY_FDS;
+        	static const float DEF_FDS;
+        	static const wchar_t* KEY_BOUNCE_VELO;
+        	static const float DEF_BOUNCE_VELO;
+   };
+
 }
 
+
+
 #endif /* _PhysicsTest_H__ */
