Index: trunk/src/lib/coord/p_node.h
===================================================================
--- trunk/src/lib/coord/p_node.h	(revision 6038)
+++ trunk/src/lib/coord/p_node.h	(revision 6042)
@@ -1,5 +1,5 @@
 /*!
  * @file p_node.h
- * @brief  Definition of a parenting node
+ * @brief Definition of THE Parenting Node
  *
  *  parenting is how coordinates are handled in orxonox, meaning, that all coordinates
@@ -10,6 +10,6 @@
  *  absCoordinate, absDirection have to be recalculated as soon as there was a change in
  *  place or ortientation. this is only the case if
- *  o bDirChanged is true (so changed) AND timeStamp != now
- *  o bCoorChanged is true (so moved) AND timeStamp != now
+ *  o bRelCoorChanged is true (so moved)
+ *  o bRelDirChanged is true (so changed)
  *  this conditions make it cheaper to recalculate the tree (reduces redundant work).
  */
@@ -20,4 +20,5 @@
 
 #include "base_object.h"
+
 #include "vector.h"
 #include <list>
@@ -25,5 +26,4 @@
 // FORWARD DECLARATION
 class TiXmlElement;
-template<class T> class tList;
 
 #define PNODE_ITERATION_DELTA    .001
@@ -32,28 +32,37 @@
 {
   // PARENTAL FOLLOWING
-  PNODE_LOCAL_ROTATE                   = 0x00000001,    //!< Rotates all the children around their centers.
-  PNODE_ROTATE_MOVEMENT                = 0x00000002,    //!< Moves all the children around the center of their parent, without the rotation around their own centers.
+  PNODE_LOCAL_ROTATE                   = 0x0001,    //!< Rotates all the children around their centers.
+  PNODE_ROTATE_MOVEMENT                = 0x0002,    //!< Moves all the children around the center of their parent, without the rotation around their own centers.
 
-  PNODE_MOVEMENT                       = 0x00000004,    //!< Moves all children along with the parent.
-// special linkage modes
-  PNODE_ALL                            = 0x00000003,    //!< Moves all children around the center of their parent, and also rotates their centers
-  PNODE_ROTATE_AND_MOVE                = 0x00000005,    //!< Rotates all children around their axis, and moves them as the Parent Moves, but does not rotate around the center of their parent.
+  PNODE_MOVEMENT                       = 0x0004,    //!< Moves all children along with the parent.
+  // special linkage modes
+  PNODE_ALL                            = 0x0003,    //!< Moves all children around the center of their parent, and also rotates their centers
+  PNODE_ROTATE_AND_MOVE                = 0x0005,    //!< Rotates all children around their axis, and moves them as the Parent Moves, but does not rotate around the center of their parent.
 
 
-  PNODE_INACTIVE_NODE                  = 0x00000010,    //!< If the node is Active (if not, it and its child wont be updated).
-
   // REPARENTING
-  PNODE_REPARENT_TO_NULLPARENT         = 0x00000100,
-  PNODE_REPARENT_KEEP_POSITION         = 0x00000200,
+  PNODE_REPARENT_TO_NULLPARENT         = 0x0010,    //!< Reparents to the NullParent, if the Parent is Removed.
+  PNODE_REPARENT_TO_PARANTS_PARENT     = 0x0020,    //!< Reparents the Node to the parents (old) parent it the parent gets removed.
+  PNODE_REPARENT_DELETE_CHILDREN       = 0x0040,    //!< Deletes the Children of the node when This Node is Removed. (Use with care).
+  PNODE_REPARENT_KEEP_POSITION         = 0x0080,    //!< Tries to keep the Position if the Node is reparented.
 
 
   // DELETION
-  PNODE_PROHIBIT_CHILD_DELETE          = 0x00010000,
-  PNODE_PROHIBIT_DELETE_WITH_PARENT    = 0x00020000,
+  PNODE_PROHIBIT_CHILD_DELETE          = 0x0100,    //!< Prohibits the Children from being deleted if this Node gets deleted.
+  PNODE_PROHIBIT_DELETE_WITH_PARENT    = 0x0200,    //!< Prohibits the Node to be deleted if the Parent is. Child will be reparented according to the Repaenting-Rules
+  PNODE_REPARENT_CHILDREN_ON_DELETE    = 0x0400,    //!< Reparents the Children of the Node to 
+  PNODE_REPARANT_CHILDREN_ON_REMOVE    = 0x0800,    //!< Reparents the Children of the Node if the Node gets Removed.
+
+  // VISIBILITY/ACTIVITY
+  PNODE_HIDE_CHILDREN_IF_HIDDEN        = 0x1000,    //!< Prohibits the Children from being drawn if this node isn't visible. (used for Draw))
+  PNODE_HIDE_IF_PARENT_HIDDEN          = 0x2000,    //!< Prohibits the node from being drawn if the Parent is invisible.
+  PNODE_UPDATE_CHILDREN_IF_INACTIVE    = 0x4000,    //!< Updates the Children of this Node even if the Parent is Inactive (note if this's parent is inactive children won't be updated.)
+  PNODE_STATIC_NODE                    = 0x8000,    //!< Used for nodes that do not have any moving children, and that do not move.
 
 } PARENT_MODE;
 
 //! The default mode of the translation-binding.
-#define PNODE_PARENT_MODE_DEFAULT PNODE_ALL | PNODE_REPARENT_KEEP_POSITION
+#define PNODE_PARENT_MODE_DEFAULT PNODE_ALL | \
+                                  PNODE_REPARENT_KEEP_POSITION
 
 
@@ -181,10 +190,10 @@
   float              bias;               //!< how fast to iterate to the given position (default is 1)
 
-  PNode*             parent;             //!< a pointer to the parent node
-  std::list<PNode*>  children;           //!< list of the children of this PNode
+  PNode*             parent;             //!< a pointer to the parent node.
+  std::list<PNode*>  children;           //!< list of the children of this PNode.
 
-  unsigned int       parentMode;         //!< the mode of the binding
+  bool               bActive;            //!< If the Node is Active (for cutting off the rest of the tree in update).
+  unsigned short     parentMode;         //!< the mode of the binding
 };
 
 #endif /* _P_NODE_H */
-
