Changeset 6788 in orxonox.OLD for branches/network/src/lib/coord
- Timestamp:
- Jan 27, 2006, 12:21:33 PM (19 years ago)
- Location:
- branches/network/src/lib/coord
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/coord/p_node.cc
r6784 r6788 1250 1250 int PNode::readSync( byte * data, int maxLength ) 1251 1251 { 1252 //WARNING: if you change this file make sure you also change needsReadSync 1252 1253 SYNCHELP_WRITE_BEGIN(); 1253 1254 … … 1276 1277 { 1277 1278 1278 PRINTF(0)("SEND COOR: %f %f %f\n", this->relCoordinate.x, this->relCoordinate.y, this->relCoordinate.z);1279 //PRINTF(0)("SEND COOR: %f %f %f\n", this->relCoordinate.x, this->relCoordinate.y, this->relCoordinate.z); 1279 1280 1280 1281 SYNCHELP_WRITE_FLOAT( this->relCoordinate.x, NWT_PN_SCOORX ); … … 1290 1291 { 1291 1292 1292 PRINTF(0)("SEND QUAT: %f %f %f %f\n", this->absDirection.w, this->absDirection.v.x, this->absDirection.v.y, this->absDirection.v.z);1293 //PRINTF(0)("SEND QUAT: %f %f %f %f\n", this->absDirection.w, this->absDirection.v.x, this->absDirection.v.y, this->absDirection.v.z); 1293 1294 1294 1295 SYNCHELP_WRITE_FLOAT( this->absDirection.w, NWT_PN_SROTV ); … … 1305 1306 return SYNCHELP_WRITE_N; 1306 1307 } 1308 1309 bool PNode::needsReadSync( ) 1310 { 1311 if ( fabs( coorx - relCoordinate.x ) > __OFFSET_POS || 1312 fabs( coory - relCoordinate.y ) > __OFFSET_POS || 1313 fabs( coorz - relCoordinate.z ) > __OFFSET_POS ) 1314 return true; 1315 1316 if ( fabs( rotw - absDirection.w ) > __OFFSET_ROT || 1317 fabs( rotx - absDirection.v.x ) > __OFFSET_ROT || 1318 fabs( roty - absDirection.v.y ) > __OFFSET_ROT || 1319 fabs( rotz - absDirection.v.z ) > __OFFSET_ROT ) 1320 return true; 1321 1322 return false; 1323 } -
branches/network/src/lib/coord/p_node.h
r6695 r6788 190 190 int writeSync(const byte* data, int length, int sender); 191 191 int readSync(byte* data, int maxLength ); 192 bool needsReadSync(); 192 193 193 194 private:
Note: See TracChangeset
for help on using the changeset viewer.