Index: trunk/src/lib/coord/p_node.cc
===================================================================
--- trunk/src/lib/coord/p_node.cc	(revision 6307)
+++ trunk/src/lib/coord/p_node.cc	(revision 6341)
@@ -27,4 +27,6 @@
 #include "glincl.h"
 #include "color.h"
+
+#include "synchronizeable.h"
 
 using namespace std;
@@ -1007,2 +1009,134 @@
     return (PNODE_ROTATE_AND_MOVE);
 }
+
+/**
+ * Writes data from network containing information about the state
+ * @param data pointer to data
+ * @param length length of data
+ * @param sender hostID of sender
+ */
+int PNode::writeState( const byte * data, int length, int sender )
+{
+  SYNCHELP_READ_BEGIN();
+
+  SYNCHELP_READ_FKT( BaseObject::writeState );
+
+  PRINTF(0)("name = %s\n", this->getName());
+
+  char * parentName = NULL;
+  SYNCHELP_READ_STRINGM( parentName );
+
+  if ( strcmp(parentName, "")==0 )
+  {
+    setParent( (char*)NULL );
+  }
+  else
+  {
+    setParent( parentName );
+  }
+
+  delete[] parentName;
+
+  int parentMode;
+  SYNCHELP_READ_INT( parentMode );
+  this->setParentMode((PARENT_MODE)parentMode);
+
+  float f1, f2, f3, f4;
+
+  SYNCHELP_READ_FLOAT( f1 );
+  SYNCHELP_READ_FLOAT( f2 );
+  SYNCHELP_READ_FLOAT( f3 );
+  this->setRelCoor( f1, f2, f3 );
+  //this->setRelCoor( 10, 0, 0 );
+
+  SYNCHELP_READ_FLOAT( f1 );
+  SYNCHELP_READ_FLOAT( f2 );
+  SYNCHELP_READ_FLOAT( f3 );
+  //this->setAbsCoor( f1, f2, f3 );
+
+  SYNCHELP_READ_FLOAT( f1 );
+  SYNCHELP_READ_FLOAT( f2 );
+  SYNCHELP_READ_FLOAT( f3 );
+  SYNCHELP_READ_FLOAT( f4 );
+  this->setRelDir( Quaternion( Vector(f2, f3, f4), f1 ) );
+
+  SYNCHELP_READ_FLOAT( f1 );
+  SYNCHELP_READ_FLOAT( f2 );
+  SYNCHELP_READ_FLOAT( f3 );
+  SYNCHELP_READ_FLOAT( f4 );
+  //this->setAbsDir( Quaternion( Vector(f2, f3, f4), f1 ) );
+
+  int n;
+  char * childName;
+
+  SYNCHELP_READ_INT( n );
+
+  for (int i = 0; i<n; i++)
+  {
+    SYNCHELP_READ_STRINGM( childName );
+    PRINTF(0)("childname = %s\n", childName);
+    addChild( childName );
+    delete childName;
+    childName = NULL;
+  }
+
+  return SYNCHELP_READ_N;
+}
+
+/**
+ * data copied in data will bee sent to another host
+ * @param data pointer to data
+ * @param maxLength max length of data
+ * @return the number of bytes writen
+ */
+int PNode::readState( byte * data, int maxLength )
+{
+  SYNCHELP_WRITE_BEGIN();
+
+  SYNCHELP_WRITE_FKT( BaseObject::readState );
+
+  PRINTF(0)("name = %s\n", this->getName());
+
+  if ( this->parent )
+  {
+    SYNCHELP_WRITE_STRING( parent->getName() );
+  }
+  else
+  {
+    SYNCHELP_WRITE_STRING( "" );
+  }
+
+  SYNCHELP_WRITE_INT( this->parentMode );
+
+  SYNCHELP_WRITE_FLOAT( this->relCoordinate.x );
+  SYNCHELP_WRITE_FLOAT( this->relCoordinate.y );
+  SYNCHELP_WRITE_FLOAT( this->relCoordinate.z );
+
+  PRINTF(0)("%s, %f, %f, %f\n", getClassName(), relCoordinate.x, relCoordinate.y, relCoordinate.z);
+
+  SYNCHELP_WRITE_FLOAT( this->absCoordinate.x );
+  SYNCHELP_WRITE_FLOAT( this->absCoordinate.y );
+  SYNCHELP_WRITE_FLOAT( this->absCoordinate.z );
+
+  PRINTF(0)("%s, %f, %f, %f\n", getClassName(), absCoordinate.x, absCoordinate.y, absCoordinate.z);
+
+  SYNCHELP_WRITE_FLOAT( this->relDirection.w );
+  SYNCHELP_WRITE_FLOAT( this->relDirection.v.x );
+  SYNCHELP_WRITE_FLOAT( this->relDirection.v.y );
+  SYNCHELP_WRITE_FLOAT( this->relDirection.v.z );
+
+  SYNCHELP_WRITE_FLOAT( this->absDirection.w );
+  SYNCHELP_WRITE_FLOAT( this->absDirection.v.x );
+  SYNCHELP_WRITE_FLOAT( this->absDirection.v.y );
+  SYNCHELP_WRITE_FLOAT( this->absDirection.v.z );
+
+  int n = children.size();
+  SYNCHELP_WRITE_INT( n );
+
+  for (std::list<PNode*>::const_iterator it = children.begin(); it!=children.end(); it++)
+  {
+    PRINTF(0)("childname = %s\n", (*it)->getName() );
+    SYNCHELP_WRITE_STRING( (*it)->getName() );
+  }
+  return SYNCHELP_WRITE_N;
+}
Index: trunk/src/lib/coord/p_node.h
===================================================================
--- trunk/src/lib/coord/p_node.h	(revision 6307)
+++ trunk/src/lib/coord/p_node.h	(revision 6341)
@@ -20,4 +20,5 @@
 
 #include "base_object.h"
+#include "stdincl.h"
 
 #include "vector.h"
@@ -178,4 +179,6 @@
   static PARENT_MODE charToParentingMode(const char* parentingMode);
 
+  int       writeState(const byte* data, int length, int sender);
+  int       readState(byte* data, int maxLength );
 
  private:
