|
From: Oliver O. <fr...@us...> - 2007-06-17 08:11:03
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30145 Modified Files: Tag: projectx odeobject.cpp Log Message: merge from HEAD Index: odeobject.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/odeobject.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -C2 -d -r1.1.2.1 -r1.1.2.1.2.1 *** odeobject.cpp 15 Feb 2007 20:59:41 -0000 1.1.2.1 --- odeobject.cpp 17 Jun 2007 08:11:00 -0000 1.1.2.1.2.1 *************** *** 63,66 **** --- 63,74 ---- shared_ptr<Space> ODEObject::GetSpace() { + // try to find the nearest parent space object + weak_ptr<Space> parentSpace = FindParentSupportingClass<Space>(); + if (! parentSpace.expired()) + { + return parentSpace.lock(); + } + + // return the global space instance shared_ptr<Scene> scene = GetScene(); if (scene.get() == 0) *************** *** 98,102 **** } ! dSpaceID ODEObject::GetSpaceID() { shared_ptr<Space> space = GetSpace(); --- 106,110 ---- } ! dSpaceID ODEObject::FindSpaceID() { shared_ptr<Space> space = GetSpace(); *************** *** 117,120 **** --- 125,133 ---- } + dSpaceID ODEObject::GetParentSpaceID() + { + return 0; + } + void ODEObject::ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix) { |