Update of /cvsroot/opal/opal/src/ODE
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1099/src/ODE
Modified Files:
ODESolid.cpp
Log Message:
Performance improvement, especially for simulations with a lot of sleeping Solids. (In Simulator::simulate(), we were previously copying an updated transform matrix for each dynamic Solid every time step. Now we only perform this operation for dynamic, awake Solids.)
Index: ODESolid.cpp
===================================================================
RCS file: /cvsroot/opal/opal/src/ODE/ODESolid.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -C2 -d -r1.88 -r1.89
*** ODESolid.cpp 24 Jun 2005 19:04:22 -0000 1.88
--- ODESolid.cpp 19 Jul 2005 17:53:29 -0000 1.89
***************
*** 183,198 ****
void ODESolid::internal_updateOPALTransform()
{
! if (!mData.isStatic)
! {
! const real* R = (const real*)dBodyGetRotation(mBodyID);
! const real* P = (const real*)dBodyGetPosition(mBodyID);
!
! mData.transform.set(R[0], R[1], R[2], P[0],
! R[4], R[5], R[6], P[1],
! R[8], R[9], R[10], P[2],
! 0, 0, 0, 1);
! }
! // Do nothing if this is a static solid.
}
--- 183,193 ----
void ODESolid::internal_updateOPALTransform()
{
! const real* R = (const real*)dBodyGetRotation(mBodyID);
! const real* P = (const real*)dBodyGetPosition(mBodyID);
! mData.transform.set(R[0], R[1], R[2], P[0],
! R[4], R[5], R[6], P[1],
! R[8], R[9], R[10], P[2],
! 0, 0, 0, 1);
}
|