From: Markus R. <rol...@us...> - 2007-03-31 13:34:41
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29583 Modified Files: body.cpp body.h Log Message: - factored out update of parent node into method SynchronizeParent() Index: body.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/body.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** body.h 15 Mar 2007 07:26:27 -0000 1.3 --- body.h 31 Mar 2007 13:19:56 -0000 1.4 *************** *** 179,182 **** --- 179,187 ---- virtual void DestroyODEObject(); + /** synchronize parent node with the bodies position and + orientation + */ + void SynchronizeParent() const; + protected: /** creates the managed ODE body and moves it to the position of Index: body.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/body.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** body.cpp 15 Mar 2007 07:26:27 -0000 1.3 --- body.cpp 31 Mar 2007 13:19:56 -0000 1.4 *************** *** 264,271 **** } ! void Body::PostPhysicsUpdateInternal() { - // synchronize parent node with the bodies position and - // orientation const dReal* pos = dBodyGetPosition(mODEBody); const dReal* rot = dBodyGetRotation(mODEBody); --- 264,269 ---- } ! void Body::SynchronizeParent() const { const dReal* pos = dBodyGetPosition(mODEBody); const dReal* rot = dBodyGetRotation(mODEBody); *************** *** 295,298 **** --- 293,301 ---- } + void Body::PostPhysicsUpdateInternal() + { + SynchronizeParent(); + } + shared_ptr<Body> Body::GetBody(dBodyID id) { |