Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6784 in orxonox.OLD for branches/network/src/lib/coord


Ignore:
Timestamp:
Jan 26, 2006, 8:03:40 PM (19 years ago)
Author:
rennerc
Message:

sync: added debug feature

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/coord/p_node.cc

    r6695 r6784  
    10771077  SYNCHELP_READ_BEGIN();
    10781078
    1079   SYNCHELP_READ_FKT( BaseObject::writeState );
     1079  SYNCHELP_READ_FKT( BaseObject::writeState, NWT_PN_BO_WRITESTATE );
    10801080
    10811081//   char * parentName = NULL;
     
    10941094
    10951095  int parentMode;
    1096   SYNCHELP_READ_INT( parentMode );
     1096  SYNCHELP_READ_INT( parentMode, NWT_PN_PARENTMODE );
    10971097  this->setParentMode((PARENT_MODE)parentMode);
    10981098
    10991099  float f1, f2, f3, f4;
    11001100
    1101   SYNCHELP_READ_FLOAT( f1 );
    1102   SYNCHELP_READ_FLOAT( f2 );
    1103   SYNCHELP_READ_FLOAT( f3 );
     1101  SYNCHELP_READ_FLOAT( f1, NWT_PN_COORX );
     1102  SYNCHELP_READ_FLOAT( f2, NWT_PN_COORY );
     1103  SYNCHELP_READ_FLOAT( f3, NWT_PN_COORZ );
    11041104  this->setRelCoor( f1, f2, f3 );
    11051105
    11061106
    1107   SYNCHELP_READ_FLOAT( f1 );
    1108   SYNCHELP_READ_FLOAT( f2 );
    1109   SYNCHELP_READ_FLOAT( f3 );
    1110   SYNCHELP_READ_FLOAT( f4 );
     1107  SYNCHELP_READ_FLOAT( f1, NWT_PN_ROTV );
     1108  SYNCHELP_READ_FLOAT( f2, NWT_PN_ROTX );
     1109  SYNCHELP_READ_FLOAT( f3, NWT_PN_ROTY );
     1110  SYNCHELP_READ_FLOAT( f4, NWT_PN_ROTZ );
    11111111  this->setRelDir( Quaternion( Vector(f2, f3, f4), f1 ) );
    11121112
     
    11401140  SYNCHELP_WRITE_BEGIN();
    11411141
    1142   SYNCHELP_WRITE_FKT( BaseObject::readState );
     1142  SYNCHELP_WRITE_FKT( BaseObject::readState, NWT_PN_BO_WRITESTATE );
    11431143
    11441144//   if ( this->parent )
     
    11511151//   }
    11521152
    1153   SYNCHELP_WRITE_INT( this->parentMode );
    1154 
    1155   SYNCHELP_WRITE_FLOAT( this->relCoordinate.x );
    1156   SYNCHELP_WRITE_FLOAT( this->relCoordinate.y );
    1157   SYNCHELP_WRITE_FLOAT( this->relCoordinate.z );
    1158 
    1159   SYNCHELP_WRITE_FLOAT( this->relDirection.w );
    1160   SYNCHELP_WRITE_FLOAT( this->relDirection.v.x );
    1161   SYNCHELP_WRITE_FLOAT( this->relDirection.v.y );
    1162   SYNCHELP_WRITE_FLOAT( this->relDirection.v.z );
     1153  SYNCHELP_WRITE_INT( this->parentMode, NWT_PN_PARENTMODE );
     1154
     1155  SYNCHELP_WRITE_FLOAT( this->relCoordinate.x, NWT_PN_COORX );
     1156  SYNCHELP_WRITE_FLOAT( this->relCoordinate.y, NWT_PN_COORY );
     1157  SYNCHELP_WRITE_FLOAT( this->relCoordinate.z, NWT_PN_COORZ );
     1158
     1159  SYNCHELP_WRITE_FLOAT( this->relDirection.w, NWT_PN_ROTV );
     1160  SYNCHELP_WRITE_FLOAT( this->relDirection.v.x, NWT_PN_ROTX );
     1161  SYNCHELP_WRITE_FLOAT( this->relDirection.v.y, NWT_PN_ROTY );
     1162  SYNCHELP_WRITE_FLOAT( this->relDirection.v.z, NWT_PN_ROTZ );
    11631163
    11641164//   int n = children.size();
     
    12091209
    12101210  byte flags = 0;
    1211   SYNCHELP_READ_BYTE( flags );
     1211  SYNCHELP_READ_BYTE( flags, NWT_PN_FLAGS );
    12121212  //PRINTF(0)("%s::FLAGS = %d\n", this->getName(), flags);
    12131213
     
    12161216  if ( flags & __FLAG_COOR )
    12171217  {
    1218     SYNCHELP_READ_FLOAT( f1 );
    1219     SYNCHELP_READ_FLOAT( f2 );
    1220     SYNCHELP_READ_FLOAT( f3 );
     1218    SYNCHELP_READ_FLOAT( f1, NWT_PN_SCOORX );
     1219    SYNCHELP_READ_FLOAT( f2, NWT_PN_SCOORY );
     1220    SYNCHELP_READ_FLOAT( f3, NWT_PN_SCOORZ );
    12211221    PRINTF(0)("RCVD COOR: %f %f %f\n", f1, f2, f3);
    12221222    this->setRelCoor( f1, f2, f3 );
     
    12251225  if ( flags & __FLAG_ROT )
    12261226  {
    1227     SYNCHELP_READ_FLOAT( f1 );
    1228     SYNCHELP_READ_FLOAT( f2 );
    1229     SYNCHELP_READ_FLOAT( f3 );
    1230     SYNCHELP_READ_FLOAT( f4 );
     1227    SYNCHELP_READ_FLOAT( f1, NWT_PN_SROTV );
     1228    SYNCHELP_READ_FLOAT( f2, NWT_PN_SROTX );
     1229    SYNCHELP_READ_FLOAT( f3, NWT_PN_SROTY );
     1230    SYNCHELP_READ_FLOAT( f4, NWT_PN_SROTZ );
    12311231    PRINTF(0)("RCVD QUAT: %f %f %f %f\n", f1, f2, f3, f4);
    12321232    //this->setRelDir( Quaternion( Vector(f2, f3, f4), f1 ) );
     
    12701270
    12711271
    1272   SYNCHELP_WRITE_BYTE( flags );
     1272  SYNCHELP_WRITE_BYTE( flags, NWT_PN_FLAGS );
    12731273  //PRINTF(0)("FLAGS = %d\n", flags);
    12741274
     
    12781278    PRINTF(0)("SEND COOR: %f %f %f\n", this->relCoordinate.x, this->relCoordinate.y, this->relCoordinate.z);
    12791279
    1280     SYNCHELP_WRITE_FLOAT( this->relCoordinate.x );
    1281     SYNCHELP_WRITE_FLOAT( this->relCoordinate.y );
    1282     SYNCHELP_WRITE_FLOAT( this->relCoordinate.z );
     1280    SYNCHELP_WRITE_FLOAT( this->relCoordinate.x, NWT_PN_SCOORX );
     1281    SYNCHELP_WRITE_FLOAT( this->relCoordinate.y, NWT_PN_SCOORY );
     1282    SYNCHELP_WRITE_FLOAT( this->relCoordinate.z, NWT_PN_SCOORZ );
    12831283
    12841284    coorx = relCoordinate.x;
     
    12921292    PRINTF(0)("SEND QUAT: %f %f %f %f\n", this->absDirection.w, this->absDirection.v.x, this->absDirection.v.y, this->absDirection.v.z);
    12931293
    1294     SYNCHELP_WRITE_FLOAT( this->absDirection.w );
    1295     SYNCHELP_WRITE_FLOAT( this->absDirection.v.x );
    1296     SYNCHELP_WRITE_FLOAT( this->absDirection.v.y );
    1297     SYNCHELP_WRITE_FLOAT( this->absDirection.v.z );
     1294    SYNCHELP_WRITE_FLOAT( this->absDirection.w, NWT_PN_SROTV );
     1295    SYNCHELP_WRITE_FLOAT( this->absDirection.v.x, NWT_PN_SROTX );
     1296    SYNCHELP_WRITE_FLOAT( this->absDirection.v.y, NWT_PN_SROTY );
     1297    SYNCHELP_WRITE_FLOAT( this->absDirection.v.z, NWT_PN_SROTZ );
    12981298
    12991299    rotw = absDirection.w;
Note: See TracChangeset for help on using the changeset viewer.