From: <a-...@us...> - 2009-11-26 10:30:39
|
Revision: 109 http://simspark.svn.sourceforge.net/simspark/?rev=109&view=rev Author: a-held Date: 2009-11-26 10:30:24 +0000 (Thu, 26 Nov 2009) Log Message: ----------- implemented bridge Pattern for PhysicsServer and all but one method in PhysicsObject removed some unneeded files Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/collider.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.h branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp branches/multiphys/spark/lib/oxygen/physicsserver/world.h Added Paths: ----------- branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsserver.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsserver.h Removed Paths: ------------- branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld_c.cpp Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-11-26 10:30:24 UTC (rev 109) @@ -54,9 +54,15 @@ physicsserver/angularmotor.h #interfaces + physicsserver/int/physicsobjectint.h + physicsserver/int/physicsserverint.h + physicsserver/int/spaceint.h physicsserver/int/worldint.h #ode-specific files + physicsserver/ode/odephysicsobject.h + physicsserver/ode/odephysicsserver.h + physicsserver/ode/odespace.h physicsserver/ode/odeworld.h physicsserver/ode/odewrapper.h @@ -184,15 +190,11 @@ physicsserver/angularmotor.cpp physicsserver/angularmotor_c.cpp - #interfaces - physicsserver/int/worldint_c.cpp - physicsserver/int/spaceint_c.cpp - #ODE-specific files + physicsserver/ode/odephysicsobject.cpp + physicsserver/ode/odephysicsserver.cpp physicsserver/ode/odespace.cpp - physicsserver/ode/odespace_c.cpp physicsserver/ode/odeworld.cpp - physicsserver/ode/odeworld_c.cpp sceneserver/basenode.cpp sceneserver/basenode_c.cpp Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -262,7 +262,7 @@ ) > 0; } -void Collider::DestroyODEObject() +void Collider::DestroyPhysicsObject() { if (! mODEGeom) { Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.h 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.h 2009-11-26 10:30:24 UTC (rev 109) @@ -148,8 +148,8 @@ */ virtual void PrePhysicsUpdateInternal(float deltaTime); - /** destroy the managed ODE object */ - virtual void DestroyODEObject(); + /** destroy the managed physicsobject */ + virtual void DestroyPhysicsObject(); // // Members Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2009-11-26 10:30:24 UTC (rev 109) @@ -0,0 +1,57 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_PHYSICSOBJECTINT_H +#define OXYGEN_PHYSICSOBJECTINT_H + +#include <boost/smart_ptr/shared_ptr.hpp> +#include <oxygen/physicsserver/ode/odewrapper.h> +#include <oxygen/sceneserver/basenode.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ +class World; +class Space; + +class OXYGEN_API PhysicsObjectInt : public BaseNode +{ + +public: + PhysicsObjectInt(){}; + virtual ~PhysicsObjectInt(){}; + + virtual dWorldID GetWorldID() = 0; + virtual dSpaceID FindSpaceID() = 0; + virtual dSpaceID GetParentSpaceID() = 0; + virtual void ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix) = 0; + virtual void ConvertRotationMatrix(const dReal* matrix, salt::Matrix& rot) const = 0; + virtual void DestroyPhysicsObject() = 0; + + boost::shared_ptr<Scene> scene; + boost::shared_ptr<Space> space; + boost::shared_ptr<World> world; +}; + +} //namespace oxygen + +#endif //OXYGEN_PHYSICSOBJECTINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint.h 2009-11-26 10:30:24 UTC (rev 109) @@ -0,0 +1,41 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_PHYSICSSERVERINT_H +#define OXYGEN_PHYSICSSERVERINT_H + +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API PhysicsServerInt +{ + +public: + PhysicsServerInt(){}; + virtual ~PhysicsServerInt(){}; +}; + +} //namespace oxygen + +#endif //OXYGEN_PHYSICSSERVERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h 2009-11-26 10:30:24 UTC (rev 109) @@ -23,7 +23,7 @@ #ifndef OXYGEN_SPACEINT_H #define OXYGEN_SPACEINT_H -#include <oxygen/physicsserver/physicsobject.h> +#include <oxygen/physicsserver/ode/odephysicsobject.h> #include <set> #include <oxygen/oxygen_defines.h> @@ -33,13 +33,13 @@ class RigidBody; class Collider; -class OXYGEN_API SpaceInt : public PhysicsObject +class OXYGEN_API SpaceInt : public ODEPhysicsObject { public: typedef std::set<dSpaceID> TSpaceIdSet; - SpaceInt() : PhysicsObject(){}; + SpaceInt() : ODEPhysicsObject(){}; virtual ~SpaceInt(){}; //virtual void collisionNearCallback (void *data, dGeomID obj1, dGeomID obj2) = 0; @@ -63,8 +63,6 @@ boost::shared_ptr<Scene> scene; }; -DECLARE_ABSTRACTCLASS(SpaceInt); - } //namespace oxygen #endif //OXYGEN_SPACEINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint_c.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint_c.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -1,29 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - -this file is part of rcssserver3D -Fri May 9 2003 -Copyright (C) 2003 Koblenz University -$Id: world_c.cpp 3 2008-11-21 02:38:08Z hedayat $ - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include <oxygen/physicsserver/int/spaceint.h> - -using namespace oxygen; - -void CLASS(SpaceInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/ODEObject); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h 2009-11-26 10:30:24 UTC (rev 109) @@ -23,16 +23,16 @@ #define OXYGEN_WORLDINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/physicsserver/ode/odeobject.h> +#include <oxygen/physicsserver/ode/odephysicsobject.h> namespace oxygen { -class OXYGEN_API WorldInt : public ODEObject +class OXYGEN_API WorldInt : public ODEPhysicsObject { public: - WorldInt() : ODEObject(){}; + WorldInt() : ODEPhysicsObject(){}; virtual ~WorldInt(){}; virtual dWorldID GetODEWorld() const = 0; @@ -47,12 +47,10 @@ virtual void SetAutoDisableFlag(bool flag) = 0; virtual void SetContactSurfaceLayer(float depth) = 0; virtual float GetContactSurfaceLayer() const = 0; - virtual void DestroyODEObject() = 0; + virtual void DestroyPhysicsObject() = 0; virtual bool ConstructInternal() = 0; }; -DECLARE_ABSTRACTCLASS(WorldInt); - } #endif //OXYGEN_WORLDINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint_c.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint_c.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -1,29 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - -this file is part of rcssserver3D -Fri May 9 2003 -Copyright (C) 2003 Koblenz University -$Id: world_c.cpp 3 2008-11-21 02:38:08Z hedayat $ - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include <oxygen/physicsserver/int/worldint.h> - -using namespace oxygen; - -void CLASS(WorldInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/ODEObject); -} Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -1,167 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2002,2003 Koblenz University - Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#include <oxygen/physicsserver/ode/odeobject.h> -#include <oxygen/physicsserver/space.h> -#include <oxygen/physicsserver/world.h> -#include <oxygen/sceneserver/scene.h> -#include <zeitgeist/logserver/logserver.h> - -using namespace oxygen; -using namespace boost; - -ODEObject::ODEObject() : BaseNode() -{ -} - -ODEObject::~ODEObject() -{ -} - -void ODEObject::OnUnlink() -{ - DestroyODEObject(); -} - -/** returns the world node */ -shared_ptr<World> ODEObject::GetWorld() -{ - shared_ptr<Scene> scene = GetScene(); - if (scene.get() == 0) - { - GetLog()->Error() << "(ODEObject) ERROR: found no Scene node\n"; - return shared_ptr<World>(); - } - - shared_ptr<World> worldNode = shared_dynamic_cast<World> - (scene->GetChildOfClass("World")); - if (worldNode.get() == 0) - { - GetLog()->Error() << "(ODEObject) ERROR: found no World node\n"; - } - - return worldNode; -} - -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) - { - GetLog()->Error() << "(ODEObject) ERROR: found no Scene node\n"; - return shared_ptr<Space>(); - } - - shared_ptr<Space> spaceNode = shared_dynamic_cast<Space> - (scene->GetChildOfClass("Space")); - if (spaceNode.get() == 0) - { - GetLog()->Error() << "(ODEObject) ERROR: found no Space node\n"; - } - - return spaceNode; -} - -dWorldID ODEObject::GetWorldID() -{ - shared_ptr<World> world = GetWorld(); - if (world.get() == 0) - { - return 0; - } - - dWorldID worldId = world->GetODEWorld(); - if (worldId == 0) - { - GetLog()->Error() - << "(ODEObject) ERROR: World returned empty ODE handle\n"; - } - - return worldId; -} - -dSpaceID ODEObject::FindSpaceID() -{ - shared_ptr<Space> space = GetSpace(); - if (space.get() == 0) - { - return 0; - } - - dSpaceID spaceId = space->GetODESpace(); - - if (spaceId == 0) - { - GetLog()->Error() - << "(ODEObject) ERROR: Space returned empty ODE handle\n"; - } - - return spaceId; -} - -dSpaceID ODEObject::GetParentSpaceID() -{ - return 0; -} - -void ODEObject::ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix) -{ - matrix[0] = rot.m[0]; - matrix[1] = rot.m[4]; - matrix[2] = rot.m[8]; - matrix[3] = 0; - matrix[4] = rot.m[1]; - matrix[5] = rot.m[5]; - matrix[6] = rot.m[9]; - matrix[7] = 0; - matrix[8] = rot.m[2]; - matrix[9] = rot.m[6]; - matrix[10] = rot.m[10]; - matrix[11] = 0; -} - -void ODEObject::ConvertRotationMatrix(const dReal* matrix, salt::Matrix& rot) const -{ - rot.m[0] = matrix[0] ; - rot.m[4] = matrix[1] ; - rot.m[8] = matrix[2]; - rot.m[12] = matrix[3]; - rot.m[1] = matrix[4]; - rot.m[5] = matrix[5]; - rot.m[9] = matrix[6]; - rot.m[13] = matrix[7]; - rot.m[2] = matrix[8]; - rot.m[6] = matrix[9]; - rot.m[10] = matrix[10] ; - rot.m[14] = matrix[11]; - rot.m[3] = 0.0; - rot.m[7] = 0.0; - rot.m[11] = 0.0; - rot.m[15] = 1.0; -} Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject.h 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject.h 2009-11-26 10:30:24 UTC (rev 109) @@ -1,83 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2002,2003 Koblenz University - Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ - $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#ifndef OXYGEN_ODEOBJECT_H -#define OXYGEN_ODEOBJECT_H - -#include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> -#include <oxygen/physicsserver/ode/odewrapper.h> - -namespace oxygen -{ -class Space; -class World; - -/** ODEObject is the base of all classes encapsulating ODE concepts - */ -class OXYGEN_API ODEObject : public BaseNode -{ -public: - // - // Functions - // - ODEObject(){}; - virtual ~ODEObject(){}; - - /** This rountine is called, before the hierarchy object is - removed from the parent. It can be overridden to support - custom 'unlink' behavior. - */ - virtual void OnUnlink(){}; - - /** returns the ODE world handle */ - dWorldID GetWorldID(){}; - - /** returns the nearest parent space ODE handle */ - dSpaceID FindSpaceID(){}; - - /** returns the ODE handle ID of the containing parent space */ - virtual dSpaceID GetParentSpaceID(){}; - - /** destroy the managed ODE object */ - virtual void DestroyODEObject(){}; - -protected: - /** returns the world node */ - boost::shared_ptr<World> GetWorld(); - - /** finds the nearest parent space node */ - boost::shared_ptr<Space> GetSpace(){}; - - /** converts the rotation part of a salt::Matrix to an ODE - dMatrix3 */ - void ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix); - - /** coverts the ODE dMatrix3 to the rotation part of a salt::Matrix */ - void ConvertRotationMatrix(const dReal* matrix, salt::Matrix& rot) const; -}; - -DECLARE_ABSTRACTCLASS(ODEObject); - -} //namespace oxygen - -#endif //OXYGEN_ODEOBJECT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject_c.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeobject_c.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -1,29 +0,0 @@ -/* -*- mode: c++ -*- - - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2003 Koblenz University - $Id: odeobject_c.cpp 3 2008-11-21 02:38:08Z hedayat $ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include <oxygen/physicsserver/ode/odeobject.h> - -using namespace oxygen; - -void CLASS(ODEObject)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -0,0 +1,112 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include <oxygen/physicsserver/ode/odephysicsobject.h> +#include <oxygen/physicsserver/space.h> +#include <oxygen/physicsserver/world.h> +#include <oxygen/sceneserver/scene.h> +#include <iostream> + +using namespace oxygen; +using namespace boost; +using namespace std; + +ODEPhysicsObject::ODEPhysicsObject() : PhysicsObjectInt() +{ +} + +ODEPhysicsObject::~ODEPhysicsObject() +{ +} + +dWorldID ODEPhysicsObject::GetWorldID() +{ + if (world.get() == 0) + { + return 0; + } + + dWorldID worldId = world->GetODEWorld(); + if (worldId == 0) + { + cerr << "(ODEObject) ERROR: World returned empty ODE handle\n"; + } + + return worldId; +} + +dSpaceID ODEPhysicsObject::FindSpaceID() +{ + if (space.get() == 0) + { + return 0; + } + + dSpaceID spaceId = space->GetODESpace(); + + if (spaceId == 0) + { + cerr << "(ODEObject) ERROR: Space returned empty ODE handle\n"; + } + + return spaceId; +} + +dSpaceID ODEPhysicsObject::GetParentSpaceID() +{ + return 0; +} + +void ODEPhysicsObject::ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix) +{ + matrix[0] = rot.m[0]; + matrix[1] = rot.m[4]; + matrix[2] = rot.m[8]; + matrix[3] = 0; + matrix[4] = rot.m[1]; + matrix[5] = rot.m[5]; + matrix[6] = rot.m[9]; + matrix[7] = 0; + matrix[8] = rot.m[2]; + matrix[9] = rot.m[6]; + matrix[10] = rot.m[10]; + matrix[11] = 0; +} + +void ODEPhysicsObject::ConvertRotationMatrix(const dReal* matrix, salt::Matrix& rot) const +{ + rot.m[0] = matrix[0] ; + rot.m[4] = matrix[1] ; + rot.m[8] = matrix[2]; + rot.m[12] = matrix[3]; + rot.m[1] = matrix[4]; + rot.m[5] = matrix[5]; + rot.m[9] = matrix[6]; + rot.m[13] = matrix[7]; + rot.m[2] = matrix[8]; + rot.m[6] = matrix[9]; + rot.m[10] = matrix[10] ; + rot.m[14] = matrix[11]; + rot.m[3] = 0.0; + rot.m[7] = 0.0; + rot.m[11] = 0.0; + rot.m[15] = 1.0; +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.h 2009-11-26 10:30:24 UTC (rev 109) @@ -0,0 +1,53 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ + $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODEOBJECT_H +#define OXYGEN_ODEOBJECT_H + +#include <oxygen/oxygen_defines.h> +#include <oxygen/physicsserver/int/physicsobjectint.h> +#include <oxygen/physicsserver/ode/odewrapper.h> + +namespace oxygen +{ +class Space; +class World; + +class OXYGEN_API ODEPhysicsObject : public PhysicsObjectInt +{ +public: + ODEPhysicsObject(); + virtual ~ODEPhysicsObject(); + + dWorldID GetWorldID(); + dSpaceID FindSpaceID(); + virtual dSpaceID GetParentSpaceID(); + virtual void DestroyPhysicsObject(){}; + +protected: + void ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix); + void ConvertRotationMatrix(const dReal* matrix, salt::Matrix& rot) const; +}; + +} //namespace oxygen + +#endif //OXYGEN_ODEPHYSICSOBJECT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsserver.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsserver.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsserver.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -0,0 +1,33 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: space.cpp 80 2009-07-30 17:25:42Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/ode/odewrapper.h> +#include <oxygen/physicsserver/ode/odephysicsserver.h> + +using namespace oxygen; + +ODEPhysicsServer::ODEPhysicsServer(){ + dInitODE(); +} + +ODEPhysicsServer::~ODEPhysicsServer(){ + dCloseODE(); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsserver.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsserver.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsserver.h 2009-11-26 10:30:24 UTC (rev 109) @@ -0,0 +1,41 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ + $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODEPHYSICSSERVER_H +#define OXYGEN_ODEPHYSICSSERVER_H + +#include <oxygen/oxygen_defines.h> +#include <oxygen/physicsserver/int/physicsserverint.h> + +namespace oxygen +{ + +class OXYGEN_API ODEPhysicsServer : public PhysicsServerInt +{ +public: + ODEPhysicsServer(); + virtual ~ODEPhysicsServer(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODEPHYSICSSERVER_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -184,14 +184,14 @@ void ODESpace::OnUnlink() { DisableInnerCollision(false); - PhysicsObject::OnUnlink(); + ODEPhysicsObject::OnUnlink(); } void ODESpace::OnLink() { - PhysicsObject::OnLink(); + ODEPhysicsObject::OnLink(); - shared_ptr<Space> space = GetSpace(); + //shared_ptr<Space> space = GetSpace(); dSpaceID spaceId = 0; if (space.get() != 0) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.h 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.h 2009-11-26 10:30:24 UTC (rev 109) @@ -67,8 +67,6 @@ static TSpaceIdSet gDisabledInnerCollisionSet; }; -DECLARE_CLASS(ODESpace); - } #endif //OXYGEN_ODESPACE_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace_c.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace_c.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -1,29 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - -this file is part of rcssserver3D -Fri May 9 2003 -Copyright (C) 2003 Koblenz University -$Id: world_c.cpp 3 2008-11-21 02:38:08Z hedayat $ - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include <oxygen/physicsserver/ode/odespace.h> - -using namespace oxygen; - -void CLASS(ODESpace)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/SpaceInt); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -109,7 +109,7 @@ return (mODEWorld != 0); } -void ODEWorld::DestroyODEObject() +void ODEWorld::DestroyPhysicsObject() { static bool recurseLock = false; if (recurseLock) @@ -119,7 +119,7 @@ recurseLock = true; - shared_ptr<Space> space = GetSpace(); + //shared_ptr<Space> space = GetSpace(); if (space.get() != 0) { space->DestroyPhysicsObject(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.h 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.h 2009-11-26 10:30:24 UTC (rev 109) @@ -47,7 +47,7 @@ void SetAutoDisableFlag(bool flag); void SetContactSurfaceLayer(float depth); float GetContactSurfaceLayer() const; - virtual void DestroyODEObject(); + virtual void DestroyPhysicsObject(); protected: virtual bool ConstructInternal(); @@ -56,8 +56,6 @@ dWorldID mODEWorld; }; -DECLARE_CLASS(ODEWorld); - } #endif //OXYGEN_ODEWORLD_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld_c.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld_c.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -1,29 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - -this file is part of rcssserver3D -Fri May 9 2003 -Copyright (C) 2003 Koblenz University -$Id: world_c.cpp 3 2008-11-21 02:38:08Z hedayat $ - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include <oxygen/physicsserver/ode/odeworld.h> - -using namespace oxygen; - -void CLASS(ODEWorld)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/WorldImp); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -19,9 +19,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + #include <oxygen/physicsserver/physicsobject.h> #include <oxygen/physicsserver/space.h> #include <oxygen/physicsserver/world.h> +#include <oxygen/physicsserver/ode/odephysicsobject.h> #include <oxygen/sceneserver/scene.h> #include <zeitgeist/logserver/logserver.h> @@ -30,6 +32,7 @@ PhysicsObject::PhysicsObject() : BaseNode() { + mPhysicsObjectImp = shared_ptr<ODEPhysicsObject>(new ODEPhysicsObject()); } PhysicsObject::~PhysicsObject() @@ -38,7 +41,7 @@ void PhysicsObject::OnUnlink() { - DestroyPhysicsObject(); + mPhysicsObjectImp->DestroyPhysicsObject(); } /** returns the world node */ @@ -90,7 +93,11 @@ dWorldID PhysicsObject::GetWorldID() { + mPhysicsObjectImp->world = GetWorld(); + shared_ptr<World> world = GetWorld(); + + //mPhysicsObjectImp->GetWorld(); if (world.get() == 0) { return 0; @@ -108,60 +115,22 @@ dSpaceID PhysicsObject::FindSpaceID() { - shared_ptr<Space> space = GetSpace(); - if (space.get() == 0) - { - return 0; - } - - dSpaceID spaceId = space->GetODESpace(); - - if (spaceId == 0) - { - GetLog()->Error() - << "(ODEObject) ERROR: Space returned empty ODE handle\n"; - } - - return spaceId; + mPhysicsObjectImp->space = GetSpace(); + + return mPhysicsObjectImp->FindSpaceID(); } dSpaceID PhysicsObject::GetParentSpaceID() { - return 0; + return mPhysicsObjectImp->GetParentSpaceID(); } void PhysicsObject::ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix) { - matrix[0] = rot.m[0]; - matrix[1] = rot.m[4]; - matrix[2] = rot.m[8]; - matrix[3] = 0; - matrix[4] = rot.m[1]; - matrix[5] = rot.m[5]; - matrix[6] = rot.m[9]; - matrix[7] = 0; - matrix[8] = rot.m[2]; - matrix[9] = rot.m[6]; - matrix[10] = rot.m[10]; - matrix[11] = 0; + mPhysicsObjectImp->ConvertRotationMatrix(rot, matrix); } void PhysicsObject::ConvertRotationMatrix(const dReal* matrix, salt::Matrix& rot) const { - rot.m[0] = matrix[0] ; - rot.m[4] = matrix[1] ; - rot.m[8] = matrix[2]; - rot.m[12] = matrix[3]; - rot.m[1] = matrix[4]; - rot.m[5] = matrix[5]; - rot.m[9] = matrix[6]; - rot.m[13] = matrix[7]; - rot.m[2] = matrix[8]; - rot.m[6] = matrix[9]; - rot.m[10] = matrix[10] ; - rot.m[14] = matrix[11]; - rot.m[3] = 0.0; - rot.m[7] = 0.0; - rot.m[11] = 0.0; - rot.m[15] = 1.0; + mPhysicsObjectImp->ConvertRotationMatrix(matrix, rot); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h 2009-11-26 10:30:24 UTC (rev 109) @@ -31,6 +31,7 @@ { class Space; class World; +class PhysicsObjectInt; /** ODEObject is the base of all classes encapsulating ODE concepts */ @@ -57,8 +58,12 @@ /** returns the ODE handle ID of the containing parent space */ virtual dSpaceID GetParentSpaceID(); - - /** destroy the managed ODE object */ + + /** this method is not implemented here because PhysicsObject is an + abstract class. However, it is declared here so that it can be + called as a member of this class, which is necessary in some + cases (like destroying all objects in a space, where bodies, + colliders and joints have to be treated in one go).*/ virtual void DestroyPhysicsObject(){}; protected: @@ -74,6 +79,9 @@ /** coverts the ODE dMatrix3 to the rotation part of a salt::Matrix */ void ConvertRotationMatrix(const dReal* matrix, salt::Matrix& rot) const; + +private: + boost::shared_ptr<PhysicsObjectInt> mPhysicsObjectImp; }; DECLARE_ABSTRACTCLASS(PhysicsObject); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -20,17 +20,11 @@ */ #include <oxygen/physicsserver/physicsserver.h> +#include <oxygen/physicsserver/ode/odephysicsserver.h> using namespace oxygen; -PhysicsServer::PhysicsServer() - : Leaf() +PhysicsServer::PhysicsServer() : Leaf() { - dInitODE(); + mPhysicsServerImp = boost::shared_ptr<ODEPhysicsServer>(new ODEPhysicsServer()); } - -PhysicsServer::~PhysicsServer() -{ - // release memory associated with ode - dCloseODE(); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h 2009-11-26 10:30:24 UTC (rev 109) @@ -29,6 +29,7 @@ namespace oxygen { +class PhysicsServerInt; class OXYGEN_API PhysicsServer : public zeitgeist::Leaf { @@ -37,7 +38,10 @@ // public: PhysicsServer(); - ~PhysicsServer(); + virtual ~PhysicsServer(){}; + +private: + boost::shared_ptr<PhysicsServerInt> mPhysicsServerImp; }; DECLARE_CLASS(PhysicsServer); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -102,7 +102,7 @@ return true; } -void RigidBody::DestroyODEObject() +void RigidBody::DestroyPhysicsObject() { if (mODEBody == 0) { Modified: branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h 2009-11-26 10:30:24 UTC (rev 109) @@ -226,8 +226,8 @@ /** returns the current poosition of this body */ salt::Vector3f GetPosition() const; - /** destroy the managed ODE object */ - virtual void DestroyODEObject(); + /** destroy the managed physicsobject */ + virtual void DestroyPhysicsObject(); /** synchronize parent node with the bodies position and orientation Modified: branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp 2009-11-26 10:30:24 UTC (rev 109) @@ -102,7 +102,7 @@ return mWorldImp->ConstructInternal(); } -void World::DestroyODEObject() +void World::DestroyPhysicsObject() { - mWorldImp->DestroyODEObject(); + mWorldImp->DestroyPhysicsObject(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/world.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/world.h 2009-11-25 10:20:10 UTC (rev 108) +++ branches/multiphys/spark/lib/oxygen/physicsserver/world.h 2009-11-26 10:30:24 UTC (rev 109) @@ -106,7 +106,7 @@ float GetContactSurfaceLayer() const; /** destroy the managed ODE object */ - virtual void DestroyODEObject(); + virtual void DestroyPhysicsObject(); protected: /** creates them managed ODE world */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |