From: Markus R. <rol...@us...> - 2005-12-18 11:10:21
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2489 Modified Files: joint.cpp Log Message: - Log the full path of both bodies that are attached in Joint::Attach to the debug channel. This is useful for debugging the setup of articulated bodies Index: joint.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/joint.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** joint.cpp 5 Dec 2005 21:16:49 -0000 1.1 --- joint.cpp 18 Dec 2005 11:10:09 -0000 1.2 *************** *** 91,96 **** } ! const dBodyID id1 = (body1.get() == 0) ? 0 : body1->GetODEBody(); ! const dBodyID id2 = (body2.get() == 0) ? 0 : body2->GetODEBody(); dJointAttach(mODEJoint, id1, id2); --- 91,121 ---- } ! string path1,path2; ! dBodyID id1,id2; ! ! static const char strStaticEnv[] = "<static environment>"; ! ! if (body1.get() == 0) ! { ! id1 = 0; ! path1 = strStaticEnv; ! } else ! { ! id1 = body1->GetODEBody(); ! path1 = body1->GetFullPath(); ! } ! ! if (body2.get() == 0) ! { ! id2 = 0; ! path2 = strStaticEnv; ! } else ! { ! id2 = body2->GetODEBody(); ! path2 = body2->GetFullPath(); ! } ! ! GetLog()->Debug() << "(Joint) Attaching '" << path1 << "' to '" ! << path2 << "'\n" << std::endl; dJointAttach(mODEJoint, id1, id2); |