Index: /orxonox/branches/physics/src/util/physics/i_physics.cc
===================================================================
--- /orxonox/branches/physics/src/util/physics/i_physics.cc	(revision 4120)
+++ /orxonox/branches/physics/src/util/physics/i_physics.cc	(revision 4121)
@@ -19,5 +19,6 @@
 
 #include "i_physics.h"
-
+#include "list.h"
+#include "string.h"
 #include "stdincl.h"
 
@@ -31,4 +32,6 @@
 {
    this->setClassName ("IPhysics");
+   this->mass = 0;
+   this->massChildren = 0;
 }
 
@@ -42,2 +45,46 @@
   // delete what has to be deleted here
 }
+
+
+
+void IPhysics::setMass( float mass )
+{
+	this->mass = mass;
+}
+
+float IPhysics::getMass( void ) const
+{
+	return this->mass;
+}
+
+float IPhysics::getTotalMass( void ) const
+{
+	return (this->mass + this->massChildren);
+}
+
+void IPhysics::recalcMass()
+{
+	float massSum = 0;
+	
+	tIterator<PNode>* iterator = this->children->getIterator();
+	PNode* pn = iterator->nextElement();
+	while( pn != NULL) 
+    { 
+    	// todo: find out if children are IPhysics in an efficient way
+    	if (strcmp( pn->getClassName(), "IPhysics")) {
+			massSum += ((IPhysics*)pn)->getTotalMass();
+    	}
+      pn = iterator->nextElement();
+    }
+	delete iterator;
+	
+	if (massSum != this->massChildren ) {
+		this->massChildren = massSum;
+		if (strcmp( parent->getClassName(), "IPhysics"))
+			((IPhysics*)parent)->recalcMass();
+	} else {
+		this->massChildren = massSum;
+	}
+}
+	
+	
Index: /orxonox/branches/physics/src/util/physics/i_physics.h
===================================================================
--- /orxonox/branches/physics/src/util/physics/i_physics.h	(revision 4120)
+++ /orxonox/branches/physics/src/util/physics/i_physics.h	(revision 4121)
@@ -1,5 +1,5 @@
 /*! 
     \file i_physics.h
-    \brief a physics interface
+    \brief a physics interface simulating a body with a mass
 */
 
@@ -7,7 +7,5 @@
 #define _I_PHYSICS_H
 
-#include "base_object.h"
-
-
+#include "p_node.h"
 
 //! A Physics interface
@@ -15,12 +13,22 @@
    here can be some longer description of this class
 */
