Index: orxonox/trunk/src/lib/coord/p_node.cc
===================================================================
--- orxonox/trunk/src/lib/coord/p_node.cc	(revision 3811)
+++ orxonox/trunk/src/lib/coord/p_node.cc	(revision 3813)
@@ -67,5 +67,5 @@
   }
   else 
-    this->relCoordinate = new Vector(0,0,0);
+    this->relCoordinate = new Vector();
 }
 
@@ -106,4 +106,5 @@
   this->parent = parent; 
   this->objectName = NULL;
+  this->time = 1.0; /* set time to 1 to make divisions by zero impossible */
 
   this->absCoordinate = new Vector();
@@ -167,18 +168,5 @@
 
 
-/**
-   \param absCoord set absolute coordinate
-
-   it is very importand, that you use this function, if you want to update the
-   absCoordinates. If you don't use this, the PNode won't recognize, that something
-   has changed and won't update the children Nodes.
-*/
-/*
-void PNode::setAbsCoor (Vector* absCoord)
-{
-  this->bAbsCoorChanged = true;
-  *this->absCoordinate = *absCoord;
-}
-*/
+
 
 
@@ -217,40 +205,4 @@
 
 */
-/*
-void PNode::shiftCoor (Vector* shift)
-{
-  __UNLIKELY_IF( this->bAbsCoorChanged)
-    {
-      *this->absCoordinate = *this->absCoordinate + *shift;
-    }
-  else 
-    {
-      *this->relCoordinate = *this->relCoordinate + *shift;
-      this->bRelCoorChanged = true;
-    }
-}
-*/
-
-
-/**
-   \brief shift coordinate (abs and rel)
-   \param shift vector
-
-   this function shifts the current coordinates about the vector shift. this is
-   usefull because from some place else you can:
-   PNode* someNode = ...;
-   Vector objectMovement = calculateShift();
-   someNode->shiftCoor(objectMovement);
-
-   elsewhere you would have to:
-   PNode* someNode = ...;
-   Vector objectMovement = calculateShift();
-   Vector currentCoor = someNode->getRelCoor();
-   Vector newCoor = currentCoor + objectMovement;
-   someNode->setRelCoor(newCoor);
-   
-   yea right... shorter...
-
-*/
 void PNode::shiftCoor (const Vector& shift)
 {
@@ -285,13 +237,4 @@
    has changed and won't update the children Nodes.
 */
-/*
-void PNode::setRelDir (Quaternion* relDir)
-{
-  this->bRelCoorChanged = true;
-  *this->relDirection = *relDir;
-}
-*/
-
-
 void PNode::setRelDir (const Quaternion& relDir)
 {
@@ -306,22 +249,4 @@
 */
 //Quaternion PNode::getAbsDir () const
-
-
-
-/**
-   \brief sets the absolute direction (0,0,1)
-   \param absDir absolute coordinates
-
-   it is very importand, that you use this function, if you want to update the
-   absDirection. If you don't use this, the PNode won't recognize, that something
-   has changed and won't update the children Nodes.
-*/
-/*
-void PNode::setAbsDir (Quaternion* absDir)
-{
-  this->bAbsDirChanged = true;
-  *this->absDirection = *absDir;
-}
-*/
 
 
@@ -371,30 +296,4 @@
 
 
-/**
-   \brief shift coordinate (abs and rel)
-   \param shift vector
-
-   this function shifts the current coordinates about the vector shift. this is
-   usefull because from some place else you can:
-   PNode* someNode = ...;
-   Quaternion objectMovement = calculateShift();
-   someNode->shiftCoor(objectMovement);
-
-   elsewhere you would have to:
-   PNode* someNode = ...;
-   Quaternion objectMovement = calculateShift();
-   Quaternion currentCoor = someNode->getRelCoor();
-   Quaternion newCoor = currentCoor + objectMovement;
-   someNode->setRelCoor(newCoor);
-   
-   yea right... shorter...
-
-   \todo implement this
-*/
-/*
-void PNode::shiftDir (Quaternion* shift)
-{}
-*/
-
 
 /**
@@ -403,6 +302,4 @@
 float PNode::getSpeed() const
 {
-  __UNLIKELY_IF( this->time == 0)
-    return 1000;
   *this->diffCoordinate = *this->absCoordinate - *this->lastAbsCoordinate;
   return this->diffCoordinate->len() / this->time;
@@ -419,6 +316,5 @@
 void PNode::addChild (PNode* pNode, int parentingMode)
 {
-
-  __UNLIKELY_IF( pNode->parent != NULL)
+  __LIKELY_IF( pNode->parent != NULL)
     {
       PRINTF(3)("PNode::addChild() - reparenting node: removing it and adding it again\n");
@@ -459,5 +355,4 @@
   while( pn != NULL) 
     { 
-      //this->children->remove(pn);
       nullParent->addChild(pn, pn->getMode());
       pn = iterator->nextElement();
@@ -504,8 +399,10 @@
    will force an update of the coordinated of the node.
 */
+/*
 void PNode::parentCoorChanged ()
 {
   this->bRelCoorChanged = true;
 }
+*/
 
 
@@ -516,8 +413,10 @@
    will force an update of the direction of the node.
 */
+/*
 void PNode::parentDirChanged ()
 {
   this->bRelDirChanged = true;
 }
+*/
 
 