-class IPhysics : public BaseObject {
+class IPhysics : public PNode {
 
  public:
   IPhysics();
   virtual ~IPhysics();
+  
+  void setMass( float mass );		//!< Set the mass of this node
+  float getMass( void ) const;		//!< Get the mass of this node
+  float getTotalMass( void ) const; //!< Get the sum of the masses of this node and all subnodes
+
+ protected:
+  void recalcMass();	//!< Recalculate the mass of the children
+  float mass;			//!< Mass of this node
+  float massChildren;	//!< Sum of the masses of the children nodes
+  
 
  private:
-
+	
 
 };
Index: /orxonox/branches/physics/src/util/physics/physics_engine.cc
===================================================================
--- /orxonox/branches/physics/src/util/physics/physics_engine.cc	(revision 4121)
+++ /orxonox/branches/physics/src/util/physics/physics_engine.cc	(revision 4121)
@@ -0,0 +1,53 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   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: ...
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+
+#include "physics_engine.h"
+
+#include "stdincl.h" // maybe
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+   \todo this constructor is not jet implemented - do it
+*/
+PhysicsEngine::PhysicsEngine () 
+{
+   this->setClassName ("PhysicsEngine");
+}
+
+
+/**
+   \brief standard deconstructor
+
+*/
+PhysicsEngine::~PhysicsEngine () 
+{
+  // delete what has to be deleted here
+}
+
+/**
+   \brief nonsense - delete this method
+   \param realy nothing to give
+   \returns true or false - probably nothing?
+
+   this is just to show the doxygen abilities (this for example is an extension for a long comment)
+*/
+bool PhysicsEngine::doNonSense (int nothing) {}
Index: /orxonox/branches/physics/src/util/physics/physics_engine.h
===================================================================
--- /orxonox/branches/physics/src/util/physics/physics_engine.h	(revision 4121)
+++ /orxonox/branches/physics/src/util/physics/physics_engine.h	(revision 4121)
@@ -0,0 +1,38 @@
+/*! 
+    \file physics_engine.h
+    \brief Definition of the proto class template, used quickly start work
+    \todo Example: this shows how to use simply add a Marker that here has to be done something.
+
+    The PhysicsEngine exists, to help you quikly getting the run for how to develop in orxonox.
+    It is an example for the CODING-CONVENTION, and a starting-point for every class.
+*/
+
+#ifndef _PHYSICS_ENGINE_H
+#define _PHYSICS_ENGINE_H
+
+#include "base_object.h"
+
+// FORWARD DEFINITION \\
+class someClassWeNeed;
+
+
+/*class Test;*/ /* forward definition of class Test (without including it here!)*/
+
+//! A default class that aids you to start creating a new class
+/**
+   here can be some longer description of this class
+*/
+class PhysicsEngine : public BaseObject {
+
+ public:
+  PhysicsEngine();
+  virtual ~PhysicsEngine();
+
+  bool doNonSense (int nothing);
+
+ private:
+  int nonSense;  //!< doxygen tag here like this for all the variables - delete this variable if you use this
+
+};
+
+#endif /* _PHYSICS_ENGINE_H */
Index: xonox/branches/physics/src/util/physics/physics_enginge.cc
===================================================================
--- /orxonox/branches/physics/src/util/physics/physics_enginge.cc	(revision 4120)
+++ 	(revision )
@@ -1,53 +1,0 @@
-
-
-/* 
-   orxonox - the future of 3D-vertical-scrollers
-
-   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: ...
-   co-programmer: ...
-*/
-
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
-
-#include "proto_class.h"
-
-#include "stdincl.h" // maybe
-
-using namespace std;
-
-
-/**
-   \brief standard constructor
-   \todo this constructor is not jet implemented - do it
-*/
-ProtoClass::ProtoClass () 
-{
-   this->setClassName ("ProtoClass");
-}
-
-
-/**
-   \brief standard deconstructor
-
-*/
-ProtoClass::~ProtoClass () 
-{
-  // delete what has to be deleted here
-}
-
-/**
-   \brief nonsense - delete this method
-   \param realy nothing to give
-   \returns true or false - probably nothing?
-
-   this is just to show the doxygen abilities (this for example is an extension for a long comment)
-*/
-bool ProtoClass::doNonSense (int nothing) {}
Index: xonox/branches/physics/src/util/physics/physics_enginge.h
===================================================================
--- /orxonox/branches/physics/src/util/physics/physics_enginge.h	(revision 4120)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*! 
-    \file proto_class.h
-    \brief Definition of the proto class template, used quickly start work
-    \todo Example: this shows how to use simply add a Marker that here has to be done something.
-
-    The Protoclass exists, to help you quikly getting the run for how to develop in orxonox.
-    It is an example for the CODING-CONVENTION, and a starting-point for every class.
-*/
-
-#ifndef _PROTO_CLASS_H
-#define _PROTO_CLASS_H
-
-#include "what realy has to be included"
-#include "base_object.h"
-
-// FORWARD DEFINITION \\
-class someClassWeNeed;
-
-
-/*class Test;*/ /* forward definition of class Test (without including it here!)*/
-
-//! A default class that aids you to start creating a new class
-/**
-   here can be some longer description of this class
-*/
-class ProtoClass : public BaseObject {
-
- public:
-  ProtoClass();
-  virtual ~ProtoClass();
-
-  bool doNonSense (int nothing);
-
- private:
-  int nonSense;  //!< doxygen tag here like this for all the variables - delete this variable if you use this
-
-};
-
-#endif /* _PROTO_CLASS_H */
