You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(20) |
Feb
(11) |
Mar
(6) |
Apr
(5) |
May
(4) |
Jun
(7) |
Jul
(9) |
Aug
(11) |
Sep
|
Oct
(4) |
Nov
(13) |
Dec
(21) |
2010 |
Jan
(23) |
Feb
(32) |
Mar
(6) |
Apr
(2) |
May
(10) |
Jun
(15) |
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(1) |
Dec
(16) |
2011 |
Jan
(1) |
Feb
(5) |
Mar
(19) |
Apr
(13) |
May
(4) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
(8) |
Mar
(2) |
Apr
(6) |
May
(13) |
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(4) |
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(15) |
Apr
(2) |
May
(4) |
Jun
(17) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(6) |
Jun
(6) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(6) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <a-...@us...> - 2010-02-19 03:14:48
|
Revision: 166 http://simspark.svn.sourceforge.net/simspark/?rev=166&view=rev Author: a-held Date: 2010-02-19 03:14:27 +0000 (Fri, 19 Feb 2010) Log Message: ----------- moved ode implementation classes into plugins directory currently built as a shared library as a workaround. Will later be built as a plugin Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/joint.h branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/softbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp branches/multiphys/spark/lib/oxygen/physicsserver/space.h branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/staticbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp branches/multiphys/spark/lib/oxygen/physicsserver/world.h branches/multiphys/spark/plugin/CMakeLists.txt branches/multiphys/spark/plugin/collisionperceptor/forceresistanceperceptor.cpp branches/multiphys/spark/plugin/collisionperceptor/forceresistanceperceptor.h branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.cpp branches/multiphys/spark/plugin/odeimps/odeangularmotor.cpp branches/multiphys/spark/plugin/odeimps/odeangularmotor.h branches/multiphys/spark/plugin/odeimps/odeballjoint.cpp branches/multiphys/spark/plugin/odeimps/odeballjoint.h branches/multiphys/spark/plugin/odeimps/odebody.cpp branches/multiphys/spark/plugin/odeimps/odebody.h branches/multiphys/spark/plugin/odeimps/odeboxcollider.cpp branches/multiphys/spark/plugin/odeimps/odeboxcollider.h branches/multiphys/spark/plugin/odeimps/odecapsulecollider.cpp branches/multiphys/spark/plugin/odeimps/odecapsulecollider.h branches/multiphys/spark/plugin/odeimps/odecollider.cpp branches/multiphys/spark/plugin/odeimps/odecollider.h branches/multiphys/spark/plugin/odeimps/odecompoundcollider.cpp branches/multiphys/spark/plugin/odeimps/odecompoundcollider.h branches/multiphys/spark/plugin/odeimps/odeconcavecollider.cpp branches/multiphys/spark/plugin/odeimps/odeconcavecollider.h branches/multiphys/spark/plugin/odeimps/odeconecollider.cpp branches/multiphys/spark/plugin/odeimps/odeconecollider.h branches/multiphys/spark/plugin/odeimps/odeconetwistjoint.cpp branches/multiphys/spark/plugin/odeimps/odeconetwistjoint.h branches/multiphys/spark/plugin/odeimps/odecontactjointhandler.cpp branches/multiphys/spark/plugin/odeimps/odecontactjointhandler.h branches/multiphys/spark/plugin/odeimps/odeconvexcollider.cpp branches/multiphys/spark/plugin/odeimps/odeconvexcollider.h branches/multiphys/spark/plugin/odeimps/odecylindercollider.cpp branches/multiphys/spark/plugin/odeimps/odecylindercollider.h branches/multiphys/spark/plugin/odeimps/odedynamicbody.cpp branches/multiphys/spark/plugin/odeimps/odedynamicbody.h branches/multiphys/spark/plugin/odeimps/odeemptycollider.cpp branches/multiphys/spark/plugin/odeimps/odeemptycollider.h branches/multiphys/spark/plugin/odeimps/odefixedjoint.cpp branches/multiphys/spark/plugin/odeimps/odefixedjoint.h branches/multiphys/spark/plugin/odeimps/odegeneric6dofjoint.cpp branches/multiphys/spark/plugin/odeimps/odegeneric6dofjoint.h branches/multiphys/spark/plugin/odeimps/odehinge2joint.cpp branches/multiphys/spark/plugin/odeimps/odehinge2joint.h branches/multiphys/spark/plugin/odeimps/odehingejoint.cpp branches/multiphys/spark/plugin/odeimps/odehingejoint.h branches/multiphys/spark/plugin/odeimps/odejoint.cpp branches/multiphys/spark/plugin/odeimps/odejoint.h branches/multiphys/spark/plugin/odeimps/odephysicsobject.cpp branches/multiphys/spark/plugin/odeimps/odephysicsobject.h branches/multiphys/spark/plugin/odeimps/odephysicsserver.cpp branches/multiphys/spark/plugin/odeimps/odephysicsserver.h branches/multiphys/spark/plugin/odeimps/odeplanecollider.cpp branches/multiphys/spark/plugin/odeimps/odeplanecollider.h branches/multiphys/spark/plugin/odeimps/oderaycollider.cpp branches/multiphys/spark/plugin/odeimps/oderaycollider.h branches/multiphys/spark/plugin/odeimps/oderigidbody.cpp branches/multiphys/spark/plugin/odeimps/oderigidbody.h branches/multiphys/spark/plugin/odeimps/odesliderjoint.cpp branches/multiphys/spark/plugin/odeimps/odesliderjoint.h branches/multiphys/spark/plugin/odeimps/odesoftbody.cpp branches/multiphys/spark/plugin/odeimps/odesoftbody.h branches/multiphys/spark/plugin/odeimps/odespace.cpp branches/multiphys/spark/plugin/odeimps/odespace.h branches/multiphys/spark/plugin/odeimps/odespherecollider.cpp branches/multiphys/spark/plugin/odeimps/odespherecollider.h branches/multiphys/spark/plugin/odeimps/odestaticbody.cpp branches/multiphys/spark/plugin/odeimps/odestaticbody.h branches/multiphys/spark/plugin/odeimps/odetransformcollider.cpp branches/multiphys/spark/plugin/odeimps/odetransformcollider.h branches/multiphys/spark/plugin/odeimps/odeuniversaljoint.cpp branches/multiphys/spark/plugin/odeimps/odeuniversaljoint.h branches/multiphys/spark/plugin/odeimps/odeworld.cpp branches/multiphys/spark/plugin/odeimps/odeworld.h branches/multiphys/spark/plugin/odeimps/odewrapper.h branches/multiphys/spark/plugin/rosimporter/rosimporter.cpp branches/multiphys/spark/plugin/sparkagent/hingeeffector.cpp branches/multiphys/spark/plugin/sparkagent/universaljointeffector.cpp Added Paths: ----------- branches/multiphys/spark/plugin/odeimps/ branches/multiphys/spark/plugin/odeimps/CMakeLists.txt Removed Paths: ------------- branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.cpp branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.h branches/multiphys/spark/lib/oxygen/physicsserver/int/impfactoryint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/ branches/multiphys/spark/plugin/odeimps/odeimpfactory.cpp branches/multiphys/spark/plugin/odeimps/odeimpfactory.h Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-02-19 03:14:27 UTC (rev 166) @@ -15,7 +15,6 @@ oxygen.h oxygen_defines.h physicsserver/genericphysicsobjects.h - physicsserver/impfactory.h physicsserver/physicsobject.h physicsserver/body.h physicsserver/rigidbody.h @@ -75,7 +74,6 @@ physicsserver/int/generic6dofjointint.h physicsserver/int/hingejointint.h physicsserver/int/hinge2jointint.h - physicsserver/int/impfactoryint.h physicsserver/int/jointint.h physicsserver/int/physicsobjectint.h physicsserver/int/physicsserverint.h @@ -91,43 +89,6 @@ physicsserver/int/universaljointint.h physicsserver/int/worldint.h - #ode-specific files - physicsserver/ode/odeangularmotor.h - physicsserver/ode/odeballjoint.h - physicsserver/ode/odebody.h - physicsserver/ode/odeboxcollider.h - physicsserver/ode/odedynamicbody.h - physicsserver/ode/odecapsulecollider.h - physicsserver/ode/odecollider.h - physicsserver/ode/odecompoundcollider.h - physicsserver/ode/odeconcavecollider.h - physicsserver/ode/odeconecollider.h - physicsserver/ode/odeconetwistjoint.h - physicsserver/ode/odecontactjointhandler.h - physicsserver/ode/odeconvexcollider.h - physicsserver/ode/odecylindercollider.h - physicsserver/ode/odeemptycollider.h - physicsserver/ode/odefixedjoint.h - physicsserver/ode/odegeneric6dofjoint.h - physicsserver/ode/odehingejoint.h - physicsserver/ode/odehinge2joint.h - physicsserver/ode/odeimpfactory.h - physicsserver/ode/odejoint.h - physicsserver/ode/odephysicsobject.h - physicsserver/ode/odephysicsserver.h - physicsserver/ode/odeplanecollider.h - physicsserver/ode/oderaycollider.h - physicsserver/ode/oderigidbody.h - physicsserver/ode/odesliderjoint.h - physicsserver/ode/odesoftbody.h - physicsserver/ode/odespace.h - physicsserver/ode/odespherecollider.h - physicsserver/ode/odestaticbody.h - physicsserver/ode/odetransformcollider.h - physicsserver/ode/odeuniversaljoint.h - physicsserver/ode/odeworld.h - physicsserver/ode/odewrapper.h - #proxyserver/agentproxy.h #proxyserver/proxyserver.h sceneserver/sceneimporter.h @@ -191,7 +152,6 @@ oxygen.cpp physicsserver/physicsobject.cpp physicsserver/physicsobject_c.cpp - physicsserver/impfactory.cpp physicsserver/body.cpp physicsserver/body_c.cpp physicsserver/rigidbody.cpp @@ -265,44 +225,8 @@ physicsserver/hinge2joint.cpp physicsserver/hinge2joint_c.cpp physicsserver/angularmotor.cpp - physicsserver/angularmotor_c.cpp + physicsserver/angularmotor_c.cpp - #ODE-specific files - physicsserver/ode/odeangularmotor.cpp - physicsserver/ode/odeballjoint.cpp - physicsserver/ode/odebody.cpp - physicsserver/ode/odeboxcollider.cpp - physicsserver/ode/odecapsulecollider.cpp - physicsserver/ode/odecollider.cpp - physicsserver/ode/odecompoundcollider.cpp - physicsserver/ode/odeconcavecollider.cpp - physicsserver/ode/odeconecollider.cpp - physicsserver/ode/odeconetwistjoint.cpp - physicsserver/ode/odecontactjointhandler.cpp - physicsserver/ode/odeconvexcollider.cpp - physicsserver/ode/odecylindercollider.cpp - physicsserver/ode/odedynamicbody.cpp - physicsserver/ode/odeemptycollider.cpp - physicsserver/ode/odefixedjoint.cpp - physicsserver/ode/odegeneric6dofjoint.cpp - physicsserver/ode/odehingejoint.cpp - physicsserver/ode/odehinge2joint.cpp - physicsserver/ode/odeimpfactory.cpp - physicsserver/ode/odejoint.cpp - physicsserver/ode/odephysicsobject.cpp - physicsserver/ode/odephysicsserver.cpp - physicsserver/ode/odeplanecollider.cpp - physicsserver/ode/oderaycollider.cpp - physicsserver/ode/oderigidbody.cpp - physicsserver/ode/odesliderjoint.cpp - physicsserver/ode/odesoftbody.cpp - physicsserver/ode/odespace.cpp - physicsserver/ode/odespherecollider.cpp - physicsserver/ode/odestaticbody.cpp - physicsserver/ode/odetransformcollider.cpp - physicsserver/ode/odeuniversaljoint.cpp - physicsserver/ode/odeworld.cpp - #proxyserver/agentproxy.cpp #proxyserver/proxyserver.cpp #proxyserver/agentproxy_c.cpp @@ -378,7 +302,7 @@ add_library(oxygen ${oxygen_LIB_SRCS} ${oxygen_LIB_HDRS}) target_link_libraries(oxygen rcssnet3D ${Boost_LIBRARIES} - ${ODE_LIBRARY} ${oxygen_require_libs}) + ${ODE_LIBRARY} ${oxygen_require_libs} odeimps) set_target_properties(oxygen PROPERTIES VERSION ${OXYGEN_VERSION} SOVERSION ${OXYGEN_SO_VERSION} DEBUG_POSTFIX _debug) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -17,10 +17,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include <../plugin/odeimps/odeangularmotor.h> #include <oxygen/physicsserver/angularmotor.h> -#include <oxygen/physicsserver/int/angularmotorint.h> #include <oxygen/physicsserver/int/jointint.h> -#include <oxygen/physicsserver/impfactory.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -31,7 +31,7 @@ AngularMotor::AngularMotor() : Joint() { - mAngularMotorImp = ImpFactory::GetInstance()->GetAngularMotorImp(); + mAngularMotorImp = boost::shared_ptr<ODEAngularMotor>(new ODEAngularMotor()); } AngularMotor::~AngularMotor() @@ -40,6 +40,10 @@ void AngularMotor::OnLink() { + //pseudocode + //CoreContext core; + //mAngularMotorImp = core.get("???/odeangularmotor") + long world = GetWorldID(); if (world == 0) { Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -17,10 +17,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <oxygen/physicsserver/int/balljointint.h> -#include <oxygen/physicsserver/int/jointint.h> + +#include <../plugin/odeimps/odeballjoint.h> #include <oxygen/physicsserver/balljoint.h> -#include <oxygen/physicsserver/impfactory.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -31,7 +30,7 @@ BallJoint::BallJoint() : Generic6DOFJoint() { - mBallJointImp = ImpFactory::GetInstance()->GetBallJointImp(); + mBallJointImp = shared_ptr<ODEBallJoint>(new ODEBallJoint()); } BallJoint::~BallJoint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -19,18 +19,19 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include <../plugin/odeimps/odebody.h> #include <oxygen/physicsserver/body.h> -#include <oxygen/physicsserver/int/bodyint.h> -#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; +using namespace boost; boost::shared_ptr<BodyInt> Body::mBodyImp; Body::Body() : PhysicsObject(), mBodyID(0), mMassTransformed(false), mMassTrans(0,0,0) { - mBodyImp = ImpFactory::GetInstance()->GetBodyImp(); + mBodyImp = shared_ptr<ODEBody>(new ODEBody()); } Body::~Body(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -21,8 +21,7 @@ */ #include <oxygen/physicsserver/boxcollider.h> -#include <oxygen/physicsserver/int/boxcolliderint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odeboxcollider.h> using namespace oxygen; using namespace salt; @@ -31,7 +30,7 @@ BoxCollider::BoxCollider() : ConvexCollider() { - mBoxColliderImp = ImpFactory::GetInstance()->GetBoxColliderImp(); + mBoxColliderImp = boost::shared_ptr<ODEBoxCollider>(new ODEBoxCollider()); } void BoxCollider::SetBoxLengths(const Vector3f& extents) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -20,8 +20,7 @@ */ #include <oxygen/physicsserver/capsulecollider.h> -#include <oxygen/physicsserver/int/capsulecolliderint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odecapsulecollider.h> using namespace oxygen; using namespace salt; @@ -30,7 +29,7 @@ CapsuleCollider::CapsuleCollider() : ConvexCollider() { - mCapsuleColliderImp = ImpFactory::GetInstance()->GetCapsuleColliderImp(); + mCapsuleColliderImp = boost::shared_ptr<ODECapsuleCollider>(new ODECapsuleCollider()); } void CapsuleCollider::SetParams(float radius, float length) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -20,8 +20,7 @@ */ #include <oxygen/physicsserver/genericphysicsobjects.h> #include <oxygen/physicsserver/collider.h> -#include <oxygen/physicsserver/int/colliderint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odecollider.h> #include <oxygen/physicsserver/collisionhandler.h> #include <oxygen/physicsserver/space.h> #include <oxygen/physicsserver/transformcollider.h> @@ -39,7 +38,7 @@ Collider::Collider() : PhysicsObject(), mGeomID(0) { - mColliderImp = ImpFactory::GetInstance()->GetColliderImp(); + mColliderImp = boost::shared_ptr<ODECollider>(new ODECollider()); } Collider::~Collider() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -20,15 +20,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/compoundcollider.h> -#include <oxygen/physicsserver/int/compoundcolliderint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odecompoundcollider.h> using namespace oxygen; boost::shared_ptr<CompoundColliderInt> CompoundCollider::mCompoundColliderImp; CompoundCollider::CompoundCollider() : Collider(){ - mCompoundColliderImp = ImpFactory::GetInstance()->GetCompoundColliderImp(); + mCompoundColliderImp = boost::shared_ptr<ODECompoundCollider>(new ODECompoundCollider());; } CompoundCollider::~CompoundCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -20,15 +20,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/concavecollider.h> -#include <oxygen/physicsserver/int/concavecolliderint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odeconcavecollider.h> using namespace oxygen; boost::shared_ptr<ConcaveColliderInt> ConcaveCollider::mConcaveColliderImp; ConcaveCollider::ConcaveCollider() : Collider(){ - mConcaveColliderImp = ImpFactory::GetInstance()->GetConcaveColliderImp(); + mConcaveColliderImp = boost::shared_ptr<ODEConcaveCollider>(new ODEConcaveCollider()); } ConcaveCollider::~ConcaveCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -20,15 +20,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/conecollider.h> -#include <oxygen/physicsserver/int/conecolliderint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odeconecollider.h> using namespace oxygen; boost::shared_ptr<ConeColliderInt> ConeCollider::mConeColliderImp; ConeCollider::ConeCollider() : ConvexCollider(){ - mConeColliderImp = ImpFactory::GetInstance()->GetConeColliderImp(); + mConeColliderImp = boost::shared_ptr<ODEConeCollider>(new ODEConeCollider()); } ConeCollider::~ConeCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -21,15 +21,14 @@ */ #include <oxygen/physicsserver/conetwistjoint.h> -#include <oxygen/physicsserver/int/conetwistjointint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odeconetwistjoint.h> using namespace oxygen; boost::shared_ptr<ConeTwistJointInt> ConeTwistJoint::mConeTwistJointImp; ConeTwistJoint::ConeTwistJoint() : Generic6DOFJoint(){ - mConeTwistJointImp = ImpFactory::GetInstance()->GetConeTwistJointImp(); + mConeTwistJointImp = boost::shared_ptr<ODEConeTwistJoint>(new ODEConeTwistJoint()); } ConeTwistJoint::~ConeTwistJoint(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -20,8 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/contactjointhandler.h> -#include <oxygen/physicsserver/int/contactjointhandlerint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odecontactjointhandler.h> #include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/space.h> #include <oxygen/physicsserver/world.h> @@ -34,7 +33,7 @@ ContactJointHandler::ContactJointHandler() : CollisionHandler() { - mContactJointHandlerImp = ImpFactory::GetInstance()->GetContactJointHandlerImp(); + mContactJointHandlerImp = boost::shared_ptr<ODEContactJointHandler>(new ODEContactJointHandler()); mSurfaceParameter = mContactJointHandlerImp->Initialize(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -20,15 +20,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/convexcollider.h> -#include <oxygen/physicsserver/int/convexcolliderint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odeconvexcollider.h> using namespace oxygen; boost::shared_ptr<ConvexColliderInt> ConvexCollider::mConvexColliderImp; ConvexCollider::ConvexCollider() : Collider(){ - mConvexColliderImp = ImpFactory::GetInstance()->GetConvexColliderImp(); + mConvexColliderImp = boost::shared_ptr<ODEConvexCollider>(new ODEConvexCollider()); } ConvexCollider::~ConvexCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -20,15 +20,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/cylindercollider.h> -#include <oxygen/physicsserver/int/cylindercolliderint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odecylindercollider.h> using namespace oxygen; boost::shared_ptr<CylinderColliderInt> CylinderCollider::mCylinderColliderImp; CylinderCollider::CylinderCollider() : ConvexCollider(){ - mCylinderColliderImp = ImpFactory::GetInstance()->GetCylinderColliderImp(); + mCylinderColliderImp = boost::shared_ptr<ODECylinderCollider>(new ODECylinderCollider()); } CylinderCollider::~CylinderCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -20,15 +20,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/dynamicbody.h> -#include <oxygen/physicsserver/int/dynamicbodyint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odedynamicbody.h> using namespace oxygen; boost::shared_ptr<DynamicBodyInt> DynamicBody::mDynamicBodyImp; DynamicBody::DynamicBody() : Body(){ - mDynamicBodyImp = ImpFactory::GetInstance()->GetDynamicBodyImp(); + mDynamicBodyImp = boost::shared_ptr<ODEDynamicBody>(new ODEDynamicBody()); } DynamicBody::~DynamicBody(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -19,16 +19,16 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include <../plugin/odeimps/odeemptycollider.h> #include <oxygen/physicsserver/emptycollider.h> -#include <oxygen/physicsserver/int/emptycolliderint.h> -#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; boost::shared_ptr<EmptyColliderInt> EmptyCollider::mEmptyColliderImp; EmptyCollider::EmptyCollider() : Collider(){ - mEmptyColliderImp = ImpFactory::GetInstance()->GetEmptyColliderImp(); + mEmptyColliderImp = boost::shared_ptr<ODEEmptyCollider>(new ODEEmptyCollider()); } EmptyCollider::~EmptyCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -18,8 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/fixedjoint.h> -#include <oxygen/physicsserver/int/fixedjointint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odefixedjoint.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -28,7 +27,7 @@ FixedJoint::FixedJoint() : Generic6DOFJoint() { - mFixedJointImp = ImpFactory::GetInstance()->GetFixedJointImp(); + mFixedJointImp = boost::shared_ptr<ODEFixedJoint>(new ODEFixedJoint()); } FixedJoint::~FixedJoint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -21,15 +21,14 @@ */ #include <oxygen/physicsserver/generic6dofjoint.h> -#include <oxygen/physicsserver/int/generic6dofjointint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odegeneric6dofjoint.h> using namespace oxygen; boost::shared_ptr<Generic6DOFJointInt> Generic6DOFJoint::mGeneric6DOFJointImp; Generic6DOFJoint::Generic6DOFJoint() : Joint(){ - mGeneric6DOFJointImp = ImpFactory::GetInstance()->GetGeneric6DOFJointImp(); + mGeneric6DOFJointImp = boost::shared_ptr<ODEGeneric6DOFJoint>(new ODEGeneric6DOFJoint()); } Generic6DOFJoint::~Generic6DOFJoint(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -18,8 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/hinge2joint.h> -#include <oxygen/physicsserver/int/hinge2jointint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odehinge2joint.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -30,7 +29,7 @@ Hinge2Joint::Hinge2Joint() : Generic6DOFJoint() { - mHinge2JointImp = ImpFactory::GetInstance()->GetHinge2JointImp(); + mHinge2JointImp = boost::shared_ptr<ODEHinge2Joint>(new ODEHinge2Joint()); } Hinge2Joint::~Hinge2Joint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -18,9 +18,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/hingejoint.h> -#include <oxygen/physicsserver/int/hingejointint.h> +#include <../plugin/odeimps/odehingejoint.h> #include <oxygen/physicsserver/int/jointint.h> -#include <oxygen/physicsserver/impfactory.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -31,7 +30,7 @@ HingeJoint::HingeJoint() : Generic6DOFJoint() { - mHingeJointImp = ImpFactory::GetInstance()->GetHingeJointImp(); + mHingeJointImp = boost::shared_ptr<ODEHingeJoint>(new ODEHingeJoint()); } HingeJoint::~HingeJoint() Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -1,274 +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: hingejoint.h 138 2010-01-08 07:35:25Z 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. -*/ - -#include <oxygen/physicsserver/impfactory.h> -#include <oxygen/physicsserver/int/impfactoryint.h> -#include <oxygen/physicsserver/ode/odeimpfactory.h> - -#include <oxygen/physicsserver/int/angularmotorint.h> -#include <oxygen/physicsserver/int/balljointint.h> -#include <oxygen/physicsserver/int/bodyint.h> -#include <oxygen/physicsserver/int/boxcolliderint.h> -#include <oxygen/physicsserver/int/capsulecolliderint.h> -#include <oxygen/physicsserver/int/colliderint.h> -#include <oxygen/physicsserver/int/compoundcolliderint.h> -#include <oxygen/physicsserver/int/concavecolliderint.h> -#include <oxygen/physicsserver/int/conecolliderint.h> -#include <oxygen/physicsserver/int/conetwistjointint.h> -#include <oxygen/physicsserver/int/contactjointhandlerint.h> -#include <oxygen/physicsserver/int/convexcolliderint.h> -#include <oxygen/physicsserver/int/cylindercolliderint.h> -#include <oxygen/physicsserver/int/dynamicbodyint.h> -#include <oxygen/physicsserver/int/emptycolliderint.h> -#include <oxygen/physicsserver/int/fixedjointint.h> -#include <oxygen/physicsserver/int/generic6dofjointint.h> -#include <oxygen/physicsserver/int/hinge2jointint.h> -#include <oxygen/physicsserver/int/hingejointint.h> -#include <oxygen/physicsserver/int/jointint.h> -#include <oxygen/physicsserver/int/physicsobjectint.h> -#include <oxygen/physicsserver/int/physicsserverint.h> -#include <oxygen/physicsserver/int/planecolliderint.h> -#include <oxygen/physicsserver/int/raycolliderint.h> -#include <oxygen/physicsserver/int/rigidbodyint.h> -#include <oxygen/physicsserver/int/sliderjointint.h> -#include <oxygen/physicsserver/int/softbodyint.h> -#include <oxygen/physicsserver/int/spaceint.h> -#include <oxygen/physicsserver/int/spherecolliderint.h> -#include <oxygen/physicsserver/int/staticbodyint.h> -#include <oxygen/physicsserver/int/transformcolliderint.h> -#include <oxygen/physicsserver/int/universaljointint.h> -#include <oxygen/physicsserver/int/worldint.h> - -using namespace oxygen; -using namespace boost; - -boost::shared_ptr<ImpFactory> ImpFactory::mInstance; - -ImpFactory::ImpFactory(){ - mImpFactoryImp = boost::shared_ptr<ODEImpFactory>(new ODEImpFactory()); -} - -ImpFactory::~ImpFactory(){ - -} - -shared_ptr<ImpFactory> ImpFactory::GetInstance(){ - if (mInstance.get() == 0) - mInstance = shared_ptr<ImpFactory>(new ImpFactory()); - return mInstance; -} - -shared_ptr<AngularMotorInt> ImpFactory::GetAngularMotorImp(){ - if (mAngularMotorImp.get() == 0) - mAngularMotorImp = mImpFactoryImp->CreateAngularMotorImp(); - return mAngularMotorImp; -} - -shared_ptr<BallJointInt> ImpFactory::GetBallJointImp(){ - if (mBallJointImp.get() == 0) - mBallJointImp = mImpFactoryImp->CreateBallJointImp(); - return mBallJointImp; -} - -shared_ptr<BodyInt> ImpFactory::GetBodyImp(){ - if (mBodyImp.get() == 0) - mBodyImp = mImpFactoryImp->CreateBodyImp(); - return mBodyImp; -} - -shared_ptr<BoxColliderInt> ImpFactory::GetBoxColliderImp(){ - if (mBoxColliderImp.get() == 0) - mBoxColliderImp = mImpFactoryImp->CreateBoxColliderImp(); - return mBoxColliderImp; -} - -shared_ptr<CapsuleColliderInt> ImpFactory::GetCapsuleColliderImp(){ - if (mCapsuleColliderImp.get() == 0) - mCapsuleColliderImp = mImpFactoryImp->CreateCapsuleColliderImp(); - return mCapsuleColliderImp; -} - -shared_ptr<ColliderInt> ImpFactory::GetColliderImp(){ - if (mColliderImp.get() == 0) - mColliderImp = mImpFactoryImp->CreateColliderImp(); - return mColliderImp; -} - -shared_ptr<CompoundColliderInt> ImpFactory::GetCompoundColliderImp(){ - if (mCompoundColliderImp.get() == 0) - mCompoundColliderImp = mImpFactoryImp->CreateCompoundColliderImp(); - return mCompoundColliderImp; -} - -shared_ptr<ConcaveColliderInt> ImpFactory::GetConcaveColliderImp(){ - if (mConcaveColliderImp.get() == 0) - mConcaveColliderImp = mImpFactoryImp->CreateConcaveColliderImp(); - return mConcaveColliderImp; -} - -shared_ptr<ConeColliderInt> ImpFactory::GetConeColliderImp(){ - if (mConeColliderImp.get() == 0) - mConeColliderImp = mImpFactoryImp->CreateConeColliderImp(); - return mConeColliderImp; -} - -shared_ptr<ConeTwistJointInt> ImpFactory::GetConeTwistJointImp(){ - if (mConeTwistJointImp.get() == 0) - mConeTwistJointImp = mImpFactoryImp->CreateConeTwistJointImp(); - return mConeTwistJointImp; -} - -shared_ptr<ContactJointHandlerInt> ImpFactory::GetContactJointHandlerImp(){ - if (mContactJointHandlerImp.get() == 0) - mContactJointHandlerImp = mImpFactoryImp->CreateContactJointHandlerImp(); - return mContactJointHandlerImp; -} - -shared_ptr<ConvexColliderInt> ImpFactory::GetConvexColliderImp(){ - if (mConvexColliderImp.get() == 0) - mConvexColliderImp = mImpFactoryImp->CreateConvexColliderImp(); - return mConvexColliderImp; -} - -shared_ptr<CylinderColliderInt> ImpFactory::GetCylinderColliderImp(){ - if (mCylinderColliderImp.get() == 0) - mCylinderColliderImp = mImpFactoryImp->CreateCylinderColliderImp(); - return mCylinderColliderImp; -} - -shared_ptr<DynamicBodyInt> ImpFactory::GetDynamicBodyImp(){ - if (mDynamicBodyImp.get() == 0) - mDynamicBodyImp = mImpFactoryImp->CreateDynamicBodyImp(); - return mDynamicBodyImp; -} - -shared_ptr<EmptyColliderInt> ImpFactory::GetEmptyColliderImp(){ - if (mEmptyColliderImp.get() == 0) - mEmptyColliderImp = mImpFactoryImp->CreateEmptyColliderImp(); - return mEmptyColliderImp; -} - -shared_ptr<FixedJointInt> ImpFactory::GetFixedJointImp(){ - if (mFixedJointImp.get() == 0) - mFixedJointImp = mImpFactoryImp->CreateFixedJointImp(); - return mFixedJointImp; -} - -shared_ptr<Generic6DOFJointInt> ImpFactory::GetGeneric6DOFJointImp(){ - if (mGeneric6DOFJointImp.get() == 0) - mGeneric6DOFJointImp = mImpFactoryImp->CreateGeneric6DOFJointImp(); - return mGeneric6DOFJointImp; -} - -shared_ptr<Hinge2JointInt> ImpFactory::GetHinge2JointImp(){ - if (mHinge2JointImp.get() == 0) - mHinge2JointImp = mImpFactoryImp->CreateHinge2JointImp(); - return mHinge2JointImp; -} - -shared_ptr<HingeJointInt> ImpFactory::GetHingeJointImp(){ - if (mHingeJointImp.get() == 0) - mHingeJointImp = mImpFactoryImp->CreateHingeJointImp(); - return mHingeJointImp; -} - -shared_ptr<JointInt> ImpFactory::GetJointImp(){ - if (mJointImp.get() == 0) - mJointImp = mImpFactoryImp->CreateJointImp(); - return mJointImp; -} - -shared_ptr<PhysicsObjectInt> ImpFactory::GetPhysicsObjectImp(){ - if (mPhysicsObjectImp.get() == 0) - mPhysicsObjectImp = mImpFactoryImp->CreatePhysicsObjectImp(); - return mPhysicsObjectImp; -} - -shared_ptr<PhysicsServerInt> ImpFactory::GetPhysicsServerImp(){ - if (mPhysicsServerImp.get() == 0) - mPhysicsServerImp = mImpFactoryImp->CreatePhysicsServerImp(); - return mPhysicsServerImp; -} - -shared_ptr<PlaneColliderInt> ImpFactory::GetPlaneColliderImp(){ - if (mPlaneColliderImp.get() == 0) - mPlaneColliderImp = mImpFactoryImp->CreatePlaneColliderImp(); - return mPlaneColliderImp; -} - -shared_ptr<RayColliderInt> ImpFactory::GetRayColliderImp(){ - if (mRayColliderImp.get() == 0) - mRayColliderImp = mImpFactoryImp->CreateRayColliderImp(); - return mRayColliderImp; -} - -shared_ptr<RigidBodyInt> ImpFactory::GetRigidBodyImp(){ - if (mRigidBodyImp.get() == 0) - mRigidBodyImp = mImpFactoryImp->CreateRigidBodyImp(); - return mRigidBodyImp; -} - -shared_ptr<SliderJointInt> ImpFactory::GetSliderJointImp(){ - if (mSliderJointImp.get() == 0) - mSliderJointImp = mImpFactoryImp->CreateSliderJointImp(); - return mSliderJointImp; -} - -shared_ptr<SoftBodyInt> ImpFactory::GetSoftBodyImp(){ - if (mSoftBodyImp.get() == 0) - mSoftBodyImp = mImpFactoryImp->CreateSoftBodyImp(); - return mSoftBodyImp; -} - -shared_ptr<SpaceInt> ImpFactory::GetSpaceImp(){ - if (mSpaceImp.get() == 0) - mSpaceImp = mImpFactoryImp->CreateSpaceImp(); - return mSpaceImp; -} - -shared_ptr<SphereColliderInt> ImpFactory::GetSphereColliderImp(){ - if (mSphereColliderImp.get() == 0) - mSphereColliderImp = mImpFactoryImp->CreateSphereColliderImp(); - return mSphereColliderImp; -} - -shared_ptr<StaticBodyInt> ImpFactory::GetStaticBodyImp(){ - if (mStaticBodyImp.get() == 0) - mStaticBodyImp = mImpFactoryImp->CreateStaticBodyImp(); - return mStaticBodyImp; -} - -shared_ptr<TransformColliderInt> ImpFactory::GetTransformColliderImp(){ - if (mTransformColliderImp.get() == 0) - mTransformColliderImp = mImpFactoryImp->CreateTransformColliderImp(); - return mTransformColliderImp; -} - -shared_ptr<UniversalJointInt> ImpFactory::GetUniversalJointImp(){ - if (mUniversalJointImp.get() == 0) - mUniversalJointImp = mImpFactoryImp->CreateUniversalJointImp(); - return mUniversalJointImp; -} - -shared_ptr<WorldInt> ImpFactory::GetWorldImp(){ - if (mWorldImp.get() == 0) - mWorldImp = mImpFactoryImp->CreateWorldImp(); - return mWorldImp; -} Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.h 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.h 2010-02-19 03:14:27 UTC (rev 166) @@ -1,146 +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: hingejoint.h 138 2010-01-08 07:35:25Z 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_IMPFACTORY_H -#define OXYGEN_IMPFACTORY_H - -#include <oxygen/oxygen_defines.h> -#include <boost/shared_ptr.hpp> - -namespace oxygen{ - -class ImpFactoryInt; -class AngularMotorInt; -class BallJointInt; -class BodyInt; -class BoxColliderInt; -class CapsuleColliderInt; -class ColliderInt; -class CompoundColliderInt; -class ConcaveColliderInt; -class ConeColliderInt; -class ConeTwistJointInt; -class ContactJointHandlerInt; -class ConvexColliderInt; -class CylinderColliderInt; -class DynamicBodyInt; -class EmptyColliderInt; -class FixedJointInt; -class Generic6DOFJointInt; -class Hinge2JointInt; -class HingeJointInt; -class JointInt; -class PhysicsObjectInt; -class PhysicsServerInt; -class PlaneColliderInt; -class RayColliderInt; -class RigidBodyInt; -class SliderJointInt; -class SoftBodyInt; -class SpaceInt; -class SphereColliderInt; -class StaticBodyInt; -class TransformColliderInt; -class UniversalJointInt; -class WorldInt; - -class OXYGEN_API ImpFactory{ - -public: - ImpFactory(); - virtual ~ImpFactory(); - - static boost::shared_ptr<ImpFactory> GetInstance(); - boost::shared_ptr<AngularMotorInt> GetAngularMotorImp(); - boost::shared_ptr<BallJointInt> GetBallJointImp(); - boost::shared_ptr<BodyInt> GetBodyImp(); - boost::shared_ptr<BoxColliderInt> GetBoxColliderImp(); - boost::shared_ptr<CapsuleColliderInt> GetCapsuleColliderImp(); - boost::shared_ptr<ColliderInt> GetColliderImp(); - boost::shared_ptr<CompoundColliderInt> GetCompoundColliderImp(); - boost::shared_ptr<ConcaveColliderInt> GetConcaveColliderImp(); - boost::shared_ptr<ConeColliderInt> GetConeColliderImp(); - boost::shared_ptr<ConeTwistJointInt> GetConeTwistJointImp(); - boost::shared_ptr<ContactJointHandlerInt> GetContactJointHandlerImp(); - boost::shared_ptr<ConvexColliderInt> GetConvexColliderImp(); - boost::shared_ptr<CylinderColliderInt> GetCylinderColliderImp(); - boost::shared_ptr<DynamicBodyInt> GetDynamicBodyImp(); - boost::shared_ptr<EmptyColliderInt> GetEmptyColliderImp(); - boost::shared_ptr<FixedJointInt> GetFixedJointImp(); - boost::shared_ptr<Generic6DOFJointInt> GetGeneric6DOFJointImp(); - boost::shared_ptr<Hinge2JointInt> GetHinge2JointImp(); - boost::shared_ptr<HingeJointInt> GetHingeJointImp(); - boost::shared_ptr<JointInt> GetJointImp(); - boost::shared_ptr<PhysicsObjectInt> GetPhysicsObjectImp(); - boost::shared_ptr<PhysicsServerInt> GetPhysicsServerImp(); - boost::shared_ptr<PlaneColliderInt> GetPlaneColliderImp(); - boost::shared_ptr<RayColliderInt> GetRayColliderImp(); - boost::shared_ptr<RigidBodyInt> GetRigidBodyImp(); - boost::shared_ptr<SliderJointInt> GetSliderJointImp(); - boost::shared_ptr<SoftBodyInt> GetSoftBodyImp(); - boost::shared_ptr<SpaceInt> GetSpaceImp(); - boost::shared_ptr<SphereColliderInt> GetSphereColliderImp(); - boost::shared_ptr<StaticBodyInt> GetStaticBodyImp(); - boost::shared_ptr<TransformColliderInt> GetTransformColliderImp(); - boost::shared_ptr<UniversalJointInt> GetUniversalJointImp(); - boost::shared_ptr<WorldInt> GetWorldImp(); - -protected: - boost::shared_ptr<ImpFactoryInt> mImpFactoryImp; - -private: - static boost::shared_ptr<ImpFactory> mInstance; - boost::shared_ptr<AngularMotorInt> mAngularMotorImp; - boost::shared_ptr<BallJointInt> mBallJointImp; - boost::shared_ptr<BodyInt> mBodyImp; - boost::shared_ptr<BoxColliderInt> mBoxColliderImp; - boost::shared_ptr<CapsuleColliderInt> mCapsuleColliderImp; - boost::shared_ptr<ColliderInt> mColliderImp; - boost::shared_ptr<CompoundColliderInt> mCompoundColliderImp; - boost::shared_ptr<ConcaveColliderInt> mConcaveColliderImp; - boost::shared_ptr<ConeColliderInt> mConeColliderImp; - boost::shared_ptr<ConeTwistJointInt> mConeTwistJointImp; - boost::shared_ptr<ContactJointHandlerInt> mContactJointHandlerImp; - boost::shared_ptr<ConvexColliderInt> mConvexColliderImp; - boost::shared_ptr<CylinderColliderInt> mCylinderColliderImp; - boost::shared_ptr<DynamicBodyInt> mDynamicBodyImp; - boost::shared_ptr<EmptyColliderInt> mEmptyColliderImp; - boost::shared_ptr<FixedJointInt> mFixedJointImp; - boost::shared_ptr<Generic6DOFJointInt> mGeneric6DOFJointImp; - boost::shared_ptr<Hinge2JointInt> mHinge2JointImp; - boost::shared_ptr<HingeJointInt> mHingeJointImp; - boost::shared_ptr<JointInt> mJointImp; - boost::shared_ptr<PhysicsObjectInt> mPhysicsObjectImp; - boost::shared_ptr<PhysicsServerInt> mPhysicsServerImp; - boost::shared_ptr<PlaneColliderInt> mPlaneColliderImp; - boost::shared_ptr<RayColliderInt> mRayColliderImp; - boost::shared_ptr<RigidBodyInt> mRigidBodyImp; - boost::shared_ptr<SliderJointInt> mSliderJointImp; - boost::shared_ptr<SoftBodyInt> mSoftBodyImp; - boost::shared_ptr<SpaceInt> mSpaceImp; - boost::shared_ptr<SphereColliderInt> mSphereColliderImp; - boost::shared_ptr<StaticBodyInt> mStaticBodyImp; - boost::shared_ptr<TransformColliderInt> mTransformColliderImp; - boost::shared_ptr<UniversalJointInt> mUniversalJointImp; - boost::shared_ptr<WorldInt> mWorldImp; -}; - -} //namespace oxygen - -#endif //OXYGEN_IMPFACTORY_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-02-19 03:14:27 UTC (rev 166) @@ -23,7 +23,6 @@ #ifndef OXYGEN_COLLIDERINT_H #define OXYGEN_COLLIDERINT_H -#include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/oxygen_defines.h> #include <salt/matrix.h> #include <set> Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-02-19 03:14:27 UTC (rev 166) @@ -23,8 +23,6 @@ #ifndef OXYGEN_CONTACTJOINTHANDLERINT_H #define OXYGEN_CONTACTJOINTHANDLERINT_H -#include <oxygen/physicsserver/ode/odewrapper.h> - #include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/genericphysicsobjects.h> Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/impfactoryint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/impfactoryint.h 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/impfactoryint.h 2010-02-19 03:14:27 UTC (rev 166) @@ -1,102 +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: hingejoint.h 138 2010-01-08 07:35:25Z 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_IMPFACTORYINT_H -#define OXYGEN_IMPFACTORYINT_H - -#include <oxygen/oxygen_defines.h> -#include <boost/shared_ptr.hpp> - -namespace oxygen{ - -class AngularMotorInt; -class BallJointInt; -class BodyInt; -class BoxColliderInt; -class CapsuleColliderInt; -class ColliderInt; -class CompoundColliderInt; -class ConcaveColliderInt; -class ConeColliderInt; -class ConeTwistJointInt; -class ContactJointHandlerInt; -class ConvexColliderInt; -class CylinderColliderInt; -class DynamicBodyInt; -class EmptyColliderInt; -class FixedJointInt; -class Generic6DOFJointInt; -class Hinge2JointInt; -class HingeJointInt; -class JointInt; -class PhysicsObjectInt; -class PhysicsServerInt; -class PlaneColliderInt; -class RayColliderInt; -class RigidBodyInt; -class SliderJointInt; -class SoftBodyInt; -class SpaceInt; -class SphereColliderInt; -class StaticBodyInt; -class TransformColliderInt; -class UniversalJointInt; -class WorldInt; - -class OXYGEN_API ImpFactoryInt{ - -public: - virtual boost::shared_ptr<AngularMotorInt> CreateAngularMotorImp() = 0; - virtual boost::shared_ptr<BallJointInt> CreateBallJointImp() = 0; - virtual boost::shared_ptr<BodyInt> CreateBodyImp() = 0; - virtual boost::shared_ptr<BoxColliderInt> CreateBoxColliderImp() = 0; - virtual boost::shared_ptr<CapsuleColliderInt> CreateCapsuleColliderImp() = 0; - virtual boost::shared_ptr<ColliderInt> CreateColliderImp() = 0; - virtual boost::shared_ptr<CompoundColliderInt> CreateCompoundColliderImp() = 0; - virtual boost::shared_ptr<ConcaveColliderInt> CreateConcaveColliderImp() = 0; - virtual boost::shared_ptr<ConeColliderInt> CreateConeColliderImp() = 0; - virtual boost::shared_ptr<ConeTwistJointInt> CreateConeTwistJointImp() = 0; - virtual boost::shared_ptr<ContactJointHandlerInt> CreateContactJointHandlerImp() = 0; - virtual boost::shared_ptr<ConvexColliderInt> CreateConvexColliderImp() = 0; - virtual boost::shared_ptr<CylinderColliderInt> CreateCylinderColliderImp() = 0; - virtual boost::shared_ptr<DynamicBodyInt> CreateDynamicBodyImp() = 0; - virtual boost::shared_ptr<EmptyColliderInt> CreateEmptyColliderImp() = 0; - virtual boost::shared_ptr<FixedJointInt> CreateFixedJointImp() = 0; - virtual boost::shared_ptr<Generic6DOFJointInt> CreateGeneric6DOFJointImp() = 0; - virtual boost::shared_ptr<Hinge2JointInt> CreateHinge2JointImp() = 0; - virtual boost::shared_ptr<HingeJointInt> CreateHingeJointImp() = 0; - virtual boost::shared_ptr<JointInt> CreateJointImp() = 0; - virtual boost::shared_ptr<PhysicsObjectInt> CreatePhysicsObjectImp() = 0; - virtual boost::shared_ptr<PhysicsServerInt> CreatePhysicsServerImp() = 0; - virtual boost::shared_ptr<PlaneColliderInt> CreatePlaneColliderImp() = 0; - virtual boost::shared_ptr<RayColliderInt> CreateRayColliderImp() = 0; - virtual boost::shared_ptr<RigidBodyInt> CreateRigidBodyImp() = 0; - virtual boost::shared_ptr<SliderJointInt> CreateSliderJointImp() = 0; - virtual boost::shared_ptr<SoftBodyInt> CreateSoftBodyImp() = 0; - virtual boost::shared_ptr<SpaceInt> CreateSpaceImp() = 0; - virtual boost::shared_ptr<SphereColliderInt> CreateSphereColliderImp() = 0; - virtual boost::shared_ptr<StaticBodyInt> CreateStaticBodyImp() = 0; - virtual boost::shared_ptr<TransformColliderInt> CreateTransformColliderImp() = 0; - virtual boost::shared_ptr<UniversalJointInt> CreateUniversalJointImp() = 0; - virtual boost::shared_ptr<WorldInt> CreateWorldImp() = 0; -}; - -} //namespace oxygen - -#endif //OXYGEN_IMPFACTORYINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-02-19 03:14:27 UTC (rev 166) @@ -24,7 +24,6 @@ #define OXYGEN_JOINTINT_H #include <oxygen/physicsserver/genericphysicsobjects.h> -#include <oxygen/physicsserver/ode/odewrapper.h> #include <boost/smart_ptr/shared_ptr.hpp> #include <salt/vector.h> #include <oxygen/oxygen_defines.h> Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2010-02-19 03:14:27 UTC (rev 166) @@ -23,7 +23,6 @@ #ifndef OXYGEN_TRANSFORMCOLLIDERINT_H #define OXYGEN_TRANSFORMCOLLIDERINT_H -#include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/oxygen_defines.h> #include <set> #include <string> Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -19,8 +19,7 @@ */ #include <oxygen/physicsserver/joint.h> #include <oxygen/physicsserver/rigidbody.h> -#include <oxygen/physicsserver/impfactory.h> -#include <oxygen/physicsserver/int/jointint.h> +#include <../plugin/odeimps/odejoint.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -35,7 +34,7 @@ mJointMaxSpeed1(0), mJointMaxSpeed2(0), mIsLimitJointMaxSpeed1(false), mIsLimitJointMaxSpeed2(false) { - mJointImp = ImpFactory::GetInstance()->GetJointImp(); + mJointImp = boost::shared_ptr<ODEJoint>(new ODEJoint()); } Joint::~Joint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2010-02-19 03:14:27 UTC (rev 166) @@ -23,7 +23,6 @@ #define OXYGEN_JOINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/physicsserver/physicsobject.h> #include <oxygen/physicsserver/genericphysicsobjects.h> Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -24,8 +24,7 @@ #include <oxygen/physicsserver/physicsobject.h> #include <oxygen/physicsserver/space.h> #include <oxygen/physicsserver/world.h> -#include <oxygen/physicsserver/int/physicsobjectint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odephysicsobject.h> #include <oxygen/sceneserver/scene.h> #include <zeitgeist/logserver/logserver.h> @@ -36,7 +35,7 @@ PhysicsObject::PhysicsObject() : BaseNode() { - mPhysicsObjectImp = ImpFactory::GetInstance()->GetPhysicsObjectImp(); + mPhysicsObjectImp = boost::shared_ptr<ODEPhysicsObject>(new ODEPhysicsObject()); } PhysicsObject::~PhysicsObject() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -20,8 +20,7 @@ */ #include <oxygen/physicsserver/physicsserver.h> -#include <oxygen/physicsserver/int/physicsserverint.h> -#include <oxygen/physicsserver/impfactory.h> +#include <../plugin/odeimps/odephysicsserver.h> #include <oxygen/physicsserver/rigidbody.h> #include <oxygen/physicsserver/world.h> #include <oxygen/physicsserver/space.h> @@ -38,7 +37,7 @@ PhysicsServer::PhysicsServer() : Leaf() { - mPhysicsServerImp = ImpFactory::GetInstance()->GetPhysicsServerImp(); + mPhysicsServerImp = boost::shared_ptr<ODEPhysicsServer>(new ODEPhysicsServer()); } void PhysicsServer::ResetCache(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp 2010-02-17 05:04:55 UTC (rev 165) +++ branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp 2010-02-19 03:14:27 UTC (rev 166) @@ -20,8 +20,7 @@ */ #include <oxygen/physicsserver/planecollider.h> -#include <oxygen/physics... [truncated message content] |
From: <a-...@us...> - 2010-02-17 05:05:03
|
Revision: 165 http://simspark.svn.sourceforge.net/simspark/?rev=165&view=rev Author: a-held Date: 2010-02-17 05:04:55 +0000 (Wed, 17 Feb 2010) Log Message: ----------- Undo changes made to physicsserver made in r164 and r163 implemented first and thought later. Sorry :-( Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/oxygen.cpp branches/multiphys/spark/lib/oxygen/oxygen.h branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/softbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/staticbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h Removed Paths: ------------- branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/softbodyint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/staticbodyint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint_c.cpp Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-02-17 05:04:55 UTC (rev 165) @@ -265,44 +265,8 @@ physicsserver/hinge2joint.cpp physicsserver/hinge2joint_c.cpp physicsserver/angularmotor.cpp - physicsserver/angularmotor_c.cpp + physicsserver/angularmotor_c.cpp - #interfaces - physicsserver/int/angularmotorint_c.cpp - physicsserver/int/balljointint_c.cpp - physicsserver/int/bodyint_c.cpp - physicsserver/int/boxcolliderint_c.cpp - physicsserver/int/capsulecolliderint_c.cpp - physicsserver/int/colliderint_c.cpp - physicsserver/int/compoundcolliderint_c.cpp - physicsserver/int/concavecolliderint_c.cpp - physicsserver/int/conecolliderint_c.cpp - physicsserver/int/conetwistjointint_c.cpp - physicsserver/int/contactjointhandlerint_c.cpp - physicsserver/int/convexcolliderint_c.cpp - physicsserver/int/cylindercolliderint_c.cpp - physicsserver/int/dynamicbodyint_c.cpp - physicsserver/int/emptycolliderint_c.cpp - physicsserver/int/fixedjointint_c.cpp - physicsserver/int/generic6dofjointint_c.cpp - physicsserver/int/hinge2jointint_c.cpp - physicsserver/int/hingejointint_c.cpp - physicsserver/int/jointint_c.cpp - physicsserver/int/physicsobjectint_c.cpp - physicsserver/int/physicsserverint_c.cpp - physicsserver/int/planecolliderint_c.cpp - physicsserver/int/raycolliderint_c.cpp - physicsserver/int/rigidbodyint_c.cpp - physicsserver/int/sliderjointint_c.cpp - physicsserver/int/softbodyint_c.cpp - physicsserver/int/spaceint_c.cpp - physicsserver/int/spherecolliderint_c.cpp - physicsserver/int/staticbodyint_c.cpp - physicsserver/int/transformcolliderint_c.cpp - physicsserver/int/universaljointint_c.cpp - physicsserver/int/worldint_c.cpp - - #ODE-specific files physicsserver/ode/odeangularmotor.cpp physicsserver/ode/odeballjoint.cpp Modified: branches/multiphys/spark/lib/oxygen/oxygen.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/oxygen.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/oxygen.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -94,41 +94,6 @@ zg.GetCore()->RegisterClassObject(new CLASS(CollisionHandler), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(ContactJointHandler), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(RecorderHandler), "oxygen/"); - - // implementations - zg.GetCore()->RegisterClassObject(new CLASS(AngularMotorInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(BallJointInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(BodyInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(BoxColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(CapsuleColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(ColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(CompoundColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(ConcaveColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(ConeColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(ConeTwistJointInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(ContactJointHandlerInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(ConvexColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(CylinderColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(DynamicBodyInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(EmptyColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(FixedJointInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(Generic6DOFJointInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(Hinge2JointInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(HingeJointInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(JointInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(PhysicsObjectInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(PhysicsServerInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(PlaneColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(RayColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(RigidBodyInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(SliderJointInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(SoftBodyInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(SpaceInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(SphereColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(StaticBodyInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(TransformColliderInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(UniversalJointInt), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(WorldInt), "oxygen/"); // agentaspect zg.GetCore()->RegisterClassObject(new CLASS(AgentAspect), "oxygen/"); Modified: branches/multiphys/spark/lib/oxygen/oxygen.h =================================================================== --- branches/multiphys/spark/lib/oxygen/oxygen.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/oxygen.h 2010-02-17 05:04:55 UTC (rev 165) @@ -74,42 +74,6 @@ #include <oxygen/physicsserver/universaljoint.h> #include <oxygen/physicsserver/hinge2joint.h> -//implementations -#include <oxygen/physicsserver/int/angularmotorint.h> -#include <oxygen/physicsserver/int/balljointint.h> -#include <oxygen/physicsserver/int/bodyint.h> -#include <oxygen/physicsserver/int/boxcolliderint.h> -#include <oxygen/physicsserver/int/capsulecolliderint.h> -#include <oxygen/physicsserver/int/colliderint.h> -#include <oxygen/physicsserver/int/compoundcolliderint.h> -#include <oxygen/physicsserver/int/concavecolliderint.h> -#include <oxygen/physicsserver/int/conecolliderint.h> -#include <oxygen/physicsserver/int/conetwistjointint.h> -#include <oxygen/physicsserver/int/contactjointhandlerint.h> -#include <oxygen/physicsserver/int/convexcolliderint.h> -#include <oxygen/physicsserver/int/cylindercolliderint.h> -#include <oxygen/physicsserver/int/dynamicbodyint.h> -#include <oxygen/physicsserver/int/emptycolliderint.h> -#include <oxygen/physicsserver/int/fixedjointint.h> -#include <oxygen/physicsserver/int/generic6dofjointint.h> -#include <oxygen/physicsserver/int/hinge2jointint.h> -#include <oxygen/physicsserver/int/hingejointint.h> -#include <oxygen/physicsserver/int/jointint.h> -#include <oxygen/physicsserver/int/physicsobjectint.h> -#include <oxygen/physicsserver/int/physicsserverint.h> -#include <oxygen/physicsserver/int/planecolliderint.h> -#include <oxygen/physicsserver/int/raycolliderint.h> -#include <oxygen/physicsserver/int/rigidbodyint.h> -#include <oxygen/physicsserver/int/sliderjointint.h> -#include <oxygen/physicsserver/int/softbodyint.h> -#include <oxygen/physicsserver/int/spaceint.h> -#include <oxygen/physicsserver/int/spherecolliderint.h> -#include <oxygen/physicsserver/int/staticbodyint.h> -#include <oxygen/physicsserver/int/transformcolliderint.h> -#include <oxygen/physicsserver/int/universaljointint.h> -#include <oxygen/physicsserver/int/worldint.h> - - #include <oxygen/sceneserver/basenode.h> #include <oxygen/sceneserver/camera.h> #include <oxygen/sceneserver/fpscontroller.h> Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -25,7 +25,6 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { @@ -38,7 +37,7 @@ rotation about those axes. */ -class OXYGEN_API AngularMotorInt : public BaseNode +class OXYGEN_API AngularMotorInt { public: /** Creates a new angular motor within the physics world specified @@ -107,8 +106,6 @@ virtual float GetAxisAngleRate(int idx, long jointID) = 0; }; -DECLARE_ABSTRACTCLASS(AngularMotorInt); - } //namespace oxygen #endif //OXYGEN_ANGULARMOTORINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/angularmotorint.h> - -using namespace oxygen; - -void CLASS(AngularMotorInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -25,14 +25,13 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { class RigidBody; class Joint; -class OXYGEN_API BallJointInt : public BaseNode +class OXYGEN_API BallJointInt { public: @@ -60,8 +59,6 @@ virtual long CreateBallJoint(long worldID) = 0; }; -DECLARE_ABSTRACTCLASS(BallJointInt); - } //namespace oxygen #endif //OXYGEN_BALLJOINTINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/balljointint.h> - -using namespace oxygen; - -void CLASS(BallJointInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,18 +24,15 @@ #define OXYGEN_BODYINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API BodyInt : public BaseNode +class OXYGEN_API BodyInt { /** This class is currently not implemented. */ }; -DECLARE_ABSTRACTCLASS(BodyInt); - } //namespace oxygen #endif //OXYGEN_BODYINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/bodyint.h> - -using namespace oxygen; - -void CLASS(BodyInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -25,12 +25,11 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API BoxColliderInt : public BaseNode +class OXYGEN_API BoxColliderInt { public: @@ -51,8 +50,6 @@ virtual long CreateBox() = 0; }; -DECLARE_ABSTRACTCLASS(BoxColliderInt); - } //namespace oxygen #endif //OXYGEN_BOXCOLLIDERINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/boxcolliderint.h> - -using namespace oxygen; - -void CLASS(BoxColliderInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,13 +24,12 @@ #define OXYGEN_CAPSULECOLLIDERINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> #include <salt/vector.h> namespace oxygen { -class OXYGEN_API CapsuleColliderInt : public BaseNode +class OXYGEN_API CapsuleColliderInt { public: @@ -67,8 +66,6 @@ virtual long CreateCapsule() = 0; }; -DECLARE_ABSTRACTCLASS(CapsuleColliderInt); - } //namespace oxygen #endif //OXYGEN_CAPSULECOLLIDERINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/capsulecolliderint.h> - -using namespace oxygen; - -void CLASS(CapsuleColliderInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,7 +24,6 @@ #define OXYGEN_COLLIDERINT_H #include <oxygen/physicsserver/ode/odewrapper.h> -#include <oxygen/sceneserver/basenode.h> #include <oxygen/oxygen_defines.h> #include <salt/matrix.h> #include <set> @@ -34,7 +33,7 @@ { class Collider; -class OXYGEN_API ColliderInt : public BaseNode +class OXYGEN_API ColliderInt { public: @@ -96,8 +95,6 @@ virtual void RemoveFromSpace(long geomID, long spaceID) = 0; }; -DECLARE_ABSTRACTCLASS(ColliderInt); - } //namespace oxygen #endif //OXYGEN_COLLIDERINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/colliderint.h> - -using namespace oxygen; - -void CLASS(ColliderInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,18 +24,15 @@ #define OXYGEN_COMPOUNDCOLLIDERINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API CompoundColliderInt : public BaseNode +class OXYGEN_API CompoundColliderInt { /** This class is currently not implemented. */ }; -DECLARE_ABSTRACTCLASS(CompoundColliderInt); - } //namespace oxygen #endif //OXYGEN_COMPOUNDCOLLIDERINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/compoundcolliderint.h> - -using namespace oxygen; - -void CLASS(CompoundColliderInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,18 +24,15 @@ #define OXYGEN_CONCAVECOLLIDERINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API ConcaveColliderInt : public BaseNode +class OXYGEN_API ConcaveColliderInt { /** This class is currently not implemented. */ }; -DECLARE_ABSTRACTCLASS(ConcaveColliderInt); - } //namespace oxygen #endif //OXYGEN_CONCAVECOLLIDERINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/concavecolliderint.h> - -using namespace oxygen; - -void CLASS(ConcaveColliderInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,18 +24,15 @@ #define OXYGEN_CONECOLLIDERINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API ConeColliderInt : public BaseNode +class OXYGEN_API ConeColliderInt { /** This class is currently not implemented. */ }; -DECLARE_CLASS(ConeColliderInt); - } //namespace oxygen #endif //OXYGEN_CONECOLLIDERINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/conecolliderint.h> - -using namespace oxygen; - -void CLASS(ConeColliderInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,18 +24,15 @@ #define OXYGEN_CONETWISTJOINTINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API ConeTwistJointInt : public BaseNode +class OXYGEN_API ConeTwistJointInt { /** This class is currently not implemented. */ }; -DECLARE_ABSTRACTCLASS(ConeTwistJointInt); - } //namespace oxygen #endif //OXYGEN_CONETWISTJOINTINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/conetwistjointint.h> - -using namespace oxygen; - -void CLASS(ConeTwistJointInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,14 +24,14 @@ #define OXYGEN_CONTACTJOINTHANDLERINT_H #include <oxygen/physicsserver/ode/odewrapper.h> -#include <oxygen/sceneserver/basenode.h> + #include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/genericphysicsobjects.h> namespace oxygen { -class OXYGEN_API ContactJointHandlerInt : public BaseNode +class OXYGEN_API ContactJointHandlerInt { public: /** Returns a pointer to a SurfaceParameter class whose values were initialized @@ -135,8 +135,6 @@ virtual float MixValues(const float v1, const float v2, const int n) const = 0; }; -DECLARE_ABSTRACTCLASS(ContactJointHandlerInt); - } //namespace oxygen #endif //OXYGEN_CONTACTJOINTHANDLERINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/contactjointhandlerint.h> - -using namespace oxygen; - -void CLASS(ContactJointHandlerInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,18 +24,15 @@ #define OXYGEN_CONVEXCOLLIDERINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API ConvexColliderInt : public BaseNode +class OXYGEN_API ConvexColliderInt { /** This class is currently not implemented. */ }; -DECLARE_CLASS(ConvexColliderInt); - } //namespace oxygen #endif //OXYGEN_CONVEXCOLLIDERINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/convexcolliderint.h> - -using namespace oxygen; - -void CLASS(ConvexColliderInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,18 +24,15 @@ #define OXYGEN_CYLINDERCOLLIDERINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API CylinderColliderInt : public BaseNode +class OXYGEN_API CylinderColliderInt { /** This class is currently not implemented. */ }; -DECLARE_CLASS(CylinderColliderInt); - } //namespace oxygen #endif //OXYGEN_CYLINDERCOLLIDERINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/cylindercolliderint.h> - -using namespace oxygen; - -void CLASS(CylinderColliderInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,18 +24,15 @@ #define OXYGEN_DYNAMICBODYINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API DynamicBodyInt : public BaseNode +class OXYGEN_API DynamicBodyInt { /** This class is currently not implemented. */ }; -DECLARE_CLASS(DynamicBodyInt); - } //namespace oxygen #endif //OXYGEN_DYNAMICBODYINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/dynamicbodyint.h> - -using namespace oxygen; - -void CLASS(DynamicBodyInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,18 +24,15 @@ #define OXYGEN_EMPTYCOLLIDERINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API EmptyColliderInt : public BaseNode +class OXYGEN_API EmptyColliderInt { /** This class is currently not implemented. */ }; -DECLARE_ABSTRACTCLASS(EmptyColliderInt); - } //namespace oxygen #endif //OXYGEN_EMPTYCOLLIDERINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/emptycolliderint.h> - -using namespace oxygen; - -void CLASS(EmptyColliderInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -21,12 +21,10 @@ #define OXYGEN_FIXEDJOINTINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen{ -class OXYGEN_API FixedJointInt : public BaseNode -{ +class OXYGEN_API FixedJointInt{ public: /** Creates a fixed joint within the physics world specified @@ -40,8 +38,6 @@ virtual void SetFixed(long jointID) = 0; }; -DECLARE_ABSTRACTCLASS(FixedJointInt); - } //namespace oxygen #endif //OXYGEN_FIXEDJOINTINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/fixedjointint.h> - -using namespace oxygen; - -void CLASS(FixedJointInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -24,18 +24,15 @@ #define OXYGEN_GENERIC6DOFJOINTINT_H #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API Generic6DOFJointInt : public BaseNode +class OXYGEN_API Generic6DOFJointInt { /** This class is currently not implemented. */ }; -DECLARE_ABSTRACTCLASS(Generic6DOFJointInt); - } //namespace oxygen #endif //OXYGEN_GENERIC6DOFJOINTINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/generic6dofjointint.h> - -using namespace oxygen; - -void CLASS(Generic6DOFJointInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -21,13 +21,11 @@ #define OXYGEN_HINGE2JOINTINT_H #include <salt/vector.h> -#include <oxygen/sceneserver/basenode.h> #include <oxygen/oxygen_defines.h> namespace oxygen{ -class OXYGEN_API Hinge2JointInt : public BaseNode -{ +class OXYGEN_API Hinge2JointInt{ public: /** Creates a hinge2joint within the physics world specified @@ -69,8 +67,6 @@ virtual float GetAngleRate2(long jointID) = 0; }; -DECLARE_ABSTRACTCLASS(Hinge2JointInt); - } //namespace oxygen #endif //OXYGEN_HINGE2JOINTINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/hinge2jointint.h> - -using namespace oxygen; - -void CLASS(Hinge2JointInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -22,12 +22,10 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen{ -class OXYGEN_API HingeJointInt : public BaseNode -{ +class OXYGEN_API HingeJointInt{ public: /** Creates a new hingejoint within the physics world specified @@ -71,8 +69,6 @@ virtual float GetAngleRate(long jointID) const = 0; }; -DECLARE_ABSTRACTCLASS(HingeJointInt); - } //namespace oxygen #endif //OXYGEN_HINGEJOINTINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/hingejointint.h> - -using namespace oxygen; - -void CLASS(HingeJointInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -25,7 +25,6 @@ #include <oxygen/physicsserver/genericphysicsobjects.h> #include <oxygen/physicsserver/ode/odewrapper.h> -#include <oxygen/sceneserver/basenode.h> #include <boost/smart_ptr/shared_ptr.hpp> #include <salt/vector.h> #include <oxygen/oxygen_defines.h> @@ -36,9 +35,8 @@ class RigidBody; class Joint; -class OXYGEN_API JointInt : public BaseNode +class OXYGEN_API JointInt { - public: /** Returns a pointer to the Joint object that manages the joint specified by \param jointID. @@ -245,8 +243,6 @@ virtual void OnLink(long jointID, Joint* joint) = 0; }; -DECLARE_ABSTRACTCLASS(JointInt); - } //namespace oxygen #endif //OXYGEN_JOINTINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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/int/jointint.h> - -using namespace oxygen; - -void CLASS(JointInt)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2010-02-17 05:04:55 UTC (rev 165) @@ -27,12 +27,11 @@ #include <salt/matrix.h> #include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/genericphysicsobjects.h> -#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API PhysicsObjectInt : public BaseNode +class OXYGEN_API PhysicsObjectInt { public: @@ -45,8 +44,6 @@ virtual void ConvertRotationMatrix(const GenericPhysicsMatrix* matrix, salt::Matrix& rot) const = 0; }; -DECLARE_ABSTRACTCLASS(PhysicsObjectInt); - } //namespace oxygen #endif //OXYGEN_PHYSICSOBJECTINT_H Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint_c.cpp 2010-02-17 05:04:55 UTC (rev 165) @@ -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 ... [truncated message content] |
From: <a-...@us...> - 2010-02-16 04:21:25
|
Revision: 164 http://simspark.svn.sourceforge.net/simspark/?rev=164&view=rev Author: a-held Date: 2010-02-16 04:21:16 +0000 (Tue, 16 Feb 2010) Log Message: ----------- Created _c.cpp files for all interfaces Added object factories for interfaces into scenegraph Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/oxygen.cpp branches/multiphys/spark/lib/oxygen/oxygen.h Added Paths: ----------- branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/softbodyint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/staticbodyint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint_c.cpp Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-02-15 05:00:21 UTC (rev 163) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-02-16 04:21:16 UTC (rev 164) @@ -267,6 +267,42 @@ physicsserver/angularmotor.cpp physicsserver/angularmotor_c.cpp + #interfaces + physicsserver/int/angularmotorint_c.cpp + physicsserver/int/balljointint_c.cpp + physicsserver/int/bodyint_c.cpp + physicsserver/int/boxcolliderint_c.cpp + physicsserver/int/capsulecolliderint_c.cpp + physicsserver/int/colliderint_c.cpp + physicsserver/int/compoundcolliderint_c.cpp + physicsserver/int/concavecolliderint_c.cpp + physicsserver/int/conecolliderint_c.cpp + physicsserver/int/conetwistjointint_c.cpp + physicsserver/int/contactjointhandlerint_c.cpp + physicsserver/int/convexcolliderint_c.cpp + physicsserver/int/cylindercolliderint_c.cpp + physicsserver/int/dynamicbodyint_c.cpp + physicsserver/int/emptycolliderint_c.cpp + physicsserver/int/fixedjointint_c.cpp + physicsserver/int/generic6dofjointint_c.cpp + physicsserver/int/hinge2jointint_c.cpp + physicsserver/int/hingejointint_c.cpp + physicsserver/int/jointint_c.cpp + physicsserver/int/physicsobjectint_c.cpp + physicsserver/int/physicsserverint_c.cpp + physicsserver/int/planecolliderint_c.cpp + physicsserver/int/raycolliderint_c.cpp + physicsserver/int/rigidbodyint_c.cpp + physicsserver/int/sliderjointint_c.cpp + physicsserver/int/softbodyint_c.cpp + physicsserver/int/spaceint_c.cpp + physicsserver/int/spherecolliderint_c.cpp + physicsserver/int/staticbodyint_c.cpp + physicsserver/int/transformcolliderint_c.cpp + physicsserver/int/universaljointint_c.cpp + physicsserver/int/worldint_c.cpp + + #ODE-specific files physicsserver/ode/odeangularmotor.cpp physicsserver/ode/odeballjoint.cpp Modified: branches/multiphys/spark/lib/oxygen/oxygen.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/oxygen.cpp 2010-02-15 05:00:21 UTC (rev 163) +++ branches/multiphys/spark/lib/oxygen/oxygen.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -66,6 +66,7 @@ zg.GetCore()->RegisterClassObject(new CLASS(World), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(Joint), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(Generic6DOFJoint), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(AngularMotor), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(BallJoint), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(ConeTwistJoint), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(HingeJoint), "oxygen/"); @@ -93,6 +94,41 @@ zg.GetCore()->RegisterClassObject(new CLASS(CollisionHandler), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(ContactJointHandler), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(RecorderHandler), "oxygen/"); + + // implementations + zg.GetCore()->RegisterClassObject(new CLASS(AngularMotorInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(BallJointInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(BodyInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(BoxColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(CapsuleColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(ColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(CompoundColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(ConcaveColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(ConeColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(ConeTwistJointInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(ContactJointHandlerInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(ConvexColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(CylinderColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(DynamicBodyInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(EmptyColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(FixedJointInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(Generic6DOFJointInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(Hinge2JointInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(HingeJointInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(JointInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(PhysicsObjectInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(PhysicsServerInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(PlaneColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(RayColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(RigidBodyInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(SliderJointInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(SoftBodyInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(SpaceInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(SphereColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(StaticBodyInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(TransformColliderInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(UniversalJointInt), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(WorldInt), "oxygen/"); // agentaspect zg.GetCore()->RegisterClassObject(new CLASS(AgentAspect), "oxygen/"); Modified: branches/multiphys/spark/lib/oxygen/oxygen.h =================================================================== --- branches/multiphys/spark/lib/oxygen/oxygen.h 2010-02-15 05:00:21 UTC (rev 163) +++ branches/multiphys/spark/lib/oxygen/oxygen.h 2010-02-16 04:21:16 UTC (rev 164) @@ -65,6 +65,7 @@ #include <oxygen/physicsserver/recorderhandler.h> #include <oxygen/physicsserver/joint.h> #include <oxygen/physicsserver/generic6dofjoint.h> +#include <oxygen/physicsserver/angularmotor.h> #include <oxygen/physicsserver/balljoint.h> #include <oxygen/physicsserver/conetwistjoint.h> #include <oxygen/physicsserver/hingejoint.h> @@ -73,6 +74,42 @@ #include <oxygen/physicsserver/universaljoint.h> #include <oxygen/physicsserver/hinge2joint.h> +//implementations +#include <oxygen/physicsserver/int/angularmotorint.h> +#include <oxygen/physicsserver/int/balljointint.h> +#include <oxygen/physicsserver/int/bodyint.h> +#include <oxygen/physicsserver/int/boxcolliderint.h> +#include <oxygen/physicsserver/int/capsulecolliderint.h> +#include <oxygen/physicsserver/int/colliderint.h> +#include <oxygen/physicsserver/int/compoundcolliderint.h> +#include <oxygen/physicsserver/int/concavecolliderint.h> +#include <oxygen/physicsserver/int/conecolliderint.h> +#include <oxygen/physicsserver/int/conetwistjointint.h> +#include <oxygen/physicsserver/int/contactjointhandlerint.h> +#include <oxygen/physicsserver/int/convexcolliderint.h> +#include <oxygen/physicsserver/int/cylindercolliderint.h> +#include <oxygen/physicsserver/int/dynamicbodyint.h> +#include <oxygen/physicsserver/int/emptycolliderint.h> +#include <oxygen/physicsserver/int/fixedjointint.h> +#include <oxygen/physicsserver/int/generic6dofjointint.h> +#include <oxygen/physicsserver/int/hinge2jointint.h> +#include <oxygen/physicsserver/int/hingejointint.h> +#include <oxygen/physicsserver/int/jointint.h> +#include <oxygen/physicsserver/int/physicsobjectint.h> +#include <oxygen/physicsserver/int/physicsserverint.h> +#include <oxygen/physicsserver/int/planecolliderint.h> +#include <oxygen/physicsserver/int/raycolliderint.h> +#include <oxygen/physicsserver/int/rigidbodyint.h> +#include <oxygen/physicsserver/int/sliderjointint.h> +#include <oxygen/physicsserver/int/softbodyint.h> +#include <oxygen/physicsserver/int/spaceint.h> +#include <oxygen/physicsserver/int/spherecolliderint.h> +#include <oxygen/physicsserver/int/staticbodyint.h> +#include <oxygen/physicsserver/int/transformcolliderint.h> +#include <oxygen/physicsserver/int/universaljointint.h> +#include <oxygen/physicsserver/int/worldint.h> + + #include <oxygen/sceneserver/basenode.h> #include <oxygen/sceneserver/camera.h> #include <oxygen/sceneserver/fpscontroller.h> Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/angularmotorint.h> + +using namespace oxygen; + +void CLASS(AngularMotorInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/balljointint.h> + +using namespace oxygen; + +void CLASS(BallJointInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/bodyint.h> + +using namespace oxygen; + +void CLASS(BodyInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/boxcolliderint.h> + +using namespace oxygen; + +void CLASS(BoxColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/capsulecolliderint.h> + +using namespace oxygen; + +void CLASS(CapsuleColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/colliderint.h> + +using namespace oxygen; + +void CLASS(ColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/compoundcolliderint.h> + +using namespace oxygen; + +void CLASS(CompoundColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/concavecolliderint.h> + +using namespace oxygen; + +void CLASS(ConcaveColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/conecolliderint.h> + +using namespace oxygen; + +void CLASS(ConeColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/conetwistjointint.h> + +using namespace oxygen; + +void CLASS(ConeTwistJointInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/contactjointhandlerint.h> + +using namespace oxygen; + +void CLASS(ContactJointHandlerInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/convexcolliderint.h> + +using namespace oxygen; + +void CLASS(ConvexColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/cylindercolliderint.h> + +using namespace oxygen; + +void CLASS(CylinderColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/dynamicbodyint.h> + +using namespace oxygen; + +void CLASS(DynamicBodyInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/emptycolliderint.h> + +using namespace oxygen; + +void CLASS(EmptyColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/fixedjointint.h> + +using namespace oxygen; + +void CLASS(FixedJointInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/generic6dofjointint.h> + +using namespace oxygen; + +void CLASS(Generic6DOFJointInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/hinge2jointint.h> + +using namespace oxygen; + +void CLASS(Hinge2JointInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/hingejointint.h> + +using namespace oxygen; + +void CLASS(HingeJointInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/jointint.h> + +using namespace oxygen; + +void CLASS(JointInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/physicsobjectint.h> + +using namespace oxygen; + +void CLASS(PhysicsObjectInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/physicsserverint.h> + +using namespace oxygen; + +void CLASS(PhysicsServerInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/planecolliderint.h> + +using namespace oxygen; + +void CLASS(PlaneColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/raycolliderint.h> + +using namespace oxygen; + +void CLASS(RayColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/rigidbodyint.h> + +using namespace oxygen; + +void CLASS(RigidBodyInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/sliderjointint.h> + +using namespace oxygen; + +void CLASS(SliderJointInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/softbodyint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/softbodyint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/softbodyint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/softbodyint.h> + +using namespace oxygen; + +void CLASS(SoftBodyInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/spaceint.h> + +using namespace oxygen; + +void CLASS(SpaceInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/spherecolliderint.h> + +using namespace oxygen; + +void CLASS(SphereColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/staticbodyint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/staticbodyint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/staticbodyint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/staticbodyint.h> + +using namespace oxygen; + +void CLASS(StaticBodyInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/transformcolliderint.h> + +using namespace oxygen; + +void CLASS(TransformColliderInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/universaljointint.h> + +using namespace oxygen; + +void CLASS(UniversalJointInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint_c.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint_c.cpp 2010-02-16 04:21:16 UTC (rev 164) @@ -0,0 +1,29 @@ +/* -*- 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/int/worldint.h> + +using namespace oxygen; + +void CLASS(WorldInt)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-02-15 05:00:29
|
Revision: 163 http://simspark.svn.sourceforge.net/simspark/?rev=163&view=rev Author: a-held Date: 2010-02-15 05:00:21 +0000 (Mon, 15 Feb 2010) Log Message: ----------- Derive all Interfaces from BaseNode and register them with Zeitgeist Modified Paths: -------------- branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/softbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/staticbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h Modified: branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp 2010-02-15 05:00:21 UTC (rev 163) @@ -23,7 +23,6 @@ #include <oxygen/sceneserver/sceneserver.h> #include <oxygen/sceneserver/scene.h> #include <oxygen/sceneserver/camera.h> -#include <oxygen/physicsserver/spherecollider.h> #include <kerosin/openglserver/openglwrapper.h> #include <kerosin/sceneserver/staticmesh.h> #include <kerosin/sceneserver/light.h> @@ -250,13 +249,6 @@ void RenderServer::RenderScene(boost::shared_ptr<BaseNode> node, unsigned pass) { -#if 0 - shared_ptr<SphereCollider> collider = shared_dynamic_cast<SphereCollider>(node); - if (collider != 0) - { - std::cerr << "RenderScene (spherecollider radius: " << collider->GetRadius() << ")\n"; - } -#endif shared_ptr<RenderNode> renderNode = shared_dynamic_cast<RenderNode>(node); if (renderNode.get() != 0 && ((pass == 0 && !renderNode->IsTransparent()) || (pass == 1 && renderNode->IsTransparent())) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -25,6 +25,7 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { @@ -37,7 +38,7 @@ rotation about those axes. */ -class OXYGEN_API AngularMotorInt +class OXYGEN_API AngularMotorInt : public BaseNode { public: /** Creates a new angular motor within the physics world specified @@ -106,6 +107,8 @@ virtual float GetAxisAngleRate(int idx, long jointID) = 0; }; +DECLARE_ABSTRACTCLASS(AngularMotorInt); + } //namespace oxygen #endif //OXYGEN_ANGULARMOTORINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -25,13 +25,14 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { class RigidBody; class Joint; -class OXYGEN_API BallJointInt +class OXYGEN_API BallJointInt : public BaseNode { public: @@ -59,6 +60,8 @@ virtual long CreateBallJoint(long worldID) = 0; }; +DECLARE_ABSTRACTCLASS(BallJointInt); + } //namespace oxygen #endif //OXYGEN_BALLJOINTINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_BODYINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API BodyInt +class OXYGEN_API BodyInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_ABSTRACTCLASS(BodyInt); + } //namespace oxygen #endif //OXYGEN_BODYINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -25,11 +25,12 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API BoxColliderInt +class OXYGEN_API BoxColliderInt : public BaseNode { public: @@ -50,6 +51,8 @@ virtual long CreateBox() = 0; }; +DECLARE_ABSTRACTCLASS(BoxColliderInt); + } //namespace oxygen #endif //OXYGEN_BOXCOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,12 +24,13 @@ #define OXYGEN_CAPSULECOLLIDERINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> #include <salt/vector.h> namespace oxygen { -class OXYGEN_API CapsuleColliderInt +class OXYGEN_API CapsuleColliderInt : public BaseNode { public: @@ -66,6 +67,8 @@ virtual long CreateCapsule() = 0; }; +DECLARE_ABSTRACTCLASS(CapsuleColliderInt); + } //namespace oxygen #endif //OXYGEN_CAPSULECOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,6 +24,7 @@ #define OXYGEN_COLLIDERINT_H #include <oxygen/physicsserver/ode/odewrapper.h> +#include <oxygen/sceneserver/basenode.h> #include <oxygen/oxygen_defines.h> #include <salt/matrix.h> #include <set> @@ -33,7 +34,7 @@ { class Collider; -class OXYGEN_API ColliderInt +class OXYGEN_API ColliderInt : public BaseNode { public: @@ -95,6 +96,8 @@ virtual void RemoveFromSpace(long geomID, long spaceID) = 0; }; +DECLARE_ABSTRACTCLASS(ColliderInt); + } //namespace oxygen #endif //OXYGEN_COLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_COMPOUNDCOLLIDERINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API CompoundColliderInt +class OXYGEN_API CompoundColliderInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_ABSTRACTCLASS(CompoundColliderInt); + } //namespace oxygen #endif //OXYGEN_COMPOUNDCOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_CONCAVECOLLIDERINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API ConcaveColliderInt +class OXYGEN_API ConcaveColliderInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_ABSTRACTCLASS(ConcaveColliderInt); + } //namespace oxygen #endif //OXYGEN_CONCAVECOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_CONECOLLIDERINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API ConeColliderInt +class OXYGEN_API ConeColliderInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_CLASS(ConeColliderInt); + } //namespace oxygen #endif //OXYGEN_CONECOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_CONETWISTJOINTINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API ConeTwistJointInt +class OXYGEN_API ConeTwistJointInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_ABSTRACTCLASS(ConeTwistJointInt); + } //namespace oxygen #endif //OXYGEN_CONETWISTJOINTINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,14 +24,14 @@ #define OXYGEN_CONTACTJOINTHANDLERINT_H #include <oxygen/physicsserver/ode/odewrapper.h> - +#include <oxygen/sceneserver/basenode.h> #include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/genericphysicsobjects.h> namespace oxygen { -class OXYGEN_API ContactJointHandlerInt +class OXYGEN_API ContactJointHandlerInt : public BaseNode { public: /** Returns a pointer to a SurfaceParameter class whose values were initialized @@ -135,6 +135,8 @@ virtual float MixValues(const float v1, const float v2, const int n) const = 0; }; +DECLARE_ABSTRACTCLASS(ContactJointHandlerInt); + } //namespace oxygen #endif //OXYGEN_CONTACTJOINTHANDLERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_CONVEXCOLLIDERINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API ConvexColliderInt +class OXYGEN_API ConvexColliderInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_CLASS(ConvexColliderInt); + } //namespace oxygen #endif //OXYGEN_CONVEXCOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_CYLINDERCOLLIDERINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API CylinderColliderInt +class OXYGEN_API CylinderColliderInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_CLASS(CylinderColliderInt); + } //namespace oxygen #endif //OXYGEN_CYLINDERCOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_DYNAMICBODYINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API DynamicBodyInt +class OXYGEN_API DynamicBodyInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_CLASS(DynamicBodyInt); + } //namespace oxygen #endif //OXYGEN_DYNAMICBODYINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_EMPTYCOLLIDERINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API EmptyColliderInt +class OXYGEN_API EmptyColliderInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_ABSTRACTCLASS(EmptyColliderInt); + } //namespace oxygen #endif //OXYGEN_EMPTYCOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -21,10 +21,12 @@ #define OXYGEN_FIXEDJOINTINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen{ -class OXYGEN_API FixedJointInt{ +class OXYGEN_API FixedJointInt : public BaseNode +{ public: /** Creates a fixed joint within the physics world specified @@ -38,6 +40,8 @@ virtual void SetFixed(long jointID) = 0; }; +DECLARE_ABSTRACTCLASS(FixedJointInt); + } //namespace oxygen #endif //OXYGEN_FIXEDJOINTINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_GENERIC6DOFJOINTINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API Generic6DOFJointInt +class OXYGEN_API Generic6DOFJointInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_ABSTRACTCLASS(Generic6DOFJointInt); + } //namespace oxygen #endif //OXYGEN_GENERIC6DOFJOINTINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -21,11 +21,13 @@ #define OXYGEN_HINGE2JOINTINT_H #include <salt/vector.h> +#include <oxygen/sceneserver/basenode.h> #include <oxygen/oxygen_defines.h> namespace oxygen{ -class OXYGEN_API Hinge2JointInt{ +class OXYGEN_API Hinge2JointInt : public BaseNode +{ public: /** Creates a hinge2joint within the physics world specified @@ -67,6 +69,8 @@ virtual float GetAngleRate2(long jointID) = 0; }; +DECLARE_ABSTRACTCLASS(Hinge2JointInt); + } //namespace oxygen #endif //OXYGEN_HINGE2JOINTINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -22,10 +22,12 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen{ -class OXYGEN_API HingeJointInt{ +class OXYGEN_API HingeJointInt : public BaseNode +{ public: /** Creates a new hingejoint within the physics world specified @@ -69,6 +71,8 @@ virtual float GetAngleRate(long jointID) const = 0; }; +DECLARE_ABSTRACTCLASS(HingeJointInt); + } //namespace oxygen #endif //OXYGEN_HINGEJOINTINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -25,6 +25,7 @@ #include <oxygen/physicsserver/genericphysicsobjects.h> #include <oxygen/physicsserver/ode/odewrapper.h> +#include <oxygen/sceneserver/basenode.h> #include <boost/smart_ptr/shared_ptr.hpp> #include <salt/vector.h> #include <oxygen/oxygen_defines.h> @@ -35,8 +36,9 @@ class RigidBody; class Joint; -class OXYGEN_API JointInt +class OXYGEN_API JointInt : public BaseNode { + public: /** Returns a pointer to the Joint object that manages the joint specified by \param jointID. @@ -243,6 +245,8 @@ virtual void OnLink(long jointID, Joint* joint) = 0; }; +DECLARE_ABSTRACTCLASS(JointInt); + } //namespace oxygen #endif //OXYGEN_JOINTINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -27,11 +27,12 @@ #include <salt/matrix.h> #include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/genericphysicsobjects.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API PhysicsObjectInt +class OXYGEN_API PhysicsObjectInt : public BaseNode { public: @@ -44,6 +45,8 @@ virtual void ConvertRotationMatrix(const GenericPhysicsMatrix* matrix, salt::Matrix& rot) const = 0; }; +DECLARE_ABSTRACTCLASS(PhysicsObjectInt); + } //namespace oxygen #endif //OXYGEN_PHYSICSOBJECTINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsserverint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_PHYSICSSERVERINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API PhysicsServerInt +class OXYGEN_API PhysicsServerInt : public BaseNode { }; +DECLARE_ABSTRACTCLASS(PhysicsServerInt); + } //namespace oxygen #endif //OXYGEN_PHYSICSSERVERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -26,11 +26,12 @@ #include <salt/matrix.h> #include <salt/vector.h> #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API PlaneColliderInt +class OXYGEN_API PlaneColliderInt : public BaseNode { public: /** sets the parameters of the plane equation a*x+b*y+c*z = d , @@ -54,6 +55,8 @@ virtual long CreatePlane() = 0; }; +DECLARE_ABSTRACTCLASS(PlaneColliderInt); + } //namespace oxygen #endif //OXYGEN_PLANECOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -25,11 +25,12 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API RayColliderInt +class OXYGEN_API RayColliderInt : public BaseNode { /** RayCollider encapsulates an ODE ray geometry "object". @@ -52,6 +53,8 @@ virtual long CreateRay() = 0; }; +DECLARE_ABSTRACTCLASS(RayColliderInt); + } //namespace oxygen #endif //OXYGEN_RAYCOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -25,12 +25,13 @@ #include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/genericphysicsobjects.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { class RigidBody; -class OXYGEN_API RigidBodyInt +class OXYGEN_API RigidBodyInt : public BaseNode { public: @@ -249,6 +250,8 @@ virtual long CreateBody(long worldID) = 0; }; +DECLARE_ABSTRACTCLASS(RigidBodyInt); + } //namespace oxygen #endif //OXYGEN_RIGIDBODYINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -25,12 +25,13 @@ #include <boost/smart_ptr/shared_ptr.hpp> #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { class RigidBody; -class OXYGEN_API SliderJointInt +class OXYGEN_API SliderJointInt : public BaseNode { public: /** Creates a Slider Joint within the given world */ @@ -50,6 +51,8 @@ virtual void SetSliderAxis(salt::Vector3f& up, long jointID) = 0; }; +DECLARE_ABSTRACTCLASS(SliderJointInt); + } //namespace oxygen #endif //OXYGEN_SLIDERJOINTINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/softbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/softbodyint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/softbodyint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_SOFTBODYINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API SoftBodyInt +class OXYGEN_API SoftBodyInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_ABSTRACTCLASS(SoftBodyInt); + } //namespace oxygen #endif //OXYGEN_SOFTBODYINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -26,6 +26,7 @@ #include <set> #include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/genericphysicsobjects.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { @@ -34,7 +35,7 @@ class Collider; class Space; -class OXYGEN_API SpaceInt +class OXYGEN_API SpaceInt : public BaseNode { public: @@ -89,6 +90,8 @@ long geomID1, long geomID2) = 0; }; +DECLARE_ABSTRACTCLASS(SpaceInt); + } //namespace oxygen #endif //OXYGEN_SPACEINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -25,11 +25,12 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> +#include <oxygen/physicsserver/spherecollider.h> namespace oxygen { -class OXYGEN_API SphereColliderInt +class OXYGEN_API SphereColliderInt : public BaseNode { public: @@ -50,6 +51,8 @@ virtual long CreateSphere() = 0; }; +DECLARE_ABSTRACTCLASS(SphereColliderInt); + } //namespace oxygen #endif //OXYGEN_SPHERECOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/staticbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/staticbodyint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/staticbodyint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,15 +24,18 @@ #define OXYGEN_STATICBODYINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API StaticBodyInt +class OXYGEN_API StaticBodyInt : public BaseNode { /** This class is currently not implemented. */ }; +DECLARE_ABSTRACTCLASS(StaticBodyInt); + } //namespace oxygen #endif //OXYGEN_STATICBODYINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,6 +24,7 @@ #define OXYGEN_TRANSFORMCOLLIDERINT_H #include <oxygen/physicsserver/ode/odewrapper.h> +#include <oxygen/sceneserver/basenode.h> #include <oxygen/oxygen_defines.h> #include <set> #include <string> @@ -31,7 +32,7 @@ namespace oxygen { -class OXYGEN_API TransformColliderInt +class OXYGEN_API TransformColliderInt : public BaseNode { /** TransformCollider encapsulates a transform geometry object that encapsulates another geom. It allows the encapsulated geom to @@ -59,6 +60,8 @@ virtual void SetColliderParameters(int cleanup, int info, long geomID) = 0; }; +DECLARE_ABSTRACTCLASS(TransformColliderInt); + } //namespace oxygen #endif //OXYGEN_COLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -25,11 +25,12 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API UniversalJointInt +class OXYGEN_API UniversalJointInt : public BaseNode { public: @@ -95,6 +96,8 @@ virtual float GetAngleRate2(long jointID) const = 0; }; +DECLARE_ABSTRACTCLASS(UniversalJointInt); + } //namespace oxygen #endif //OXYGEN_UNIVERSALJOINTINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h 2010-02-10 03:50:40 UTC (rev 162) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h 2010-02-15 05:00:21 UTC (rev 163) @@ -24,11 +24,12 @@ #include <salt/vector.h> #include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> namespace oxygen { -class OXYGEN_API WorldInt +class OXYGEN_API WorldInt : public BaseNode { /** World encapsulates a world object. It is a container for rigid bodies and joints. Objects in different worlds can not @@ -100,6 +101,8 @@ virtual void DestroyWorld(long worldID) = 0; }; +DECLARE_ABSTRACTCLASS(WorldInt); + } #endif //OXYGEN_WORLDINT_H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-02-10 03:50:47
|
Revision: 162 http://simspark.svn.sourceforge.net/simspark/?rev=162&view=rev Author: a-held Date: 2010-02-10 03:50:40 +0000 (Wed, 10 Feb 2010) Log Message: ----------- Fetch PhysicsServer from SceneGraph instead of using a GetInstance method Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.cpp branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.h Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp 2010-02-09 05:23:09 UTC (rev 161) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp 2010-02-10 03:50:40 UTC (rev 162) @@ -22,34 +22,32 @@ #include <oxygen/physicsserver/physicsserver.h> #include <oxygen/physicsserver/int/physicsserverint.h> #include <oxygen/physicsserver/impfactory.h> +#include <oxygen/physicsserver/rigidbody.h> #include <oxygen/physicsserver/world.h> #include <oxygen/physicsserver/space.h> #include <oxygen/sceneserver/scene.h> +#include <oxygen/sceneserver/transform.h> +#include <zeitgeist/logserver/logserver.h> #include <iostream> using namespace oxygen; using namespace boost; +using namespace std; shared_ptr<PhysicsServerInt> PhysicsServer::mPhysicsServerImp; -shared_ptr<PhysicsServer> PhysicsServer::mInstance; PhysicsServer::PhysicsServer() : Leaf() { mPhysicsServerImp = ImpFactory::GetInstance()->GetPhysicsServerImp(); } -shared_ptr<PhysicsServer> PhysicsServer::GetInstance(){ - if (mInstance.get() == 0) - mInstance = shared_ptr<PhysicsServer>(new PhysicsServer()); - return mInstance; -} - void PhysicsServer::ResetCache(){ mActiveSpace.reset(); mActiveWorld.reset(); } -void PhysicsServer::UpdateCache(shared_ptr<Scene> activeScene){ +void PhysicsServer::UpdateCache(shared_ptr<Scene> activeScene) +{ if (mActiveSpace.get() == 0) { // cache the space reference @@ -72,9 +70,24 @@ } } -void PhysicsServer::StepSimulation(float deltaTime){ +void PhysicsServer::StepSimulation(float deltaTime) +{ if (mActiveWorld.get() != 0) { mActiveWorld->Step(deltaTime); } } + +void PhysicsServer::SetUpBox(shared_ptr<RigidBody> body, string name) +{ + if (body.get() != 0) + { + body->SetName(name); + } +} + +void PhysicsServer::ConfirmExistence() +{ + GetLog()->Normal() << + "(PhysicsServer) I print, therefore I am\n"; +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h 2010-02-09 05:23:09 UTC (rev 161) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h 2010-02-10 03:50:40 UTC (rev 162) @@ -26,11 +26,13 @@ #include <zeitgeist/leaf.h> #include <oxygen/oxygen_defines.h> #include <boost/shared_ptr.hpp> +#include <string> namespace oxygen { class PhysicsServerInt; class Scene; +class RigidBody; class World; class Space; @@ -43,9 +45,6 @@ PhysicsServer(); virtual ~PhysicsServer(){}; - /** Returns the instance of the PhysicsServer. */ - static boost::shared_ptr<PhysicsServer> GetInstance(); - /** Resets the active space and active world */ void ResetCache(); @@ -58,9 +57,13 @@ /** Advance the simulation by \param deltatime */ void StepSimulation(float deltaTime); + /** Creates a new Box and adds it to the SceneGraph */ + void SetUpBox(boost::shared_ptr<RigidBody> body, std::string name); + + /** Used for debugging */ + void ConfirmExistence(); + private: - static boost::shared_ptr<PhysicsServer> mInstance; - static boost::shared_ptr<PhysicsServerInt> mPhysicsServerImp; /** cached reference to the Space node below the active scene */ Modified: branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.cpp 2010-02-09 05:23:09 UTC (rev 161) +++ branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.cpp 2010-02-10 03:50:40 UTC (rev 162) @@ -41,13 +41,34 @@ int SceneServer::mTransformMark = 0; SceneServer::SceneServer() : Node() -{ +{ } SceneServer::~SceneServer() { } +void SceneServer::OnLink() +{ + shared_ptr<CoreContext> context = GetCore()->CreateContext(); + + mPhysicsServer = shared_static_cast<PhysicsServer> + (context->Get("/sys/server/physics")); + + if (mPhysicsServer.get() == 0) + { + GetLog()->Error() << + "(SceneServer) ERROR: PhysicsServer not found at /sys/server/physics\n"; + } + else + { + GetLog()->Normal() << + "(SceneServer) Found PhysicsServer\n"; + + mPhysicsServer->ConfirmExistence(); + } +} + bool SceneServer::CreateScene(const std::string &location) { shared_ptr<CoreContext> context = GetCore()->CreateContext(); @@ -69,7 +90,7 @@ void SceneServer::ResetCache() { - PhysicsServer::GetInstance()->ResetCache(); + mPhysicsServer->ResetCache(); } void SceneServer::UpdateCache() @@ -80,14 +101,7 @@ return; } - /*shared_ptr<PhysicsServer> phServer = shared_static_cast<PhysicsServer> - (GetChildOfClass("oxygen/PhysicsServer")); - - if (phServer.get() == 0){ - GetLog()->Error() << "(SceneServer) No PhysicsServer found!"; - }*/ - - PhysicsServer::GetInstance()->UpdateCache(mActiveScene.get()); + mPhysicsServer->UpdateCache(mActiveScene.get()); } void SceneServer::OnUnlink() @@ -154,10 +168,10 @@ mActiveScene->PrePhysicsUpdate(deltaTime); // determine collisions - PhysicsServer::GetInstance()->DoCollisions(); + mPhysicsServer->DoCollisions(); // do physics - PhysicsServer::GetInstance()->StepSimulation(deltaTime); + mPhysicsServer->StepSimulation(deltaTime); mActiveScene->PostPhysicsUpdate(); mActiveScene->UpdateHierarchy(); @@ -183,10 +197,10 @@ { boost::recursive_mutex::scoped_lock lock(mMutex); // determine collisions - PhysicsServer::GetInstance()->DoCollisions(); + mPhysicsServer->DoCollisions(); // do physics - PhysicsServer::GetInstance()->StepSimulation(deltaTime); + mPhysicsServer->StepSimulation(deltaTime); } void SceneServer::PostPhysicsUpdate() @@ -376,5 +390,3 @@ return true; } - - Modified: branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.h =================================================================== --- branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.h 2010-02-09 05:23:09 UTC (rev 161) +++ branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.h 2010-02-10 03:50:40 UTC (rev 162) @@ -49,6 +49,7 @@ class Scene; class BaseNode; class Transform; +class PhysicsServer; /** The scene server manages displayable subtrees within the object hierarchy. Each subtree begins with a Scene node. The scene server knows @@ -107,6 +108,9 @@ /** resets all cached references */ void ResetCache(); + + /** Retrieves the PhysicsServer from the SceneGraph */ + virtual void OnLink(); /** resets all cached references */ virtual void OnUnlink(); @@ -122,6 +126,10 @@ */ void RemoveTransformPaths(boost::shared_ptr<zeitgeist::Leaf> root); + /** Pointer to the instance of the physicsserver */ + //causes crash at runtime if declared + boost::shared_ptr<PhysicsServer> mPhysicsServer; + private: /** the current active scene */ CachedPath<Scene> mActiveScene; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-02-09 05:23:16
|
Revision: 161 http://simspark.svn.sourceforge.net/simspark/?rev=161&view=rev Author: a-held Date: 2010-02-09 05:23:09 +0000 (Tue, 09 Feb 2010) Log Message: ----------- fixed a bug in space.cpp Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp Modified: branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2010-02-08 12:30:18 UTC (rev 160) +++ branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2010-02-09 05:23:09 UTC (rev 161) @@ -245,7 +245,7 @@ // before this space. Any other order provokes a segfault in ODE. DestroySpaceObjects(); - mSpaceImp->DestroySpace(mSpaceID, mContactGroupID); + mSpaceImp->DestroySpace(mContactGroupID, mSpaceID); mSpaceID = 0; mContactGroupID = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tk...@us...> - 2010-02-08 13:33:07
|
Revision: 159 http://simspark.svn.sourceforge.net/simspark/?rev=159&view=rev Author: tknrkb Date: 2010-02-08 12:13:31 +0000 (Mon, 08 Feb 2010) Log Message: ----------- fixed for OSX install. Modified Paths: -------------- trunk/spark/plugin/accelerometer/CMakeLists.txt Modified: trunk/spark/plugin/accelerometer/CMakeLists.txt =================================================================== --- trunk/spark/plugin/accelerometer/CMakeLists.txt 2010-02-04 07:56:12 UTC (rev 158) +++ trunk/spark/plugin/accelerometer/CMakeLists.txt 2010-02-08 12:13:31 UTC (rev 159) @@ -10,7 +10,8 @@ target_link_libraries(accelerometer ${spark_libs} ${Boost_LIBRARIES}) -set_target_properties(accelerometer PROPERTIES VERSION 0.0.0 SOVERSION 0) if (NOT APPLE) - install(TARGETS accelerometer DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) + set_target_properties(accelerometer PROPERTIES VERSION 0.0.0 SOVERSION 0) endif (NOT APPLE) + +install(TARGETS accelerometer DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tk...@us...> - 2010-02-08 12:32:23
|
Revision: 160 http://simspark.svn.sourceforge.net/simspark/?rev=160&view=rev Author: tknrkb Date: 2010-02-08 12:30:18 +0000 (Mon, 08 Feb 2010) Log Message: ----------- Comform SDL.h to SDL/SDL.h. Modified Paths: -------------- trunk/rcssserver3d/rcssmonitor3d/main.cpp trunk/rcssserver3d/rcssserver3d/main.cpp Modified: trunk/rcssserver3d/rcssmonitor3d/main.cpp =================================================================== --- trunk/rcssserver3d/rcssmonitor3d/main.cpp 2010-02-08 12:13:31 UTC (rev 159) +++ trunk/rcssserver3d/rcssmonitor3d/main.cpp 2010-02-08 12:30:18 UTC (rev 160) @@ -31,7 +31,7 @@ #endif #if __APPLE__ -#include <SDL.h> +#include <SDL/SDL.h> #endif using namespace spark; Modified: trunk/rcssserver3d/rcssserver3d/main.cpp =================================================================== --- trunk/rcssserver3d/rcssserver3d/main.cpp 2010-02-08 12:13:31 UTC (rev 159) +++ trunk/rcssserver3d/rcssserver3d/main.cpp 2010-02-08 12:30:18 UTC (rev 160) @@ -31,7 +31,7 @@ #endif #if __APPLE__ -#include <SDL.h> +#include <SDL/SDL.h> #endif using namespace spark; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-02-04 07:56:19
|
Revision: 158 http://simspark.svn.sourceforge.net/simspark/?rev=158&view=rev Author: a-held Date: 2010-02-04 07:56:12 +0000 (Thu, 04 Feb 2010) Log Message: ----------- Let SceneServer communicate with PhysicsServer instead of using physics classes directly Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.cpp branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.h Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp 2010-02-03 09:27:51 UTC (rev 157) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp 2010-02-04 07:56:12 UTC (rev 158) @@ -22,12 +22,59 @@ #include <oxygen/physicsserver/physicsserver.h> #include <oxygen/physicsserver/int/physicsserverint.h> #include <oxygen/physicsserver/impfactory.h> +#include <oxygen/physicsserver/world.h> +#include <oxygen/physicsserver/space.h> +#include <oxygen/sceneserver/scene.h> +#include <iostream> using namespace oxygen; +using namespace boost; -boost::shared_ptr<PhysicsServerInt> PhysicsServer::mPhysicsServerImp; +shared_ptr<PhysicsServerInt> PhysicsServer::mPhysicsServerImp; +shared_ptr<PhysicsServer> PhysicsServer::mInstance; PhysicsServer::PhysicsServer() : Leaf() { mPhysicsServerImp = ImpFactory::GetInstance()->GetPhysicsServerImp(); } + +shared_ptr<PhysicsServer> PhysicsServer::GetInstance(){ + if (mInstance.get() == 0) + mInstance = shared_ptr<PhysicsServer>(new PhysicsServer()); + return mInstance; +} + +void PhysicsServer::ResetCache(){ + mActiveSpace.reset(); + mActiveWorld.reset(); +} + +void PhysicsServer::UpdateCache(shared_ptr<Scene> activeScene){ + if (mActiveSpace.get() == 0) + { + // cache the space reference + mActiveSpace = shared_dynamic_cast<Space> + (activeScene->GetChildOfClass("Space")); + } + + if (mActiveWorld.get() == 0) + { + // cache the world reference + mActiveWorld = shared_dynamic_cast<World> + (activeScene->GetChildOfClass("World")); + } +} + +void PhysicsServer::DoCollisions(){ + if (mActiveSpace.get() != 0) + { + mActiveSpace->Collide(); + } +} + +void PhysicsServer::StepSimulation(float deltaTime){ + if (mActiveWorld.get() != 0) + { + mActiveWorld->Step(deltaTime); + } +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h 2010-02-03 09:27:51 UTC (rev 157) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.h 2010-02-04 07:56:12 UTC (rev 158) @@ -25,10 +25,14 @@ #include <zeitgeist/class.h> #include <zeitgeist/leaf.h> #include <oxygen/oxygen_defines.h> +#include <boost/shared_ptr.hpp> namespace oxygen { class PhysicsServerInt; +class Scene; +class World; +class Space; class OXYGEN_API PhysicsServer : public zeitgeist::Leaf { @@ -39,8 +43,31 @@ PhysicsServer(); virtual ~PhysicsServer(){}; + /** Returns the instance of the PhysicsServer. */ + static boost::shared_ptr<PhysicsServer> GetInstance(); + + /** Resets the active space and active world */ + void ResetCache(); + + /** Updates the active world and active space */ + void UpdateCache(boost::shared_ptr<Scene> acticeScene); + + /** Collides all objects in the active space */ + void DoCollisions(); + + /** Advance the simulation by \param deltatime */ + void StepSimulation(float deltaTime); + private: + static boost::shared_ptr<PhysicsServer> mInstance; + static boost::shared_ptr<PhysicsServerInt> mPhysicsServerImp; + + /** cached reference to the Space node below the active scene */ + boost::shared_ptr<Space> mActiveSpace; + + /** cached reference to the World node below the active scene */ + boost::shared_ptr<World> mActiveWorld; }; DECLARE_CLASS(PhysicsServer); Modified: branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.cpp 2010-02-03 09:27:51 UTC (rev 157) +++ branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.cpp 2010-02-04 07:56:12 UTC (rev 158) @@ -30,8 +30,7 @@ #include "scene.h" #include "sceneimporter.h" #include "scenedict.h" -#include <oxygen/physicsserver/world.h> -#include <oxygen/physicsserver/space.h> +#include <oxygen/physicsserver/physicsserver.h> using namespace boost; using namespace oxygen; @@ -70,8 +69,7 @@ void SceneServer::ResetCache() { - mActiveSpace.reset(); - mActiveWorld.reset(); + PhysicsServer::GetInstance()->ResetCache(); } void SceneServer::UpdateCache() @@ -81,20 +79,15 @@ ResetCache(); return; } - - if (mActiveSpace.get() == 0) - { - // cache the space reference - mActiveSpace = shared_dynamic_cast<Space> - (mActiveScene->GetChildOfClass("Space")); - } - - if (mActiveWorld.get() == 0) - { - // cache the world reference - mActiveWorld = shared_dynamic_cast<World> - (mActiveScene->GetChildOfClass("World")); - } + + /*shared_ptr<PhysicsServer> phServer = shared_static_cast<PhysicsServer> + (GetChildOfClass("oxygen/PhysicsServer")); + + if (phServer.get() == 0){ + GetLog()->Error() << "(SceneServer) No PhysicsServer found!"; + }*/ + + PhysicsServer::GetInstance()->UpdateCache(mActiveScene.get()); } void SceneServer::OnUnlink() @@ -161,16 +154,10 @@ mActiveScene->PrePhysicsUpdate(deltaTime); // determine collisions - if (mActiveSpace.get() != 0) - { - mActiveSpace->Collide(); - } + PhysicsServer::GetInstance()->DoCollisions(); // do physics - if (mActiveWorld.get() != 0) - { - mActiveWorld->Step(deltaTime); - } + PhysicsServer::GetInstance()->StepSimulation(deltaTime); mActiveScene->PostPhysicsUpdate(); mActiveScene->UpdateHierarchy(); @@ -196,16 +183,10 @@ { boost::recursive_mutex::scoped_lock lock(mMutex); // determine collisions - if (mActiveSpace.get() != 0) - { - mActiveSpace->Collide(); - } + PhysicsServer::GetInstance()->DoCollisions(); // do physics - if (mActiveWorld.get() != 0) - { - mActiveWorld->Step(deltaTime); - } + PhysicsServer::GetInstance()->StepSimulation(deltaTime); } void SceneServer::PostPhysicsUpdate() Modified: branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.h =================================================================== --- branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.h 2010-02-03 09:27:51 UTC (rev 157) +++ branches/multiphys/spark/lib/oxygen/sceneserver/sceneserver.h 2010-02-04 07:56:12 UTC (rev 158) @@ -47,8 +47,6 @@ #endif class Scene; -class Space; -class World; class BaseNode; class Transform; @@ -128,12 +126,6 @@ /** the current active scene */ CachedPath<Scene> mActiveScene; - /** cached reference to the Space node below the active scene */ - boost::shared_ptr<Space> mActiveSpace; - - /** cached reference to the World node below the active scene */ - boost::shared_ptr<World> mActiveWorld; - /** modified transform nodes are labeled with this value, the value is incremented each cycle to avoid a resetting */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-02-03 09:28:00
|
Revision: 157 http://simspark.svn.sourceforge.net/simspark/?rev=157&view=rev Author: a-held Date: 2010-02-03 09:27:51 +0000 (Wed, 03 Feb 2010) Log Message: ----------- Derive engine-specific classes from engine-specific superclasses again Commented interfaces Left hint in all engine-specific header files that methods are documented in the implementation files Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/softbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/staticbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecompoundcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecompoundcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconcavecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconcavecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odedynamicbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odedynamicbody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeemptycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeemptycollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.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/odeplanecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesoftbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesoftbody.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/odespherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.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.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/space.h branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/world.h Modified: branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h 2010-02-03 09:27:51 UTC (rev 157) @@ -71,7 +71,8 @@ void SetNumAxes(int num); /** returns the number of angular axes that are controlled by the - angular motor */ + angular motor + */ int GetNumAxes(); /** sets one of the motor axis. \param idx gives the motor axis to @@ -83,15 +84,14 @@ be determined automatically at each time step. Axes 0 and 2 must be perpendicular to each other. Axis 0 must be anchored to the first body, axis 2 must be anchored to the second body. - */ + */ void SetMotorAxis(EAxisIndex idx, EAxisAnchor anchor, const salt::Vector3f& axis); /** returns the motor axis \param idx */ salt::Vector3f GetMotorAxis(EAxisIndex idx); - /** returns the relative anchor mode of the motor axis \param idx - */ + /** returns the relative anchor mode of the motor axis \param idx */ EAxisAnchor GetAxisAnchor(EAxisIndex idx); /** sets the current angle along axis \param idx. This function @@ -104,14 +104,14 @@ 'user' mode this is simply the value that was previoulsy set with SetAxisAngle(). In 'euler' mode this is the corresponding euler angle. - */ + */ float GetAxisAngle(EAxisIndex idx); /** Return the current angle rate for axis anum. In dAMotorUser mode this is always zero, as not enough information is available. In dAMotorEuler mode this is the corresponding euler angle rate. - */ + */ float GetAxisAngleRate(EAxisIndex idx); protected: Modified: branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h 2010-02-03 09:27:51 UTC (rev 157) @@ -73,7 +73,8 @@ protected: /** constructs a default capsule with an radius of 1 and a - length of 1 */ + length of 1 + */ virtual bool ConstructInternal(); private: Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-02-03 09:27:51 UTC (rev 157) @@ -24,7 +24,6 @@ #include <oxygen/physicsserver/impfactory.h> #include <oxygen/physicsserver/collisionhandler.h> #include <oxygen/physicsserver/space.h> -#include <oxygen/physicsserver/staticphysicsmethods.h> #include <oxygen/physicsserver/transformcollider.h> #include <oxygen/physicsserver/rigidbody.h> #include <oxygen/sceneserver/scene.h> Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.h 2010-02-03 09:27:51 UTC (rev 157) @@ -24,7 +24,6 @@ #include <oxygen/sceneserver/basenode.h> #include <oxygen/oxygen_defines.h> -#include <oxygen/physicsserver/ode/odewrapper.h> namespace oxygen { Modified: branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h 2010-02-03 09:27:51 UTC (rev 157) @@ -30,8 +30,8 @@ { class ContactJointHandlerInt; -/** \class ContactJointHandler is a CollisionHandler that creates an - ODE contact joint between the two bodies associated with the two +/** \class ContactJointHandler is a CollisionHandler that creates a + contact joint between the two bodies associated with the two affected collision geoms. */ class OXYGEN_API ContactJointHandler : public CollisionHandler @@ -75,7 +75,7 @@ */ int GetContactMode() const; - /** sets or resets the dContactBounce mode flag */ + /** sets or resets Bounce mode flag */ void SetContactBounceMode(bool set); /** sets the bounce value */ @@ -112,8 +112,7 @@ /** returns the constraint force mixing parameter (CFM) */ float GetContactSoftCFM() const; - /** sets or resets the force dependent contact slip mode (FDS) - */ + /** sets or resets the force dependent contact slip mode (FDS) */ void SetContactSlipMode (bool set); /** sets the force dependent slip (FDS) in both friction Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -31,20 +31,78 @@ class RigidBody; class Joint; +/** An angular motor allows the relative angular velocities of two + bodies to be controlled. The angular velocity can be controlled on + up to three axes, allowing torque motors and stops to be set for + rotation about those axes. +*/ + class OXYGEN_API AngularMotorInt { -public: +public: + /** Creates a new angular motor within the physics world specified + by \param worldID + */ virtual long CreateAngularMotor(long worldID) = 0; + + /** Sets the mode of this angular motor to user mode */ virtual void SetModeUserMode(long jointID) = 0; + + /** Sets the mode of this angular motor to euler mode */ virtual void SetModeEulerMode(long jointID) = 0; + + /** returns the current motor mode - zero if motor is in user mode, + or one if motor is in euler mode. + */ virtual int GetMode(long jointID) = 0; + + /** sets the number of angular axes that will be controlled by the + angular motor. \param num can range from 0 which effectively + disables the motor to 3, which are automatically set in euler + mode. + */ virtual void SetNumAxes(int num, long jointID) = 0; + + /** returns the number of angular axes that are controlled by the + angular motor + */ virtual int GetNumAxes(long jointID) = 0; + + /** sets one of the motor axis. \param idx gives the motor axis to + be set. \param anchor gives the relative anchor mode of the + axis. \param axis gives the axis vector relative to the joint node + orientation. + + For Euler mode only axes 0 and 2 need to be set. Axis 1 will + be determined automatically at each time step. Axes 0 and 2 + must be perpendicular to each other. Axis 0 must be anchored + to the first body, axis 2 must be anchored to the second body. + */ virtual void SetMotorAxis(int idx, int anchor, salt::Vector3f axis, long jointID) = 0; + + /** returns the relative anchor mode of the motor axis \param idx */ virtual int GetAxisAnchor(int idx, long jointID) = 0; + + /** returns the motor axis \param idx */ virtual salt::Vector3f GetMotorAxis(int idx, long jointID) = 0; + + /** sets the current angle along axis \param idx. This function + should only be called in 'user' mode, as in this mode the + motor has no other way of knowing the joint angles. + */ virtual void SetAxisAngle(int idx, float degAngle, long jointID) = 0; + + /** sets the current angle along axis \param idx. This function + should only be called in 'user' mode, as in this mode the + motor has no other way of knowing the joint angles. + */ virtual float GetAxisAngle(int idx, long jointID) = 0; + + /** Return the current angle rate for axis anum. In dAMotorUser + mode this is always zero, as not enough information is + available. In dAMotorEuler mode this is the corresponding + euler angle rate. + */ virtual float GetAxisAngleRate(int idx, long jointID) = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -34,10 +34,29 @@ class OXYGEN_API BallJointInt { public: + + /** Set the joint anchor point. The joint will try to keep this + point on each body together. The input is specified in local + coordinates. + */ virtual void SetAnchor(const salt::Vector3f& anchor, long jointID) = 0; + + /** Returns the joint anchor point in local coordinates on the first of + the two bodies. If the joint is perfectly satisfied, the joint + anchor point will be the same for both bodies. + */ virtual salt::Vector3f GetAnchor1(long jointID) = 0; + + /** Returns the joint anchor point in local coordinates on the second of + the two bodies. If the joint is perfectly satisfied, the joint + anchor point will be the same for both bodies. + */ virtual salt::Vector3f GetAnchor2(long jointID) = 0; - virtual long CreateBallJoint(long world) = 0; + + /** Creates a new BallJoint in the physics world specified + by \param worldID + */ + virtual long CreateBallJoint(long worldID) = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -30,7 +30,7 @@ class OXYGEN_API BodyInt { - + /** This class is currently not implemented. */ }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -33,9 +33,20 @@ { public: + /** sets the side lengths of the box geom */ virtual void SetBoxLengths(const salt::Vector3f& extents, long geomID) = 0; + + /** gets the side lengths of the box geom */ virtual void GetBoxLengths(salt::Vector3f& extents, long geomID) = 0; + + /** returns the depth of the given relative position in the + managed box geom. Points inside the geom will have positive + depth, points outside it will have negative depth, and points + on the surface will have zero depth. + */ virtual float GetPointDepth(const salt::Vector3f& pos, long geomID) = 0; + + /** Creates a new box geom and returns the ID of the newly created box */ virtual long CreateBox() = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -32,13 +32,37 @@ class OXYGEN_API CapsuleColliderInt { public: + + /** sets the parameters of the capsule. + + \param radius is the radius of the caps, and of the cylinder itself + \param length is the height of the cylinder, not counting the caps + */ virtual void SetParams(float radius, float length, long geomID) = 0; + + /** sets the radius of the capsule */ virtual void SetRadius(float radius, long geomID) = 0; + + /** sets the length of the capsule */ virtual void SetLength(float length, long geomID) = 0; + + /** gets the radius and the length of the capsule */ virtual void GetParams(float& radius, float& length, long geomID) = 0; + + /** returns the radius of the capsule */ virtual float GetRadius(long geomID) = 0; + + /** return the length of the capsule */ virtual float GetLength(long geomID) = 0; + + /** returns the depth of the given relative position in the + managed capsule geom. Points inside the geom will have + positive depth, points outside it will have negative depth, and + points on the surface will have zero depth. + */ virtual float GetPointDepth(const salt::Vector3f& pos, long geomID) = 0; + + /** Creates a new Capsule and returns the ID of the newly created capsule */ virtual long CreateCapsule() = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -42,16 +42,56 @@ */ virtual Collider* GetColliderPointer(long geomID) = 0; + /** sets the relative position of the managed geom directly. If + the geom is connected to a body, the position of the body will + also be changed + */ virtual void SetPosition(const salt::Vector3f& globalPos, long geomID) = 0; + + /** sets the relative position of the managed geom to the body's center. + Only use for colliders encapsulated in a TransformCollider! + */ virtual void SetLocalPosition(const salt::Vector3f& pos, long geomID) = 0; + + /** returns the absolute position of the managed geom */ virtual salt::Vector3f GetPosition(long geomID) const = 0; + + /** sets the relative orientation of the managed geom directly. If + the geom is connected to a body, the orientation of the body + will also be changed + */ virtual void SetRotation(const salt::Matrix& rot, long geomID) = 0; + + /** returns true if the geom managed by this + Collider intersects with the geom managed by the given collider + */ virtual bool Intersect(boost::shared_ptr<Collider> collider, long geomID) = 0; + + /** returns the handle ID of the containing parent space */ virtual long GetParentSpaceID(long geomID) = 0; + + /** Destroys the collider specified by \param geomID */ virtual void DestroyGeom(long geomID) = 0; + + /** Registers the collider specified by \param geomID to the transform + collider specified by \param parentGeomID + */ virtual void TransformSetGeom(long parentGeomID, long geomID) = 0; + + /** Puts the collider specified by \param geomID into the space + specified by spaceID. It also registers \param collider as the + abstract collider object managing this collider. + */ virtual void SetSpace(long spaceID, long geomID, Collider* collider) = 0; + + /** Registers the collider specified by \param geomID to the body + specified by \param bodyID + */ virtual void SetBody(long bodyID, long geomID) = 0; + + /** Removes the collider specified by \param geomID from the space + specified by \param spaceID + */ virtual void RemoveFromSpace(long geomID, long spaceID) = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/compoundcolliderint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -30,7 +30,7 @@ class OXYGEN_API CompoundColliderInt { - + /** This class is currently not implemented. */ }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/concavecolliderint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -30,7 +30,7 @@ class OXYGEN_API ConcaveColliderInt { - + /** This class is currently not implemented. */ }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -30,7 +30,7 @@ class OXYGEN_API ConeColliderInt { - + /** This class is currently not implemented. */ }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -30,7 +30,7 @@ class OXYGEN_API ConeTwistJointInt { - + /** This class is currently not implemented. */ }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -33,33 +33,106 @@ class OXYGEN_API ContactJointHandlerInt { -public: - virtual float MixValues(const float v1, const float v2, const int n) const = 0; +public: + /** Returns a pointer to a SurfaceParameter class whose values were initialized + with default values that make sense for most physics simulations. + */ virtual GenericSurfaceParameter* Initialize() = 0; + + /** Finds and returns the ID of the body that the collider specified by + \param geomID has been registered to. */ virtual long RetrieveBody(long geomID) = 0; + + /** Creates a contact joint in the world specified by \param worldID, within the joint + group specified by \param jointGroupID + */ virtual long CreateContactJoint(long worldID, long jointGroupID, GenericContact& contact) = 0; + + /** Attaches the contact joint specified by \param jointID to the two bodies + specified by \param body1 and \param body2 + */ virtual void AttachContactJoint(long jointID, long bodyID1, long bodyID2) = 0; + + /** Calculates the surface parameters to take into account for a collision + by factoring in the surface parameters of the two colliding objects, + specified by \param colideeParam and \param surfacePtr + */ virtual void CalcSurfaceParam(GenericContact& surface, GenericSurfaceParameter& collideeParam, GenericSurfaceParameter* surfacePtr) = 0; + + /** returns the current set of contact mode flags in the surface + parameter + */ virtual int GetContactMode(GenericSurfaceParameter* surface) const = 0; + + /** sets or resets the Bounce mode flag */ virtual void SetContactBounceMode(bool set, GenericSurfaceParameter* surface) = 0; + + /** sets the bounce value */ virtual void SetBounceValue(float bounce, GenericSurfaceParameter* surface) = 0; + + /** returns the bounce value */ virtual float GetBounceValue(GenericSurfaceParameter* surface) const = 0; + + /** sets the mininum incoming velocity necessary for bounce */ virtual void SetMinBounceVel(float vel, GenericSurfaceParameter* surface) = 0; + + /** returns the mininum incoming velocity necessary for bounce */ virtual float GetMinBounceVel(GenericSurfaceParameter* surface) const = 0; + + /** sets or resets the error reduction parameter (ERP) mode, + useful to make surfaces soft. + */ virtual void SetContactSoftERPMode(bool set, GenericSurfaceParameter* surface) = 0; + + /** sets the contact normal error reduction parameter (ERP) */ virtual void SetContactSoftERP(float erp, GenericSurfaceParameter* surface) = 0; + + /** returns the contact normal error reduction parameter (ERP) */ virtual float GetContactSoftERP(GenericSurfaceParameter* surface) const = 0; + + /** sets or resets the constraint force mixing mode (CFM), useful + to make surfaces soft + */ virtual void SetContactSoftCFMMode(bool set, GenericSurfaceParameter* surface) = 0; + + /** sets the constraint force mixing parameter (CFM) */ virtual void SetContactSoftCFM(float cfm, GenericSurfaceParameter* surface) = 0; + + /** returns the constraint force mixing parameter (CFM) */ virtual float GetContactSoftCFM(GenericSurfaceParameter* surface) const = 0; + + /** sets or resets the force dependent contact slip mode (FDS) */ virtual void SetContactSlipMode (bool set, GenericSurfaceParameter* surface) = 0; + + /** sets the force dependent slip (FDS) in both friction + directions + */ virtual void SetContactSlip(float slip, GenericSurfaceParameter* surface) = 0; + + /** returns the force dependent slip in the first slip direction + (FDS) + */ virtual float GetContactSlip1(GenericSurfaceParameter* surface) const = 0; + + /** returns the force dependent slip in the second slip direction + (FDS) + */ virtual float GetContactSlip2(GenericSurfaceParameter* surface) const = 0; + + /** sets the Coulomb friction coefficient */ virtual void SetContactMu(float mu, GenericSurfaceParameter* surface) = 0; + + /** returns the Coulomb friction coefficient */ virtual float GetContactMu(GenericSurfaceParameter* surface) const = 0; + +protected: + /** returns \param v1 for \param n =1, \param v2 for /param n =2, and + (\param v1 + \param v2) * 0.5 for \param n =3. Undefined for all + other values of n. + */ + virtual float MixValues(const float v1, const float v2, const int n) const = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -30,7 +30,7 @@ class OXYGEN_API ConvexColliderInt { - + /** This class is currently not implemented. */ }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -30,7 +30,7 @@ class OXYGEN_API CylinderColliderInt { - + /** This class is currently not implemented. */ }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/dynamicbodyint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -30,7 +30,7 @@ class OXYGEN_API DynamicBodyInt { - + /** This class is currently not implemented. */ }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/emptycolliderint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -30,7 +30,7 @@ class OXYGEN_API EmptyColliderInt { - + /** This class is currently not implemented. */ }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -27,7 +27,14 @@ class OXYGEN_API FixedJointInt{ public: + /** Creates a fixed joint within the physics world specified + by \param worldID + */ virtual long CreateFixedJoint(long world) = 0; + + /** Declares that the joint specified by \param jointID is a + fixed joint + */ virtual void SetFixed(long jointID) = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -30,7 +30,7 @@ class OXYGEN_API Generic6DOFJointInt { - + /** This class is currently not implemented. */ }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -28,15 +28,42 @@ class OXYGEN_API Hinge2JointInt{ public: - virtual long CreateHinge2Joint(long world) = 0; + /** Creates a hinge2joint within the physics world specified + by \param worldID + */ + virtual long CreateHinge2Joint(long worldID) = 0; + + /** sets the joint anchor point. The joint will try to keep this + point on each body together. The input is specified in local + coordinates. + */ virtual void SetAnchor(const salt::Vector3f& anchor, const salt::Vector3f& up, const salt::Vector3f& right, long jointID) = 0; + + /** returns the joint anchor point in local coordinates on the first of + the two bodies. If the joint is perfectly satisfied, the joint + anchor point will be the same for both bodies. + */ virtual salt::Vector3f GetAnchor1(long jointID) = 0; + + /** returns the joint anchor point in local coordinates on the second of + the two bodies. If the joint is perfectly satisfied, the joint + anchor point will be the same for both bodies. + */ virtual salt::Vector3f GetAnchor2(long jointID) = 0; + + /** returns one of the hinge2 angles in degrees, measured between + the two bodies, or between the body and the static + environment. + */ virtual float GetAngle(long jointID) = 0; + + /** returns the time derivate of the first of the hinge2 angles */ virtual float GetAngleRate1(long jointID) = 0; + + /** returns the time derivate of the second of the hinge2 angles */ virtual float GetAngleRate2(long jointID) = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -28,13 +28,44 @@ class OXYGEN_API HingeJointInt{ public: - virtual long CreateHingeJoint(long world) = 0; + /** Creates a new hingejoint within the physics world specified + by \param worldID + */ + virtual long CreateHingeJoint(long worldID) = 0; + + /** sets the joint anchor point. The joint will try to keep this + point on each body together. The input is specified in local + coordinates. + */ virtual void SetAnchor(const salt::Vector3f& anchor, long jointID) = 0; + + /** returns the joint anchor point in local coordinates on the first of + the two bodies. If the joint is perfectly satisfied, the joint + anchor point will be the same for both bodies. + */ virtual salt::Vector3f GetAnchor1(long jointID) = 0; + + /** returns the joint anchor point in local coordinates on the second of + the two bodies. If the joint is perfectly satisfied, the joint + anchor point will be the same for both bodies. + */ virtual salt::Vector3f GetAnchor2(long jointID) = 0; + + /** Sets the joint axis in the local coordinate system. The + connected bodies movements will be constrained to move around + this axis. + */ virtual void SetAxis(const salt::Vector3f& axis, long jointID) = 0; + + /** Returns the hinge axis in the local coordinate system */ virtual salt::Vector3f GetAxis(long jointID) = 0; + + /** returns the hinge angle in degrees, measured between the two + bodies, or between the body and the static environment. + */ virtual float GetAngle(long jointID) const = 0; + + /** returns the time derivate of the hinge angle */ virtual float GetAngleRate(long jointID) const = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -37,65 +37,209 @@ class OXYGEN_API JointInt { -public: - - /** Gets the pointer to the Joint object that manages the joint - specified by jointID. +public: + /** Returns a pointer to the Joint object that manages the joint + specified by \param jointID. */ virtual Joint* GetJoint(long jointID) = 0; - /** Checks if two bodies, specified by bodyID1 and bodyID2, are - connected by a joint. + /** Checks if two bodies, specified by \param bodyID1 and + \param bodyID2, are connected by a joint. */ virtual bool AreConnected(long bodyID1, long bodyID2) = 0; - /** Checks if two bodies, specified by bodyID1 and bodyID2, are - connected by a joint that is not of the type specified by joint_type. + /** Checks if two bodies, specified by \param bodyID1 and + \param bodyID2, are connected by a joint that is not of the type + specified by \param joint_type. */ virtual bool AreConnectedExcluding(long bodyID1, long bodyID2, int joint_type) = 0; + /** Destroys the Joint specified by \param jointID */ virtual void DestroyJoint(long jointID, boost::shared_ptr<GenericJointFeedback> feedback) = 0; + + /** attaches the joint to some new bodies. If the joint is already + attached, it will be detached from the old bodies first. To + attach this joint to only one body, set body1 or body2 to + null. A null body refers to the static environment. Setting + both bodies to zero puts the joint into "limbo", i.e. it will + have no effect on the simulation. + */ virtual void Attach(long bodyID1, long bodiID2, long jointID) = 0; + + /** returns the type of the managed joint, possible return + values from ODE are dJointTypeNone, dJointTypeBall, dJointTypeHinge, + dJointTypeSlider, dJointTypeContact, dJointTypeUniversal, + dJointTypeHinge2, dJointTypeFixed or dJointTypeAMotor. + */ virtual int GetType(long jointID) const = 0; + + /** Returns the ID of one of the bodies the joint specified + by \param jointID is connected to. Since a joint is always + connected to two bodies, use \param idx to address the first or + second body. + */ virtual long GetBodyID(int idx, long jointID) = 0; + + /** during the world time step, the forces that are applied by + each joint are added directly to the joined bodies, and the + user normally has no way of telling which joint contributed + how much force. If this information is desired the joint can + be enabled to collect feedback information. By default a joint + does not collect any feedback information. + */ virtual void EnableFeedback(bool enable, long jointID, boost::shared_ptr<GenericJointFeedback> feedback) = 0; + + /** returns true if the joint is set to collect feedback + information + */ virtual bool FeedbackEnabled(long jointID) const = 0; + + /** queries the force that the joint applied to one body attached + to it during the last timestep. + */ virtual salt::Vector3f GetFeedbackForce(int idx, boost::shared_ptr<GenericJointFeedback> feedback) const = 0; + + /** queries the torque that the joint applied to one body attached + to it during the last timestep. + */ virtual salt::Vector3f GetFeedbackTorque(int idx, boost::shared_ptr<GenericJointFeedback> feedback) const = 0; + + /** sets the fudgefactor parameter, making this value too small can + prevent the motor from being able to move the joint away from + a stop + */ virtual void SetFudgeFactor(int idx, float fudge_factor, long jointID) = 0; + + /** returns the fudgefactor paramter */ virtual float GetFudgeFactor(int idx, long jointID) const = 0; + + /** sets the bouncyness of the stops. This is a restitution + parameter in the range 0..1. 0 means the stops are not bouncy + at all, 1 means maximum bouncyness. + */ virtual void SetBounce(int idx, float bounce, long jointID) = 0; + + /** returns the bouncyness of the stops */ virtual float GetBounce(int idx, long jointID) const = 0; + + /** sets the low stop angle in degrees, this stop must be greater + than -180 to be effective + */ virtual void SetLowStopDeg(int idx, float deg, long jointID) = 0; + + /** returns the low stop angle in degrees */ virtual float GetLowStopDeg(int idx, long jointID) const = 0; + + /** sets the high stop angle in degrees, this stop must be less + than +180 to be effective + */ virtual void SetHighStopDeg(int idx, float deg, long jointID) = 0; + + /** returns the high stop angle in degrees */ virtual float GetHighStopDeg(int idx, long jointID) const = 0; + + /** sets the low stop position */ virtual void SetLowStopPos(int idx, float deg, long jointID) = 0; + + /** returns the low stop position */ virtual float GetLowStopPos(int idx, long jointID) const = 0; + + /** sets the high stop position */ virtual void SetHighStopPos(int idx, float deg, long jointID) = 0; + + /** returns the high stop position */ virtual float GetHighStopPos(int idx, long jointID) const = 0; + + /** the constraint force mixing (CFM) value used when not at a + stop + */ virtual void SetCFM(int idx, float cfm, long jointID) = 0; + + /** returns the constraint force mixing value used when not a a + stop + */ virtual float GetCFM(int idx, long jointID) const = 0; + + /** sets the constraint force mixing (CFM) value used by the + stops. Together with the ERP value this can be used to get + spongy or soft stops. This is intended for unpowered joints, + it does not really work as expected when a powered joint + reaches its limit. + */ virtual void SetStopCFM(int idx, float cfm, long jointID) = 0; + + /** returns the constraint force mixing value used by the stops */ virtual float GetStopCFM(int idx, long jointID) const = 0; + + /** sets the error reduction parameter (ERP) used by the stops. */ virtual void SetStopERP(int idx, float erp, long jointID) = 0; + + /** returns the error reduction parameter used by the stops */ virtual float GetStopERP(int idx, long jointID) const = 0; + + /** sets the suspension error reduction parameter (ERP). As of ode + 0.039 this is only implemented on the hinge-2 joint. + */ virtual void SetSuspensionERP(int idx, float erp, long jointID) = 0; + + /** returns the suspension error reduction parameter (ERP). As of + ode 0.039 this is only implemented on the hinge-2 joint. + */ virtual float GetSuspensionERP(int idx, long jointID) const = 0; + + /** sets the suspension constraint force mixing value. As of ode + 0.039 this is only implemented on the hinge-2 joint. + */ virtual void SetSuspensionCFM(int idx, float cfm, long jointID) = 0; + + /** returns the suspension constraint force mixing value. As of + ode 0.039 this is only implemented on the hinge-2 joint. + */ virtual float GetSuspensionCFM(int idx, long jointID) const = 0; + + /** sets the linear motor velocity */ virtual void SetLinearMotorVelocity(int idx, float vel, long jointID) = 0; + + /** returns the linear motor velocity */ virtual float GetLinearMotorVelocity(int idx, long jointID) const = 0; + + /** sets the angular motor velocity in degrees */ virtual void SetAngularMotorVelocity(int idx, float deg, long jointID) = 0; + + /** returns the angular motor velocity in degrees */ virtual float GetAngularMotorVelocity(int idx, long jointID) const = 0; + + /** sets the maximum force or torque that the motor will use to + achieve the desired velocity. This must always be greater than + or equal to zero. Setting this to zero (the default value) + turns off the motor. + */ virtual void SetMaxMotorForce(int idx, float f, long jointID) = 0; + + /** returns the maximum force or torque that the motor will use to + achieve the desired velocity. + */ virtual float GetMaxMotorForce(int idx, long jointID) const = 0; + + /** Sets the joint parameter indexed by \param parameter of the joint + specified by \param jointID to \param value + */ virtual void SetParameter(int parameter, float value, long jointID) = 0; + + /** Returns the joint parameter indexed by \param parameter of the joint + specified by \param jointID + */ virtual float GetParameter(int parameter, long jointID) const = 0; + + /** Links the ID of the joint specified by \param jointID to the Joint + object specified by \param joint. Doing this allows us to later + find the Joint object that manages the joint specified + by \param jointID. + */ virtual void OnLink(long jointID, Joint* joint) = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -35,7 +35,12 @@ { public: + /** converts the rotation part of a salt::Matrix to an + engine-specific matrix that arranges the values in a different way + */ virtual void ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsMatrix& matrix) = 0; + + /** coverts an engine-specific matrix to the rotation part of a salt::Matrix */ virtual void ConvertRotationMatrix(const GenericPhysicsMatrix* matrix, salt::Matrix& rot) const = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -33,9 +33,24 @@ class OXYGEN_API PlaneColliderInt { public: + /** sets the parameters of the plane equation a*x+b*y+c*z = d , + all parameters are given in global coordinates + */ virtual void SetPlaneParams(float a, float b, float c, float d, long geomID) = 0; + + /** set the parameters of the plane given a position and a normal + vector; all parameters are given in global coordinates + */ virtual void SetParams(const salt::Vector3f& pos, salt::Vector3f normal, long geomID) = 0; + + /** returns the depth of the given relative position in the + managed plane. Points inside the geom will have positive + depth, points outside it will have negative depth, and points + on the surface will have zero depth. + */ virtual float GetPointDepth(const salt::Vector3f& pos, long geomID) = 0; + + /** Creates a plane collider and returns the ID of the newly created plane */ virtual long CreatePlane() = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -31,8 +31,24 @@ class OXYGEN_API RayColliderInt { +/** RayCollider encapsulates an ODE ray geometry "object". + + A ray is different from all the other geom classes in that it does not + represent a solid object. It is an infinitely thin line that starts + from the geom's position and extends in the direction of the geom's + local Z-axis. +*/ + public: + /** Sets the parameters of the ray. + * + * \param pos starting position of the ray + * \param dir new direction of the ray + * \param length length of the ray starting at its position + */ virtual void SetParams(salt::Vector3f pos, salt::Vector3f dir, float length, long geomID) = 0; + + /* Creates a ray and returns the ID of the newly created ray */ virtual long CreateRay() = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-02-02 08:17:15 UTC (rev 156) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-02-03 09:27:51 UTC (rev 157) @@ -34,58 +34,219 @@ { public: + /** Returns a pointer to the abstract RigidBody object that + manages the rigid body specified by \param bodyID + */ virtual RigidBody* GetBodyPointer(long bodyID) = 0; + /** enables this body. Each body can be enabled or + disabled. Disabled bodies are effectively turned off and are + not updated during a simulation step. Disabling bodies is an + effective way to save computation time when it is known that + the bodies are motionless or otherwise irrelevent to the + simulation. + */ virtual void Enable(long bodyID) = 0; + + /** disables this body */ virtual void Disable(long bodyID) = 0; + + /** returns true if this body is enabled */ virtual bool IsEnabled(long bodyID) const = 0; + + /** sets whether the body is influenced by the world's gravity or + not. Bodies are constructed to be influenced by the world's + gravity by default. + */ virtual void UseGravity(bool f, long bodyID) = 0; + + /** returns true, if this body is influenced by the world's + gravity + */ virtual bool UsesGravity(long bodyID) const = 0; + + /** sets the mass of this body */ virtual void SetMass(float mass, long bodyID) = 0; + + /** Sets the mass parameters of this body */ virtual void SetMassParameters(const GenericMass& mass, long bodyID) = 0; + + /** returns the mass of this body */ virtual float GetMass(long bodyID) const = 0; + + /** sets the mass parameters to represent a sphere of the given + radius and density, with the center of mass at (0,0,0) + relative to the body. + */ virtual void SetSphere(float density, float radius, long bodyID) = 0; + + /** adds a mass representing a sphere of the given radius and + density, with the matrix determining its center and + orientation + */ virtual salt::Vector3f AddSphere(float density, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + + /** sets the mass parameters to represent a sphere of the given + radius and total mass, with the center of mass at (0,0,0) + relative to the body. + */ virtual void SetSphereTotal(float total_mass, float radius, long bodyID) = 0; + + /** add a mass representing a sphere of the given radius and total + mass, with the matrix determining its center and orientation + */ virtual salt::Vector3f AddSphereTotal(float total_mass, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + + /** Set the mass parameters to represent a box of the given + dimensions and density, with the center of mass at (0,0,0) + relative to the body. + */ virtual void SetBox(float density, const salt::Vector3f& size, long bodyID) = 0; + + /** Add a mass representing a box of the given dimensions and + density, with the matrix determining its center and + orientation + */ virtual salt::Vector3f AddBox(float density, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + + /** Set the mass parameters to represent a box of the given + dimensions and total mass, with the center of mass at (0,0,0) + relative to the body. + */ virtual void SetBoxTotal(float total_mass, const salt::Vector3f& size, long bodyID) = 0; + + /** Add a mass representing a box of the given dimensions and + total mass, with the matrix determining its center and + orientation + */ virtual salt::Vector3f AddBoxTotal(float total_mass, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + + /** Set the mass parameters to represent a flat-ended cylinder of + the given parameters and density, with the center of mass at + (0,0,0) relative to the body. The radius of the cylinder is + radius. The length of the cylinder is length. The cylinder's + long axis is oriented along the body's z axis. + */ virtual void SetCylinder(float density, float radius, float length, long bodyID) = 0; + + /** Add a mass representing a flat-ended cylinder of the given + parameters and density, with the matrix determining its center + and orientation + */ virtual salt::Vector3f AddCylinder(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + + /** Set the mass parameters to represent a flat-ended cylinder of + the given parameters and total mass, with the center of mass + at (0,0,0) relative to the body. The radius of the cylinder is + radius. The length of the cylinder is length. The cylinder's + long axis is oriented along the body's z axis. + */ virtual void SetCylinderTotal(float total_mass, float radius, float length, long bodyID) = 0; + + /** Add a mass representing a flat-ended cylinder of the given + parameters and total mass, with the matrix determining its + center and orientation + */ virtual salt::Vector3f AddCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + + /* Set the mass parameters to represent a capsule of the + given parameters and density, with the center of mass at + (0,0,0) relative to the body. The radius of the cylinder (and + the spherical cap) is radius. The length of the cylinder (not + counting the spherical cap) is length. The cylinder's long axis + is oriented along the body's z axis. + */ virtual void SetCapsule(float density, float radius, float length, long bodyID) = 0; + + /** Add a mass representing a capsule of the given + parameters and density, with the matrix determining its center + and orientation + */ virtual salt::Vector3f AddCapsule(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + + /** Set the mass parameters to represent a capsule of the + given parameters and total mass, with the center of mass at + (0,0,0) relative to the body. The radius of the cylinder (and + the spherical cap) is radius. The length of the cylinder (not + counting the spherical cap) is length. The cylinder's long axis + is oriented along the body's z axis. + */ virtual void SetCapsuleTotal(float total_mass, float radius, float length, long bodyID) = 0; + + /** Add a mass representing a capsule of the given + parameters and total mass, with the matrix determining its + center and orientation + */ virtual salt::Vector3f AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + + /** displace the mass center relative to the body frame */ v... [truncated message content] |
From: <a-...@us...> - 2010-02-02 08:17:22
|
Revision: 156 http://simspark.svn.sourceforge.net/simspark/?rev=156&view=rev Author: a-held Date: 2010-02-02 08:17:15 +0000 (Tue, 02 Feb 2010) Log Message: ----------- got rid of staticphysicsmethods class Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp Removed Paths: ------------- branches/multiphys/spark/lib/oxygen/physicsserver/ode/staticphysicsmethods_ode.cpp branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods.h Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-02-02 08:17:15 UTC (rev 156) @@ -40,7 +40,6 @@ physicsserver/recorderhandler.h physicsserver/space.h physicsserver/spherecollider.h - physicsserver/staticphysicsmethods.h physicsserver/transformcollider.h physicsserver/world.h physicsserver/dragcontroller.h @@ -93,7 +92,6 @@ physicsserver/int/worldint.h #ode-specific files - physicsserver/ode/staticphysicsmethods_ode.cpp physicsserver/ode/odeangularmotor.h physicsserver/ode/odeballjoint.h physicsserver/ode/odebody.h Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-02-02 08:17:15 UTC (rev 156) @@ -167,7 +167,7 @@ } Collider* collPtr = - StaticPhysicsMethods::GetColliderPointer(geomID); + mColliderImp->GetColliderPointer(geomID); if (collPtr == 0) { Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-02-02 08:17:15 UTC (rev 156) @@ -37,6 +37,10 @@ { public: + /** Gets the pointer to the Collider object that manages the geom + specified by geomID. + */ + virtual Collider* GetColliderPointer(long geomID) = 0; virtual void SetPosition(const salt::Vector3f& globalPos, long geomID) = 0; virtual void SetLocalPosition(const salt::Vector3f& pos, long geomID) = 0; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-02-02 08:17:15 UTC (rev 156) @@ -38,7 +38,22 @@ class OXYGEN_API JointInt { public: + + /** Gets the pointer to the Joint object that manages the joint + specified by jointID. + */ + virtual Joint* GetJoint(long jointID) = 0; + /** Checks if two bodies, specified by bodyID1 and bodyID2, are + connected by a joint. + */ + virtual bool AreConnected(long bodyID1, long bodyID2) = 0; + + /** Checks if two bodies, specified by bodyID1 and bodyID2, are + connected by a joint that is not of the type specified by joint_type. + */ + virtual bool AreConnectedExcluding(long bodyID1, long bodyID2, int joint_type) = 0; + virtual void DestroyJoint(long jointID, boost::shared_ptr<GenericJointFeedback> feedback) = 0; virtual void Attach(long bodyID1, long bodiID2, long jointID) = 0; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-02-02 08:17:15 UTC (rev 156) @@ -34,6 +34,8 @@ { public: + virtual RigidBody* GetBodyPointer(long bodyID) = 0; + virtual void Enable(long bodyID) = 0; virtual void Disable(long bodyID) = 0; virtual bool IsEnabled(long bodyID) const = 0; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-02-02 08:17:15 UTC (rev 156) @@ -60,7 +60,7 @@ return shared_ptr<Joint>(); } - Joint* jointPtr = StaticPhysicsMethods::GetJoint(jointID); + Joint* jointPtr = mJointImp->GetJoint(jointID); if (jointPtr == 0) { @@ -184,7 +184,7 @@ return false; } - const bool connected = StaticPhysicsMethods::AreConnected(body1->GetBodyID(), body2->GetBodyID()); + const bool connected = mJointImp->AreConnected(body1->GetBodyID(), body2->GetBodyID()); return connected; } @@ -201,10 +201,9 @@ return false; } - const bool connected = - StaticPhysicsMethods::AreConnectedExcluding(body1->GetBodyID(), - body2->GetBodyID(), - joint_type); + const bool connected = mJointImp->AreConnectedExcluding(body1->GetBodyID(), + body2->GetBodyID(), + joint_type); return connected; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2010-02-02 08:17:15 UTC (rev 156) @@ -44,6 +44,11 @@ { } +Collider* ODECollider::GetColliderPointer(long geomID){ + dGeomID ODEGeom = (dGeomID) geomID; + return static_cast<Collider*>(dGeomGetData(ODEGeom)); +} + void ODECollider::SetRotation(const Matrix& rot, long geomID) { dGeomID ODEGeom = (dGeomID) geomID; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h 2010-02-02 08:17:15 UTC (rev 156) @@ -37,6 +37,11 @@ ODECollider(); virtual ~ODECollider(); + /** Gets the pointer to the Collider object that manages the geom + specified by geomID. + */ + Collider* GetColliderPointer(long geomID); + void SetPosition(const salt::Vector3f& globalPos, long geomID); void SetLocalPosition(const salt::Vector3f& pos, long GeomID); salt::Vector3f GetPosition(long geomID) const; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp 2010-02-02 08:17:15 UTC (rev 156) @@ -31,6 +31,23 @@ { } +Joint* ODEJoint::GetJoint(long jointID){ + dJointID ODEJoint = (dJointID) jointID; + return static_cast<Joint*>(dJointGetData(ODEJoint)); +} + +bool ODEJoint::AreConnected(long bodyID1, long bodyID2){ + dBodyID ODEBody1 = (dBodyID) bodyID1; + dBodyID ODEBody2 = (dBodyID) bodyID2; + return dAreConnected(ODEBody1, ODEBody2) == 1; +} + +bool ODEJoint::AreConnectedExcluding(long bodyID1, long bodyID2, int joint_type){ + dBodyID ODEBody1 = (dBodyID) bodyID1; + dBodyID ODEBody2 = (dBodyID) bodyID2; + return dAreConnectedExcluding(ODEBody1, ODEBody2, joint_type) == 1; +} + void ODEJoint::OnLink(long jointID, Joint* joint) { dJointID ODEJoint = (dJointID) jointID; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h 2010-02-02 08:17:15 UTC (rev 156) @@ -33,6 +33,10 @@ { public: ODEJoint(); + + Joint* GetJoint(long jointID); + bool AreConnected(long bodyID1, long bodyID2); + bool AreConnectedExcluding(long bodyID1, long bodyID2, int joint_type); virtual void DestroyJoint(long jointID, boost::shared_ptr<GenericJointFeedback> feedback); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2010-02-02 08:17:15 UTC (rev 156) @@ -36,6 +36,11 @@ ODERigidBody::ODERigidBody() : Body(){ } +RigidBody* ODERigidBody::GetBodyPointer(long bodyID){ + dBodyID ODEBody = (dBodyID) bodyID; + return static_cast<RigidBody*>(dBodyGetData(ODEBody)); +} + void ODERigidBody::Enable(long bodyID) { dBodyID ODEBody = (dBodyID) bodyID; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2010-02-02 08:17:15 UTC (rev 156) @@ -35,6 +35,8 @@ public: ODERigidBody(); + RigidBody* GetBodyPointer(long bodyID); + void Enable(long bodyID); void Disable(long bodyID); bool IsEnabled(long bodyID) const; Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/ode/staticphysicsmethods_ode.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/staticphysicsmethods_ode.cpp 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/staticphysicsmethods_ode.cpp 2010-02-02 08:17:15 UTC (rev 156) @@ -1,56 +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: body.cpp 106 2009-11-19 10:10:50Z 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. -*/ - -#include <oxygen/physicsserver/staticphysicsmethods.h> -#include <oxygen/physicsserver/collider.h> -#include <oxygen/physicsserver/joint.h> -#include <oxygen/physicsserver/rigidbody.h> -#include <oxygen/physicsserver/space.h> -#include <oxygen/physicsserver/ode/odewrapper.h> - -using namespace oxygen; -using namespace boost; - -Collider* StaticPhysicsMethods::GetColliderPointer(long geomID){ - dGeomID ODEGeom = (dGeomID) geomID; - return static_cast<Collider*>(dGeomGetData(ODEGeom)); -} - -Joint* StaticPhysicsMethods::GetJoint(long jointID){ - dJointID ODEJoint = (dJointID) jointID; - return static_cast<Joint*>(dJointGetData(ODEJoint)); -} - -RigidBody* StaticPhysicsMethods::GetBodyPointer(long bodyID){ - dBodyID ODEBody = (dBodyID) bodyID; - return static_cast<RigidBody*>(dBodyGetData(ODEBody)); -} - -bool StaticPhysicsMethods::AreConnected(long bodyID1, long bodyID2){ - dBodyID ODEBody1 = (dBodyID) bodyID1; - dBodyID ODEBody2 = (dBodyID) bodyID2; - return dAreConnected(ODEBody1, ODEBody2) == 1; -} - -bool StaticPhysicsMethods::AreConnectedExcluding(long bodyID1, long bodyID2, int joint_type){ - dBodyID ODEBody1 = (dBodyID) bodyID1; - dBodyID ODEBody2 = (dBodyID) bodyID2; - return dAreConnectedExcluding(ODEBody1, ODEBody2, joint_type) == 1; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2010-02-02 08:17:15 UTC (rev 156) @@ -327,7 +327,7 @@ return shared_ptr<RigidBody>(); } - RigidBody* bodyPtr = StaticPhysicsMethods::GetBodyPointer(bodyID); + RigidBody* bodyPtr = mRigidBodyImp->GetBodyPointer(bodyID); if (bodyPtr == 0) { Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods.h 2010-02-01 05:08:06 UTC (rev 155) +++ branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods.h 2010-02-02 08:17:15 UTC (rev 156) @@ -1,71 +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: joint.h 107 2009-11-25 06:09:10Z 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_STATICPHYSICSMETHODS_H -#define OXYGEN_STATICPHYSICSMETHODS_H - -#include <oxygen/oxygen_defines.h> - -namespace oxygen -{ -class Collider; -class Joint; -class RigidBody; -/** StaticPhysicsMethods is a workaround class. It defines static - engine-specific methods which are called from within other - static methods in engine-unspecific classes. - - The StaticPhysicsMethods class should be implemented once for each - supported engine. The preprocessor must decide which file to use. -*/ - -class OXYGEN_API StaticPhysicsMethods{ - -public: - /** Gets the pointer to the Collider object that manages the geom - specified by geomID. - */ - static Collider* GetColliderPointer(long geomID); - - /** Gets the pointer to the Joint object that manages the joint - specified by jointID. - */ - static Joint* GetJoint(long jointID); - - /** Gets the pointer to the RigidBody object that manages the rigid body - specified by bodyID. - */ - static RigidBody* GetBodyPointer(long bodyID); - - /** Checks if two bodies, specified by bodyID1 and bodyID2, are - connected by a joint. - */ - static bool AreConnected(long bodyID1, long bodyID2); - - /** Checks if two bodies, specified by bodyID1 and bodyID2, are - connected by a joint that is not of the type specified by joint_type. - */ - static bool AreConnectedExcluding(long bodyID1, long bodyID2, int joint_type); -}; - -} //namespace oxygen - -#endif //OXYGEN_GENERICPHYSICSOBJECTS_H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-02-01 05:08:15
|
Revision: 155 http://simspark.svn.sourceforge.net/simspark/?rev=155&view=rev Author: a-held Date: 2010-02-01 05:08:06 +0000 (Mon, 01 Feb 2010) Log Message: ----------- derive engine-specific classes from their engine-unspecific superclass (i.e. ODEPlaneCollider from Collider instead of from ODECollider) declare pointers to implementation objects as static Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp branches/multiphys/spark/lib/oxygen/physicsserver/body.h branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/collider.h branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.h branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.h branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.h branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/joint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecompoundcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecompoundcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconcavecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconcavecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odedynamicbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odedynamicbody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeemptycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeemptycollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.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/odeplanecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesoftbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesoftbody.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/odespherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odestaticbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odestaticbody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.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/planecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/softbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/softbody.h branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp branches/multiphys/spark/lib/oxygen/physicsserver/space.h branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/staticbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/staticbody.h branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.h branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp branches/multiphys/spark/lib/oxygen/physicsserver/world.h Modified: branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -27,6 +27,8 @@ using namespace boost; using namespace salt; +boost::shared_ptr<AngularMotorInt> AngularMotor::mAngularMotorImp; + AngularMotor::AngularMotor() : Joint() { mAngularMotorImp = ImpFactory::GetInstance()->GetAngularMotorImp(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h 2010-02-01 05:08:06 UTC (rev 155) @@ -125,7 +125,7 @@ virtual float GetParameter(int parameter) const; private: - boost::shared_ptr<AngularMotorInt> mAngularMotorImp; + static boost::shared_ptr<AngularMotorInt> mAngularMotorImp; }; DECLARE_CLASS(AngularMotor); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -27,6 +27,8 @@ using namespace boost; using namespace salt; +boost::shared_ptr<BallJointInt> BallJoint::mBallJointImp; + BallJoint::BallJoint() : Generic6DOFJoint() { mBallJointImp = ImpFactory::GetInstance()->GetBallJointImp(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h 2010-02-01 05:08:06 UTC (rev 155) @@ -56,7 +56,7 @@ virtual void OnLink(); private: - boost::shared_ptr<BallJointInt> mBallJointImp; + static boost::shared_ptr<BallJointInt> mBallJointImp; }; DECLARE_CLASS(BallJoint); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -25,6 +25,8 @@ using namespace oxygen; +boost::shared_ptr<BodyInt> Body::mBodyImp; + Body::Body() : PhysicsObject(), mBodyID(0), mMassTransformed(false), mMassTrans(0,0,0) { Modified: branches/multiphys/spark/lib/oxygen/physicsserver/body.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/body.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/body.h 2010-02-01 05:08:06 UTC (rev 155) @@ -46,7 +46,7 @@ salt::Vector3f mMassTrans; private: - boost::shared_ptr<BodyInt> mBodyImp; + static boost::shared_ptr<BodyInt> mBodyImp; }; DECLARE_CLASS(Body); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -27,6 +27,8 @@ using namespace oxygen; using namespace salt; +boost::shared_ptr<BoxColliderInt> BoxCollider::mBoxColliderImp; + BoxCollider::BoxCollider() : ConvexCollider() { mBoxColliderImp = ImpFactory::GetInstance()->GetBoxColliderImp(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -63,7 +63,7 @@ virtual bool ConstructInternal(); private: - boost::shared_ptr<BoxColliderInt> mBoxColliderImp; + static boost::shared_ptr<BoxColliderInt> mBoxColliderImp; }; DECLARE_CLASS(BoxCollider); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -26,6 +26,8 @@ using namespace oxygen; using namespace salt; +boost::shared_ptr<CapsuleColliderInt> CapsuleCollider::mCapsuleColliderImp; + CapsuleCollider::CapsuleCollider() : ConvexCollider() { mCapsuleColliderImp = ImpFactory::GetInstance()->GetCapsuleColliderImp(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -77,7 +77,7 @@ virtual bool ConstructInternal(); private: - boost::shared_ptr<CapsuleColliderInt> mCapsuleColliderImp; + static boost::shared_ptr<CapsuleColliderInt> mCapsuleColliderImp; }; DECLARE_CLASS(CapsuleCollider); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -36,6 +36,8 @@ using namespace boost; using namespace std; +boost::shared_ptr<ColliderInt> Collider::mColliderImp; + Collider::Collider() : PhysicsObject(), mGeomID(0) { mColliderImp = ImpFactory::GetInstance()->GetColliderImp(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -164,7 +164,7 @@ long mGeomID; private: - boost::shared_ptr<ColliderInt> mColliderImp; + static boost::shared_ptr<ColliderInt> mColliderImp; protected: /** a set that store the colliders that I never collide with Modified: branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -25,6 +25,8 @@ using namespace oxygen; +boost::shared_ptr<CompoundColliderInt> CompoundCollider::mCompoundColliderImp; + CompoundCollider::CompoundCollider() : Collider(){ mCompoundColliderImp = ImpFactory::GetInstance()->GetCompoundColliderImp(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -42,7 +42,7 @@ virtual ~CompoundCollider(); private: - boost::shared_ptr<CompoundColliderInt> mCompoundColliderImp; + static boost::shared_ptr<CompoundColliderInt> mCompoundColliderImp; }; DECLARE_CLASS(CompoundCollider); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -25,6 +25,8 @@ using namespace oxygen; +boost::shared_ptr<ConcaveColliderInt> ConcaveCollider::mConcaveColliderImp; + ConcaveCollider::ConcaveCollider() : Collider(){ mConcaveColliderImp = ImpFactory::GetInstance()->GetConcaveColliderImp(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -42,7 +42,7 @@ virtual ~ConcaveCollider(); private: - boost::shared_ptr<ConcaveColliderInt> mConcaveColliderImp; + static boost::shared_ptr<ConcaveColliderInt> mConcaveColliderImp; }; DECLARE_CLASS(ConcaveCollider); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -25,6 +25,8 @@ using namespace oxygen; +boost::shared_ptr<ConeColliderInt> ConeCollider::mConeColliderImp; + ConeCollider::ConeCollider() : ConvexCollider(){ mConeColliderImp = ImpFactory::GetInstance()->GetConeColliderImp(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -42,7 +42,7 @@ virtual ~ConeCollider(); private: - boost::shared_ptr<ConeColliderInt> mConeColliderImp; + static boost::shared_ptr<ConeColliderInt> mConeColliderImp; }; DECLARE_CLASS(ConeCollider); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -26,6 +26,8 @@ using namespace oxygen; +boost::shared_ptr<ConeTwistJointInt> ConeTwistJoint::mConeTwistJointImp; + ConeTwistJoint::ConeTwistJoint() : Generic6DOFJoint(){ mConeTwistJointImp = ImpFactory::GetInstance()->GetConeTwistJointImp(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.h 2010-02-01 05:08:06 UTC (rev 155) @@ -46,7 +46,7 @@ float GetParameter(int parameter) const; private: - boost::shared_ptr<ConeTwistJointInt> mConeTwistJointImp; + static boost::shared_ptr<ConeTwistJointInt> mConeTwistJointImp; }; DECLARE_CLASS(ConeTwistJoint); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -30,6 +30,8 @@ using namespace oxygen; using namespace boost; +boost::shared_ptr<ContactJointHandlerInt> ContactJointHandler::mContactJointHandlerImp; + ContactJointHandler::ContactJointHandler() : CollisionHandler() { mContactJointHandlerImp = ImpFactory::GetInstance()->GetContactJointHandlerImp(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h 2010-02-01 05:08:06 UTC (rev 155) @@ -138,7 +138,7 @@ float GetContactMu() const; protected: - boost::shared_ptr<ContactJointHandlerInt> mContactJointHandlerImp; + static boost::shared_ptr<ContactJointHandlerInt> mContactJointHandlerImp; GenericSurfaceParameter* mSurfaceParameter; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -25,6 +25,8 @@ using namespace oxygen; +boost::shared_ptr<ConvexColliderInt> ConvexCollider::mConvexColliderImp; + ConvexCollider::ConvexCollider() : Collider(){ mConvexColliderImp = ImpFactory::GetInstance()->GetConvexColliderImp(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -41,7 +41,7 @@ virtual ~ConvexCollider(); private: - boost::shared_ptr<ConvexColliderInt> mConvexColliderImp; + static boost::shared_ptr<ConvexColliderInt> mConvexColliderImp; }; DECLARE_ABSTRACTCLASS(ConvexCollider); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -25,6 +25,8 @@ using namespace oxygen; +boost::shared_ptr<CylinderColliderInt> CylinderCollider::mCylinderColliderImp; + CylinderCollider::CylinderCollider() : ConvexCollider(){ mCylinderColliderImp = ImpFactory::GetInstance()->GetCylinderColliderImp(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -43,7 +43,7 @@ virtual ~CylinderCollider(); private: - boost::shared_ptr<CylinderColliderInt> mCylinderColliderImp; + static boost::shared_ptr<CylinderColliderInt> mCylinderColliderImp; }; DECLARE_CLASS(CylinderCollider); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -25,6 +25,8 @@ using namespace oxygen; +boost::shared_ptr<DynamicBodyInt> DynamicBody::mDynamicBodyImp; + DynamicBody::DynamicBody() : Body(){ mDynamicBodyImp = ImpFactory::GetInstance()->GetDynamicBodyImp(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.h 2010-02-01 05:08:06 UTC (rev 155) @@ -41,7 +41,8 @@ DynamicBody(); virtual ~DynamicBody(); - boost::shared_ptr<DynamicBodyInt> mDynamicBodyImp; +private: + static boost::shared_ptr<DynamicBodyInt> mDynamicBodyImp; }; DECLARE_CLASS(DynamicBody); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -25,6 +25,8 @@ using namespace oxygen; +boost::shared_ptr<EmptyColliderInt> EmptyCollider::mEmptyColliderImp; + EmptyCollider::EmptyCollider() : Collider(){ mEmptyColliderImp = ImpFactory::GetInstance()->GetEmptyColliderImp(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -42,7 +42,7 @@ virtual ~EmptyCollider(); private: - boost::shared_ptr<EmptyColliderInt> mEmptyColliderImp; + static boost::shared_ptr<EmptyColliderInt> mEmptyColliderImp; }; DECLARE_CLASS(EmptyCollider); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -24,6 +24,8 @@ using namespace oxygen; +boost::shared_ptr<FixedJointInt> FixedJoint::mFixedJointImp; + FixedJoint::FixedJoint() : Generic6DOFJoint() { mFixedJointImp = ImpFactory::GetInstance()->GetFixedJointImp(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.h 2010-02-01 05:08:06 UTC (rev 155) @@ -54,7 +54,7 @@ virtual float GetParameter(int parameter) const; private: - boost::shared_ptr<FixedJointInt> mFixedJointImp; + static boost::shared_ptr<FixedJointInt> mFixedJointImp; }; DECLARE_CLASS(FixedJoint); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -26,6 +26,8 @@ using namespace oxygen; +boost::shared_ptr<Generic6DOFJointInt> Generic6DOFJoint::mGeneric6DOFJointImp; + Generic6DOFJoint::Generic6DOFJoint() : Joint(){ mGeneric6DOFJointImp = ImpFactory::GetInstance()->GetGeneric6DOFJointImp(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.h 2010-02-01 05:08:06 UTC (rev 155) @@ -42,7 +42,7 @@ virtual ~Generic6DOFJoint(); private: - boost::shared_ptr<Generic6DOFJointInt> mGeneric6DOFJointImp; + static boost::shared_ptr<Generic6DOFJointInt> mGeneric6DOFJointImp; }; DECLARE_ABSTRACTCLASS(Generic6DOFJoint); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -26,6 +26,8 @@ using namespace boost; using namespace salt; +boost::shared_ptr<Hinge2JointInt> Hinge2Joint::mHinge2JointImp; + Hinge2Joint::Hinge2Joint() : Generic6DOFJoint() { mHinge2JointImp = ImpFactory::GetInstance()->GetHinge2JointImp(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h 2010-02-01 05:08:06 UTC (rev 155) @@ -59,7 +59,7 @@ virtual void OnLink(); private: - boost::shared_ptr<Hinge2JointInt> mHinge2JointImp; + static boost::shared_ptr<Hinge2JointInt> mHinge2JointImp; }; DECLARE_CLASS(Hinge2Joint); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -27,6 +27,8 @@ using namespace boost; using namespace salt; +boost::shared_ptr<HingeJointInt> HingeJoint::mHingeJointImp; + HingeJoint::HingeJoint() : Generic6DOFJoint() { mHingeJointImp = ImpFactory::GetInstance()->GetHingeJointImp(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h 2010-02-01 05:08:06 UTC (rev 155) @@ -77,7 +77,7 @@ virtual void OnLink(); private: - boost::shared_ptr<HingeJointInt> mHingeJointImp; + static boost::shared_ptr<HingeJointInt> mHingeJointImp; }; DECLARE_CLASS(HingeJoint); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-02-01 05:08:06 UTC (rev 155) @@ -28,6 +28,7 @@ namespace oxygen { +class RigidBody; class OXYGEN_API RigidBodyInt { Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h 2010-02-01 05:08:06 UTC (rev 155) @@ -43,7 +43,7 @@ virtual long GetParentSpaceID(long spaceID) = 0; virtual void Collide(long space, Space* callee) = 0; virtual void Collide2(long obj1, long obj2, Space* callee) = 0; - virtual long ConstructInternal() = 0; + virtual long CreateContactGroup() = 0; virtual void PostPhysicsUpdateInternal(long contactGroup) = 0; virtual bool ObjectIsSpace(long objectID) = 0; virtual long FetchBody(long geomID) = 0; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -29,6 +29,8 @@ using namespace std; using namespace salt; +boost::shared_ptr<JointInt> Joint::mJointImp; + Joint::Joint() : PhysicsObject(), mJointID(0), mJointMaxSpeed1(0), mJointMaxSpeed2(0), Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2010-02-01 05:08:06 UTC (rev 155) @@ -296,7 +296,7 @@ float mJointMaxSpeed2; bool mIsLimitJointMaxSpeed2; - boost::shared_ptr<JointInt> mJointImp; + static boost::shared_ptr<JointInt> mJointImp; }; DECLARE_ABSTRACTCLASS(Joint); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -17,13 +17,13 @@ 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/odeangularmotor.h> using namespace oxygen; using namespace salt; -ODEAngularMotor::ODEAngularMotor() : ODEJoint(){ +ODEAngularMotor::ODEAngularMotor() : Joint(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.h 2010-02-01 05:08:06 UTC (rev 155) @@ -24,11 +24,11 @@ #define OXYGEN_ODEANGULARMOTOR_H #include <oxygen/physicsserver/int/angularmotorint.h> -#include <oxygen/physicsserver/ode/odejoint.h> +#include <oxygen/physicsserver/joint.h> namespace oxygen{ -class OXYGEN_API ODEAngularMotor : public AngularMotorInt, public ODEJoint{ +class OXYGEN_API ODEAngularMotor : public AngularMotorInt, public Joint{ public: ODEAngularMotor(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -17,6 +17,7 @@ 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/odeballjoint.h> #include <oxygen/physicsserver/balljoint.h> @@ -24,7 +25,7 @@ using namespace boost; using namespace salt; -ODEBallJoint::ODEBallJoint() : ODEGeneric6DOFJoint() +ODEBallJoint::ODEBallJoint() : Generic6DOFJoint() { } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h 2010-02-01 05:08:06 UTC (rev 155) @@ -24,13 +24,13 @@ #define OXYGEN_ODEBALLJOINT_H #include <oxygen/physicsserver/int/balljointint.h> -#include <oxygen/physicsserver/ode/odegeneric6dofjoint.h> +#include <oxygen/physicsserver/generic6dofjoint.h> #include <oxygen/oxygen_defines.h> namespace oxygen { -class OXYGEN_API ODEBallJoint : public BallJointInt, public ODEGeneric6DOFJoint +class OXYGEN_API ODEBallJoint : public BallJointInt, public Generic6DOFJoint { public: ODEBallJoint(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -19,10 +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/ode/odewrapper.h> #include <oxygen/physicsserver/ode/odebody.h> using namespace oxygen; -ODEBody::ODEBody() : ODEPhysicsObject(){ +ODEBody::ODEBody() : PhysicsObject(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h 2010-02-01 05:08:06 UTC (rev 155) @@ -23,12 +23,12 @@ #define OXYGEN_ODEBODY_H #include <oxygen/physicsserver/int/bodyint.h> -#include <oxygen/physicsserver/ode/odephysicsobject.h> +#include <oxygen/physicsserver/physicsobject.h> namespace oxygen { -class OXYGEN_API ODEBody : public BodyInt, public ODEPhysicsObject +class OXYGEN_API ODEBody : public BodyInt, public PhysicsObject { public: ODEBody(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -20,13 +20,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/ode/odeboxcollider.h> using namespace oxygen; using namespace salt; -ODEBoxCollider::ODEBoxCollider() : ODEConvexCollider() +ODEBoxCollider::ODEBoxCollider() : ConvexCollider() { } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -25,12 +25,12 @@ #include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/int/boxcolliderint.h> -#include <oxygen/physicsserver/ode/odeconvexcollider.h> +#include <oxygen/physicsserver/convexcollider.h> namespace oxygen { -class OXYGEN_API ODEBoxCollider : public BoxColliderInt, public ODEConvexCollider +class OXYGEN_API ODEBoxCollider : public BoxColliderInt, public ConvexCollider { public: ODEBoxCollider(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -19,12 +19,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/physicsserver/ode/odecapsulecollider.h> using namespace oxygen; using namespace salt; -ODECapsuleCollider::ODECapsuleCollider() : ODEConvexCollider() +ODECapsuleCollider::ODECapsuleCollider() : ConvexCollider() { } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -24,13 +24,13 @@ #define OXYGEN_ODECAPSULECOLLIDER_H #include <oxygen/physicsserver/int/capsulecolliderint.h> -#include <oxygen/physicsserver/ode/odeconvexcollider.h> +#include <oxygen/physicsserver/convexcollider.h> #include <oxygen/oxygen_defines.h> namespace oxygen { -class OXYGEN_API ODECapsuleCollider : public CapsuleColliderInt, public ODEConvexCollider +class OXYGEN_API ODECapsuleCollider : public CapsuleColliderInt, public ConvexCollider { public: ODECapsuleCollider(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -18,6 +18,7 @@ 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/collider.h> #include <oxygen/physicsserver/ode/odecollider.h> #include <oxygen/physicsserver/collisionhandler.h> @@ -35,7 +36,7 @@ using namespace boost; using namespace std; -ODECollider::ODECollider() : ODEPhysicsObject() +ODECollider::ODECollider() : PhysicsObject() { } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -23,14 +23,14 @@ #ifndef OXYGEN_ODECOLLIDER_H #define OXYGEN_ODECOLLIDER_H -#include <oxygen/physicsserver/ode/odephysicsobject.h> +#include <oxygen/physicsserver/physicsobject.h> #include <oxygen/physicsserver/int/colliderint.h> namespace oxygen { class Collider; -class OXYGEN_API ODECollider : public ColliderInt, public ODEPhysicsObject +class OXYGEN_API ODECollider : public ColliderInt, public PhysicsObject { public: Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecompoundcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecompoundcollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecompoundcollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -19,10 +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/ode/odewrapper.h> #include <oxygen/physicsserver/ode/odecompoundcollider.h> using namespace oxygen; -ODECompoundCollider::ODECompoundCollider() : ODECollider(){ +ODECompoundCollider::ODECompoundCollider() : Collider(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecompoundcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecompoundcollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecompoundcollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -22,13 +22,13 @@ #ifndef OXYGEN_ODECOMPOUNDCOLLIDER_H #define OXYGEN_ODECOMPOUNDCOLLIDER_H -#include <oxygen/physicsserver/ode/odecollider.h> +#include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/int/compoundcolliderint.h> namespace oxygen { -class OXYGEN_API ODECompoundCollider : public CompoundColliderInt, public ODECollider +class OXYGEN_API ODECompoundCollider : public CompoundColliderInt, public Collider { public: ODECompoundCollider(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconcavecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconcavecollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconcavecollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -19,10 +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/ode/odewrapper.h> #include <oxygen/physicsserver/ode/odeconcavecollider.h> using namespace oxygen; -ODEConcaveCollider::ODEConcaveCollider() : ODECollider(){ +ODEConcaveCollider::ODEConcaveCollider() : Collider(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconcavecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconcavecollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconcavecollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -22,13 +22,13 @@ #ifndef OXYGEN_ODECONCAVECOLLIDER_H #define OXYGEN_ODECONCAVECOLLIDER_H -#include <oxygen/physicsserver/ode/odecollider.h> +#include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/int/concavecolliderint.h> namespace oxygen { -class OXYGEN_API ODEConcaveCollider : public ConcaveColliderInt, public ODECollider +class OXYGEN_API ODEConcaveCollider : public ConcaveColliderInt, public Collider { public: ODEConcaveCollider(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -19,10 +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/ode/odewrapper.h> #include <oxygen/physicsserver/ode/odeconecollider.h> using namespace oxygen; -ODEConeCollider::ODEConeCollider() : ODEConvexCollider(){ +ODEConeCollider::ODEConeCollider() : ConvexCollider(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -22,13 +22,13 @@ #ifndef OXYGEN_ODECONECOLLIDER_H #define OXYGEN_ODECONECOLLIDER_H -#include <oxygen/physicsserver/ode/odeconvexcollider.h> +#include <oxygen/physicsserver/convexcollider.h> #include <oxygen/physicsserver/int/conecolliderint.h> namespace oxygen { -class OXYGEN_API ODEConeCollider : public ConeColliderInt, public ODEConvexCollider +class OXYGEN_API ODEConeCollider : public ConeColliderInt, public ConvexCollider { public: ODEConeCollider(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -19,10 +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/ode/odewrapper.h> #include <oxygen/physicsserver/ode/odeconetwistjoint.h> using namespace oxygen; -ODEConeTwistJoint::ODEConeTwistJoint() : ODEGeneric6DOFJoint(){ +ODEConeTwistJoint::ODEConeTwistJoint() : Generic6DOFJoint(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.h 2010-02-01 05:08:06 UTC (rev 155) @@ -22,13 +22,13 @@ #ifndef OXYGEN_ODECONETWISTJOINT_H #define OXYGEN_ODECONETWISTJOINT_H -#include <oxygen/physicsserver/ode/odegeneric6dofjoint.h> +#include <oxygen/physicsserver/generic6dofjoint.h> #include <oxygen/physicsserver/int/conetwistjointint.h> namespace oxygen { -class OXYGEN_API ODEConeTwistJoint : public ConeTwistJointInt, public ODEGeneric6DOFJoint +class OXYGEN_API ODEConeTwistJoint : public ConeTwistJointInt, public Generic6DOFJoint { public: Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -17,11 +17,12 @@ 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/odecontactjointhandler.h> using namespace oxygen; -ODEContactJointHandler::ODEContactJointHandler() : ODECollider(){ +ODEContactJointHandler::ODEContactJointHandler() : Collider(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h 2010-02-01 05:08:06 UTC (rev 155) @@ -23,12 +23,12 @@ #define OXYGEN_ODECONTACTJOINTHANDLER_H #include <oxygen/physicsserver/int/contactjointhandlerint.h> -#include <oxygen/physicsserver/ode/odecollider.h> +#include <oxygen/physicsserver/collider.h> namespace oxygen { -class OXYGEN_API ODEContactJointHandler : public ContactJointHandlerInt, public ODECollider +class OXYGEN_API ODEContactJointHandler : public ContactJointHandlerInt, public Collider { public: ODEContactJointHandler(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -19,10 +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/ode/odewrapper.h> #include <oxygen/physicsserver/ode/odeconvexcollider.h> using namespace oxygen; -ODEConvexCollider::ODEConvexCollider() : ODECollider(){ +ODEConvexCollider::ODEConvexCollider() : Collider(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -22,13 +22,13 @@ #ifndef OXYGEN_ODECONVEXCOLLIDER_H #define OXYGEN_ODECONVEXCOLLIDER_H -#include <oxygen/physicsserver/ode/odecollider.h> +#include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/int/convexcolliderint.h> namespace oxygen { -class OXYGEN_API ODEConvexCollider : public ConvexColliderInt, public ODECollider +class OXYGEN_API ODEConvexCollider : public ConvexColliderInt, public Collider { public: ODEConvexCollider(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -19,10 +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/ode/odewrapper.h> #include <oxygen/physicsserver/ode/odecylindercollider.h> using namespace oxygen; -ODECylinderCollider::ODECylinderCollider() : ODEConvexCollider(){ +ODECylinderCollider::ODECylinderCollider() : ConvexCollider(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -22,13 +22,13 @@ #ifndef OXYGEN_ODECYLINDERCOLLIDER_H #define OXYGEN_ODECYLINDERCOLLIDER_H -#include <oxygen/physicsserver/ode/odeconvexcollider.h> +#include <oxygen/physicsserver/convexcollider.h> #include <oxygen/physicsserver/int/cylindercolliderint.h> namespace oxygen { -class OXYGEN_API ODECylinderCollider : public CylinderColliderInt, public ODEConvexCollider +class OXYGEN_API ODECylinderCollider : public CylinderColliderInt, public ConvexCollider { public: ODECylinderCollider(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odedynamicbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odedynamicbody.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odedynamicbody.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -19,10 +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/ode/odewrapper.h> #include <oxygen/physicsserver/ode/odedynamicbody.h> using namespace oxygen; -ODEDynamicBody::ODEDynamicBody() : ODEBody(){ +ODEDynamicBody::ODEDynamicBody() : Body(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odedynamicbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odedynamicbody.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odedynamicbody.h 2010-02-01 05:08:06 UTC (rev 155) @@ -22,13 +22,13 @@ #ifndef OXYGEN_ODEDYNAMICBODY_H #define OXYGEN_ODEDYNAMICBODY_H -#include <oxygen/physicsserver/ode/odebody.h> +#include <oxygen/physicsserver/body.h> #include <oxygen/physicsserver/int/dynamicbodyint.h> namespace oxygen { -class OXYGEN_API ODEDynamicBody : public DynamicBodyInt, public ODEBody +class OXYGEN_API ODEDynamicBody : public DynamicBodyInt, public Body { public: ODEDynamicBody(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeemptycollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeemptycollider.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeemptycollider.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -19,10 +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/ode/odewrapper.h> #include <oxygen/physicsserver/ode/odeemptycollider.h> using namespace oxygen; -ODEEmptyCollider::ODEEmptyCollider() : ODECollider(){ +ODEEmptyCollider::ODEEmptyCollider() : Collider(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeemptycollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeemptycollider.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeemptycollider.h 2010-02-01 05:08:06 UTC (rev 155) @@ -22,13 +22,13 @@ #ifndef OXYGEN_ODEEMPTYCOLLIDER_H #define OXYGEN_ODEEMPTYCOLLIDER_H -#include <oxygen/physicsserver/ode/odecollider.h> +#include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/int/emptycolliderint.h> namespace oxygen { -class OXYGEN_API ODEEmptyCollider : public EmptyColliderInt, public ODECollider +class OXYGEN_API ODEEmptyCollider : public EmptyColliderInt, public Collider { public: ODEEmptyCollider(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp 2010-02-01 05:08:06 UTC (rev 155) @@ -17,13 +17,13 @@ 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/odefixedjoint.h> using namespace oxygen; using namespace boost; -ODEFixedJoint::ODEFixedJoint() : ODEGeneric6DOFJoint() +ODEFixedJoint::ODEFixedJoint() : Generic6DOFJoint() { } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h 2010-01-28 07:24:51 UTC (rev 154) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefi... [truncated message content] |
From: <a-...@us...> - 2010-01-28 07:24:57
|
Revision: 154 http://simspark.svn.sourceforge.net/simspark/?rev=154&view=rev Author: a-held Date: 2010-01-28 07:24:51 +0000 (Thu, 28 Jan 2010) Log Message: ----------- move staticphysicsmethods_ode.cpp in physicsserver/ode folder Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt Added Paths: ----------- branches/multiphys/spark/lib/oxygen/physicsserver/ode/staticphysicsmethods_ode.cpp Removed Paths: ------------- branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods_ode.cpp Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-01-28 07:17:35 UTC (rev 153) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-01-28 07:24:51 UTC (rev 154) @@ -93,7 +93,7 @@ physicsserver/int/worldint.h #ode-specific files - physicsserver/staticphysicsmethods_ode.cpp + physicsserver/ode/staticphysicsmethods_ode.cpp physicsserver/ode/odeangularmotor.h physicsserver/ode/odeballjoint.h physicsserver/ode/odebody.h Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/staticphysicsmethods_ode.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/staticphysicsmethods_ode.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/staticphysicsmethods_ode.cpp 2010-01-28 07:24:51 UTC (rev 154) @@ -0,0 +1,56 @@ +/* -*- 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: body.cpp 106 2009-11-19 10:10:50Z 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. +*/ + +#include <oxygen/physicsserver/staticphysicsmethods.h> +#include <oxygen/physicsserver/collider.h> +#include <oxygen/physicsserver/joint.h> +#include <oxygen/physicsserver/rigidbody.h> +#include <oxygen/physicsserver/space.h> +#include <oxygen/physicsserver/ode/odewrapper.h> + +using namespace oxygen; +using namespace boost; + +Collider* StaticPhysicsMethods::GetColliderPointer(long geomID){ + dGeomID ODEGeom = (dGeomID) geomID; + return static_cast<Collider*>(dGeomGetData(ODEGeom)); +} + +Joint* StaticPhysicsMethods::GetJoint(long jointID){ + dJointID ODEJoint = (dJointID) jointID; + return static_cast<Joint*>(dJointGetData(ODEJoint)); +} + +RigidBody* StaticPhysicsMethods::GetBodyPointer(long bodyID){ + dBodyID ODEBody = (dBodyID) bodyID; + return static_cast<RigidBody*>(dBodyGetData(ODEBody)); +} + +bool StaticPhysicsMethods::AreConnected(long bodyID1, long bodyID2){ + dBodyID ODEBody1 = (dBodyID) bodyID1; + dBodyID ODEBody2 = (dBodyID) bodyID2; + return dAreConnected(ODEBody1, ODEBody2) == 1; +} + +bool StaticPhysicsMethods::AreConnectedExcluding(long bodyID1, long bodyID2, int joint_type){ + dBodyID ODEBody1 = (dBodyID) bodyID1; + dBodyID ODEBody2 = (dBodyID) bodyID2; + return dAreConnectedExcluding(ODEBody1, ODEBody2, joint_type) == 1; +} Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods_ode.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods_ode.cpp 2010-01-28 07:17:35 UTC (rev 153) +++ branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods_ode.cpp 2010-01-28 07:24:51 UTC (rev 154) @@ -1,56 +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: body.cpp 106 2009-11-19 10:10:50Z 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. -*/ - -#include <oxygen/physicsserver/staticphysicsmethods.h> -#include <oxygen/physicsserver/collider.h> -#include <oxygen/physicsserver/joint.h> -#include <oxygen/physicsserver/rigidbody.h> -#include <oxygen/physicsserver/space.h> -#include <oxygen/physicsserver/ode/odewrapper.h> - -using namespace oxygen; -using namespace boost; - -Collider* StaticPhysicsMethods::GetColliderPointer(long geomID){ - dGeomID ODEGeom = (dGeomID) geomID; - return static_cast<Collider*>(dGeomGetData(ODEGeom)); -} - -Joint* StaticPhysicsMethods::GetJoint(long jointID){ - dJointID ODEJoint = (dJointID) jointID; - return static_cast<Joint*>(dJointGetData(ODEJoint)); -} - -RigidBody* StaticPhysicsMethods::GetBodyPointer(long bodyID){ - dBodyID ODEBody = (dBodyID) bodyID; - return static_cast<RigidBody*>(dBodyGetData(ODEBody)); -} - -bool StaticPhysicsMethods::AreConnected(long bodyID1, long bodyID2){ - dBodyID ODEBody1 = (dBodyID) bodyID1; - dBodyID ODEBody2 = (dBodyID) bodyID2; - return dAreConnected(ODEBody1, ODEBody2) == 1; -} - -bool StaticPhysicsMethods::AreConnectedExcluding(long bodyID1, long bodyID2, int joint_type){ - dBodyID ODEBody1 = (dBodyID) bodyID1; - dBodyID ODEBody2 = (dBodyID) bodyID2; - return dAreConnectedExcluding(ODEBody1, ODEBody2, joint_type) == 1; -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-01-28 07:17:46
|
Revision: 153 http://simspark.svn.sourceforge.net/simspark/?rev=153&view=rev Author: a-held Date: 2010-01-28 07:17:35 +0000 (Thu, 28 Jan 2010) Log Message: ----------- Add the implementation factory files (forgot to tell svn to add them) Added Paths: ----------- branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.cpp branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.h branches/multiphys/spark/lib/oxygen/physicsserver/int/impfactoryint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeimpfactory.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeimpfactory.h Added: branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.cpp 2010-01-28 07:17:35 UTC (rev 153) @@ -0,0 +1,274 @@ +/* -*- 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: hingejoint.h 138 2010-01-08 07:35:25Z 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. +*/ + +#include <oxygen/physicsserver/impfactory.h> +#include <oxygen/physicsserver/int/impfactoryint.h> +#include <oxygen/physicsserver/ode/odeimpfactory.h> + +#include <oxygen/physicsserver/int/angularmotorint.h> +#include <oxygen/physicsserver/int/balljointint.h> +#include <oxygen/physicsserver/int/bodyint.h> +#include <oxygen/physicsserver/int/boxcolliderint.h> +#include <oxygen/physicsserver/int/capsulecolliderint.h> +#include <oxygen/physicsserver/int/colliderint.h> +#include <oxygen/physicsserver/int/compoundcolliderint.h> +#include <oxygen/physicsserver/int/concavecolliderint.h> +#include <oxygen/physicsserver/int/conecolliderint.h> +#include <oxygen/physicsserver/int/conetwistjointint.h> +#include <oxygen/physicsserver/int/contactjointhandlerint.h> +#include <oxygen/physicsserver/int/convexcolliderint.h> +#include <oxygen/physicsserver/int/cylindercolliderint.h> +#include <oxygen/physicsserver/int/dynamicbodyint.h> +#include <oxygen/physicsserver/int/emptycolliderint.h> +#include <oxygen/physicsserver/int/fixedjointint.h> +#include <oxygen/physicsserver/int/generic6dofjointint.h> +#include <oxygen/physicsserver/int/hinge2jointint.h> +#include <oxygen/physicsserver/int/hingejointint.h> +#include <oxygen/physicsserver/int/jointint.h> +#include <oxygen/physicsserver/int/physicsobjectint.h> +#include <oxygen/physicsserver/int/physicsserverint.h> +#include <oxygen/physicsserver/int/planecolliderint.h> +#include <oxygen/physicsserver/int/raycolliderint.h> +#include <oxygen/physicsserver/int/rigidbodyint.h> +#include <oxygen/physicsserver/int/sliderjointint.h> +#include <oxygen/physicsserver/int/softbodyint.h> +#include <oxygen/physicsserver/int/spaceint.h> +#include <oxygen/physicsserver/int/spherecolliderint.h> +#include <oxygen/physicsserver/int/staticbodyint.h> +#include <oxygen/physicsserver/int/transformcolliderint.h> +#include <oxygen/physicsserver/int/universaljointint.h> +#include <oxygen/physicsserver/int/worldint.h> + +using namespace oxygen; +using namespace boost; + +boost::shared_ptr<ImpFactory> ImpFactory::mInstance; + +ImpFactory::ImpFactory(){ + mImpFactoryImp = boost::shared_ptr<ODEImpFactory>(new ODEImpFactory()); +} + +ImpFactory::~ImpFactory(){ + +} + +shared_ptr<ImpFactory> ImpFactory::GetInstance(){ + if (mInstance.get() == 0) + mInstance = shared_ptr<ImpFactory>(new ImpFactory()); + return mInstance; +} + +shared_ptr<AngularMotorInt> ImpFactory::GetAngularMotorImp(){ + if (mAngularMotorImp.get() == 0) + mAngularMotorImp = mImpFactoryImp->CreateAngularMotorImp(); + return mAngularMotorImp; +} + +shared_ptr<BallJointInt> ImpFactory::GetBallJointImp(){ + if (mBallJointImp.get() == 0) + mBallJointImp = mImpFactoryImp->CreateBallJointImp(); + return mBallJointImp; +} + +shared_ptr<BodyInt> ImpFactory::GetBodyImp(){ + if (mBodyImp.get() == 0) + mBodyImp = mImpFactoryImp->CreateBodyImp(); + return mBodyImp; +} + +shared_ptr<BoxColliderInt> ImpFactory::GetBoxColliderImp(){ + if (mBoxColliderImp.get() == 0) + mBoxColliderImp = mImpFactoryImp->CreateBoxColliderImp(); + return mBoxColliderImp; +} + +shared_ptr<CapsuleColliderInt> ImpFactory::GetCapsuleColliderImp(){ + if (mCapsuleColliderImp.get() == 0) + mCapsuleColliderImp = mImpFactoryImp->CreateCapsuleColliderImp(); + return mCapsuleColliderImp; +} + +shared_ptr<ColliderInt> ImpFactory::GetColliderImp(){ + if (mColliderImp.get() == 0) + mColliderImp = mImpFactoryImp->CreateColliderImp(); + return mColliderImp; +} + +shared_ptr<CompoundColliderInt> ImpFactory::GetCompoundColliderImp(){ + if (mCompoundColliderImp.get() == 0) + mCompoundColliderImp = mImpFactoryImp->CreateCompoundColliderImp(); + return mCompoundColliderImp; +} + +shared_ptr<ConcaveColliderInt> ImpFactory::GetConcaveColliderImp(){ + if (mConcaveColliderImp.get() == 0) + mConcaveColliderImp = mImpFactoryImp->CreateConcaveColliderImp(); + return mConcaveColliderImp; +} + +shared_ptr<ConeColliderInt> ImpFactory::GetConeColliderImp(){ + if (mConeColliderImp.get() == 0) + mConeColliderImp = mImpFactoryImp->CreateConeColliderImp(); + return mConeColliderImp; +} + +shared_ptr<ConeTwistJointInt> ImpFactory::GetConeTwistJointImp(){ + if (mConeTwistJointImp.get() == 0) + mConeTwistJointImp = mImpFactoryImp->CreateConeTwistJointImp(); + return mConeTwistJointImp; +} + +shared_ptr<ContactJointHandlerInt> ImpFactory::GetContactJointHandlerImp(){ + if (mContactJointHandlerImp.get() == 0) + mContactJointHandlerImp = mImpFactoryImp->CreateContactJointHandlerImp(); + return mContactJointHandlerImp; +} + +shared_ptr<ConvexColliderInt> ImpFactory::GetConvexColliderImp(){ + if (mConvexColliderImp.get() == 0) + mConvexColliderImp = mImpFactoryImp->CreateConvexColliderImp(); + return mConvexColliderImp; +} + +shared_ptr<CylinderColliderInt> ImpFactory::GetCylinderColliderImp(){ + if (mCylinderColliderImp.get() == 0) + mCylinderColliderImp = mImpFactoryImp->CreateCylinderColliderImp(); + return mCylinderColliderImp; +} + +shared_ptr<DynamicBodyInt> ImpFactory::GetDynamicBodyImp(){ + if (mDynamicBodyImp.get() == 0) + mDynamicBodyImp = mImpFactoryImp->CreateDynamicBodyImp(); + return mDynamicBodyImp; +} + +shared_ptr<EmptyColliderInt> ImpFactory::GetEmptyColliderImp(){ + if (mEmptyColliderImp.get() == 0) + mEmptyColliderImp = mImpFactoryImp->CreateEmptyColliderImp(); + return mEmptyColliderImp; +} + +shared_ptr<FixedJointInt> ImpFactory::GetFixedJointImp(){ + if (mFixedJointImp.get() == 0) + mFixedJointImp = mImpFactoryImp->CreateFixedJointImp(); + return mFixedJointImp; +} + +shared_ptr<Generic6DOFJointInt> ImpFactory::GetGeneric6DOFJointImp(){ + if (mGeneric6DOFJointImp.get() == 0) + mGeneric6DOFJointImp = mImpFactoryImp->CreateGeneric6DOFJointImp(); + return mGeneric6DOFJointImp; +} + +shared_ptr<Hinge2JointInt> ImpFactory::GetHinge2JointImp(){ + if (mHinge2JointImp.get() == 0) + mHinge2JointImp = mImpFactoryImp->CreateHinge2JointImp(); + return mHinge2JointImp; +} + +shared_ptr<HingeJointInt> ImpFactory::GetHingeJointImp(){ + if (mHingeJointImp.get() == 0) + mHingeJointImp = mImpFactoryImp->CreateHingeJointImp(); + return mHingeJointImp; +} + +shared_ptr<JointInt> ImpFactory::GetJointImp(){ + if (mJointImp.get() == 0) + mJointImp = mImpFactoryImp->CreateJointImp(); + return mJointImp; +} + +shared_ptr<PhysicsObjectInt> ImpFactory::GetPhysicsObjectImp(){ + if (mPhysicsObjectImp.get() == 0) + mPhysicsObjectImp = mImpFactoryImp->CreatePhysicsObjectImp(); + return mPhysicsObjectImp; +} + +shared_ptr<PhysicsServerInt> ImpFactory::GetPhysicsServerImp(){ + if (mPhysicsServerImp.get() == 0) + mPhysicsServerImp = mImpFactoryImp->CreatePhysicsServerImp(); + return mPhysicsServerImp; +} + +shared_ptr<PlaneColliderInt> ImpFactory::GetPlaneColliderImp(){ + if (mPlaneColliderImp.get() == 0) + mPlaneColliderImp = mImpFactoryImp->CreatePlaneColliderImp(); + return mPlaneColliderImp; +} + +shared_ptr<RayColliderInt> ImpFactory::GetRayColliderImp(){ + if (mRayColliderImp.get() == 0) + mRayColliderImp = mImpFactoryImp->CreateRayColliderImp(); + return mRayColliderImp; +} + +shared_ptr<RigidBodyInt> ImpFactory::GetRigidBodyImp(){ + if (mRigidBodyImp.get() == 0) + mRigidBodyImp = mImpFactoryImp->CreateRigidBodyImp(); + return mRigidBodyImp; +} + +shared_ptr<SliderJointInt> ImpFactory::GetSliderJointImp(){ + if (mSliderJointImp.get() == 0) + mSliderJointImp = mImpFactoryImp->CreateSliderJointImp(); + return mSliderJointImp; +} + +shared_ptr<SoftBodyInt> ImpFactory::GetSoftBodyImp(){ + if (mSoftBodyImp.get() == 0) + mSoftBodyImp = mImpFactoryImp->CreateSoftBodyImp(); + return mSoftBodyImp; +} + +shared_ptr<SpaceInt> ImpFactory::GetSpaceImp(){ + if (mSpaceImp.get() == 0) + mSpaceImp = mImpFactoryImp->CreateSpaceImp(); + return mSpaceImp; +} + +shared_ptr<SphereColliderInt> ImpFactory::GetSphereColliderImp(){ + if (mSphereColliderImp.get() == 0) + mSphereColliderImp = mImpFactoryImp->CreateSphereColliderImp(); + return mSphereColliderImp; +} + +shared_ptr<StaticBodyInt> ImpFactory::GetStaticBodyImp(){ + if (mStaticBodyImp.get() == 0) + mStaticBodyImp = mImpFactoryImp->CreateStaticBodyImp(); + return mStaticBodyImp; +} + +shared_ptr<TransformColliderInt> ImpFactory::GetTransformColliderImp(){ + if (mTransformColliderImp.get() == 0) + mTransformColliderImp = mImpFactoryImp->CreateTransformColliderImp(); + return mTransformColliderImp; +} + +shared_ptr<UniversalJointInt> ImpFactory::GetUniversalJointImp(){ + if (mUniversalJointImp.get() == 0) + mUniversalJointImp = mImpFactoryImp->CreateUniversalJointImp(); + return mUniversalJointImp; +} + +shared_ptr<WorldInt> ImpFactory::GetWorldImp(){ + if (mWorldImp.get() == 0) + mWorldImp = mImpFactoryImp->CreateWorldImp(); + return mWorldImp; +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/impfactory.h 2010-01-28 07:17:35 UTC (rev 153) @@ -0,0 +1,146 @@ +/* -*- 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: hingejoint.h 138 2010-01-08 07:35:25Z 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_IMPFACTORY_H +#define OXYGEN_IMPFACTORY_H + +#include <oxygen/oxygen_defines.h> +#include <boost/shared_ptr.hpp> + +namespace oxygen{ + +class ImpFactoryInt; +class AngularMotorInt; +class BallJointInt; +class BodyInt; +class BoxColliderInt; +class CapsuleColliderInt; +class ColliderInt; +class CompoundColliderInt; +class ConcaveColliderInt; +class ConeColliderInt; +class ConeTwistJointInt; +class ContactJointHandlerInt; +class ConvexColliderInt; +class CylinderColliderInt; +class DynamicBodyInt; +class EmptyColliderInt; +class FixedJointInt; +class Generic6DOFJointInt; +class Hinge2JointInt; +class HingeJointInt; +class JointInt; +class PhysicsObjectInt; +class PhysicsServerInt; +class PlaneColliderInt; +class RayColliderInt; +class RigidBodyInt; +class SliderJointInt; +class SoftBodyInt; +class SpaceInt; +class SphereColliderInt; +class StaticBodyInt; +class TransformColliderInt; +class UniversalJointInt; +class WorldInt; + +class OXYGEN_API ImpFactory{ + +public: + ImpFactory(); + virtual ~ImpFactory(); + + static boost::shared_ptr<ImpFactory> GetInstance(); + boost::shared_ptr<AngularMotorInt> GetAngularMotorImp(); + boost::shared_ptr<BallJointInt> GetBallJointImp(); + boost::shared_ptr<BodyInt> GetBodyImp(); + boost::shared_ptr<BoxColliderInt> GetBoxColliderImp(); + boost::shared_ptr<CapsuleColliderInt> GetCapsuleColliderImp(); + boost::shared_ptr<ColliderInt> GetColliderImp(); + boost::shared_ptr<CompoundColliderInt> GetCompoundColliderImp(); + boost::shared_ptr<ConcaveColliderInt> GetConcaveColliderImp(); + boost::shared_ptr<ConeColliderInt> GetConeColliderImp(); + boost::shared_ptr<ConeTwistJointInt> GetConeTwistJointImp(); + boost::shared_ptr<ContactJointHandlerInt> GetContactJointHandlerImp(); + boost::shared_ptr<ConvexColliderInt> GetConvexColliderImp(); + boost::shared_ptr<CylinderColliderInt> GetCylinderColliderImp(); + boost::shared_ptr<DynamicBodyInt> GetDynamicBodyImp(); + boost::shared_ptr<EmptyColliderInt> GetEmptyColliderImp(); + boost::shared_ptr<FixedJointInt> GetFixedJointImp(); + boost::shared_ptr<Generic6DOFJointInt> GetGeneric6DOFJointImp(); + boost::shared_ptr<Hinge2JointInt> GetHinge2JointImp(); + boost::shared_ptr<HingeJointInt> GetHingeJointImp(); + boost::shared_ptr<JointInt> GetJointImp(); + boost::shared_ptr<PhysicsObjectInt> GetPhysicsObjectImp(); + boost::shared_ptr<PhysicsServerInt> GetPhysicsServerImp(); + boost::shared_ptr<PlaneColliderInt> GetPlaneColliderImp(); + boost::shared_ptr<RayColliderInt> GetRayColliderImp(); + boost::shared_ptr<RigidBodyInt> GetRigidBodyImp(); + boost::shared_ptr<SliderJointInt> GetSliderJointImp(); + boost::shared_ptr<SoftBodyInt> GetSoftBodyImp(); + boost::shared_ptr<SpaceInt> GetSpaceImp(); + boost::shared_ptr<SphereColliderInt> GetSphereColliderImp(); + boost::shared_ptr<StaticBodyInt> GetStaticBodyImp(); + boost::shared_ptr<TransformColliderInt> GetTransformColliderImp(); + boost::shared_ptr<UniversalJointInt> GetUniversalJointImp(); + boost::shared_ptr<WorldInt> GetWorldImp(); + +protected: + boost::shared_ptr<ImpFactoryInt> mImpFactoryImp; + +private: + static boost::shared_ptr<ImpFactory> mInstance; + boost::shared_ptr<AngularMotorInt> mAngularMotorImp; + boost::shared_ptr<BallJointInt> mBallJointImp; + boost::shared_ptr<BodyInt> mBodyImp; + boost::shared_ptr<BoxColliderInt> mBoxColliderImp; + boost::shared_ptr<CapsuleColliderInt> mCapsuleColliderImp; + boost::shared_ptr<ColliderInt> mColliderImp; + boost::shared_ptr<CompoundColliderInt> mCompoundColliderImp; + boost::shared_ptr<ConcaveColliderInt> mConcaveColliderImp; + boost::shared_ptr<ConeColliderInt> mConeColliderImp; + boost::shared_ptr<ConeTwistJointInt> mConeTwistJointImp; + boost::shared_ptr<ContactJointHandlerInt> mContactJointHandlerImp; + boost::shared_ptr<ConvexColliderInt> mConvexColliderImp; + boost::shared_ptr<CylinderColliderInt> mCylinderColliderImp; + boost::shared_ptr<DynamicBodyInt> mDynamicBodyImp; + boost::shared_ptr<EmptyColliderInt> mEmptyColliderImp; + boost::shared_ptr<FixedJointInt> mFixedJointImp; + boost::shared_ptr<Generic6DOFJointInt> mGeneric6DOFJointImp; + boost::shared_ptr<Hinge2JointInt> mHinge2JointImp; + boost::shared_ptr<HingeJointInt> mHingeJointImp; + boost::shared_ptr<JointInt> mJointImp; + boost::shared_ptr<PhysicsObjectInt> mPhysicsObjectImp; + boost::shared_ptr<PhysicsServerInt> mPhysicsServerImp; + boost::shared_ptr<PlaneColliderInt> mPlaneColliderImp; + boost::shared_ptr<RayColliderInt> mRayColliderImp; + boost::shared_ptr<RigidBodyInt> mRigidBodyImp; + boost::shared_ptr<SliderJointInt> mSliderJointImp; + boost::shared_ptr<SoftBodyInt> mSoftBodyImp; + boost::shared_ptr<SpaceInt> mSpaceImp; + boost::shared_ptr<SphereColliderInt> mSphereColliderImp; + boost::shared_ptr<StaticBodyInt> mStaticBodyImp; + boost::shared_ptr<TransformColliderInt> mTransformColliderImp; + boost::shared_ptr<UniversalJointInt> mUniversalJointImp; + boost::shared_ptr<WorldInt> mWorldImp; +}; + +} //namespace oxygen + +#endif //OXYGEN_IMPFACTORY_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/impfactoryint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/impfactoryint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/impfactoryint.h 2010-01-28 07:17:35 UTC (rev 153) @@ -0,0 +1,102 @@ +/* -*- 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: hingejoint.h 138 2010-01-08 07:35:25Z 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_IMPFACTORYINT_H +#define OXYGEN_IMPFACTORYINT_H + +#include <oxygen/oxygen_defines.h> +#include <boost/shared_ptr.hpp> + +namespace oxygen{ + +class AngularMotorInt; +class BallJointInt; +class BodyInt; +class BoxColliderInt; +class CapsuleColliderInt; +class ColliderInt; +class CompoundColliderInt; +class ConcaveColliderInt; +class ConeColliderInt; +class ConeTwistJointInt; +class ContactJointHandlerInt; +class ConvexColliderInt; +class CylinderColliderInt; +class DynamicBodyInt; +class EmptyColliderInt; +class FixedJointInt; +class Generic6DOFJointInt; +class Hinge2JointInt; +class HingeJointInt; +class JointInt; +class PhysicsObjectInt; +class PhysicsServerInt; +class PlaneColliderInt; +class RayColliderInt; +class RigidBodyInt; +class SliderJointInt; +class SoftBodyInt; +class SpaceInt; +class SphereColliderInt; +class StaticBodyInt; +class TransformColliderInt; +class UniversalJointInt; +class WorldInt; + +class OXYGEN_API ImpFactoryInt{ + +public: + virtual boost::shared_ptr<AngularMotorInt> CreateAngularMotorImp() = 0; + virtual boost::shared_ptr<BallJointInt> CreateBallJointImp() = 0; + virtual boost::shared_ptr<BodyInt> CreateBodyImp() = 0; + virtual boost::shared_ptr<BoxColliderInt> CreateBoxColliderImp() = 0; + virtual boost::shared_ptr<CapsuleColliderInt> CreateCapsuleColliderImp() = 0; + virtual boost::shared_ptr<ColliderInt> CreateColliderImp() = 0; + virtual boost::shared_ptr<CompoundColliderInt> CreateCompoundColliderImp() = 0; + virtual boost::shared_ptr<ConcaveColliderInt> CreateConcaveColliderImp() = 0; + virtual boost::shared_ptr<ConeColliderInt> CreateConeColliderImp() = 0; + virtual boost::shared_ptr<ConeTwistJointInt> CreateConeTwistJointImp() = 0; + virtual boost::shared_ptr<ContactJointHandlerInt> CreateContactJointHandlerImp() = 0; + virtual boost::shared_ptr<ConvexColliderInt> CreateConvexColliderImp() = 0; + virtual boost::shared_ptr<CylinderColliderInt> CreateCylinderColliderImp() = 0; + virtual boost::shared_ptr<DynamicBodyInt> CreateDynamicBodyImp() = 0; + virtual boost::shared_ptr<EmptyColliderInt> CreateEmptyColliderImp() = 0; + virtual boost::shared_ptr<FixedJointInt> CreateFixedJointImp() = 0; + virtual boost::shared_ptr<Generic6DOFJointInt> CreateGeneric6DOFJointImp() = 0; + virtual boost::shared_ptr<Hinge2JointInt> CreateHinge2JointImp() = 0; + virtual boost::shared_ptr<HingeJointInt> CreateHingeJointImp() = 0; + virtual boost::shared_ptr<JointInt> CreateJointImp() = 0; + virtual boost::shared_ptr<PhysicsObjectInt> CreatePhysicsObjectImp() = 0; + virtual boost::shared_ptr<PhysicsServerInt> CreatePhysicsServerImp() = 0; + virtual boost::shared_ptr<PlaneColliderInt> CreatePlaneColliderImp() = 0; + virtual boost::shared_ptr<RayColliderInt> CreateRayColliderImp() = 0; + virtual boost::shared_ptr<RigidBodyInt> CreateRigidBodyImp() = 0; + virtual boost::shared_ptr<SliderJointInt> CreateSliderJointImp() = 0; + virtual boost::shared_ptr<SoftBodyInt> CreateSoftBodyImp() = 0; + virtual boost::shared_ptr<SpaceInt> CreateSpaceImp() = 0; + virtual boost::shared_ptr<SphereColliderInt> CreateSphereColliderImp() = 0; + virtual boost::shared_ptr<StaticBodyInt> CreateStaticBodyImp() = 0; + virtual boost::shared_ptr<TransformColliderInt> CreateTransformColliderImp() = 0; + virtual boost::shared_ptr<UniversalJointInt> CreateUniversalJointImp() = 0; + virtual boost::shared_ptr<WorldInt> CreateWorldImp() = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_IMPFACTORYINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeimpfactory.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeimpfactory.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeimpfactory.cpp 2010-01-28 07:17:35 UTC (rev 153) @@ -0,0 +1,224 @@ +/* -*- 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: hingejoint.h 138 2010-01-08 07:35:25Z 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. +*/ + +#include <oxygen/physicsserver/ode/odeimpfactory.h> + +#include <oxygen/physicsserver/int/angularmotorint.h> +#include <oxygen/physicsserver/int/balljointint.h> +#include <oxygen/physicsserver/int/bodyint.h> +#include <oxygen/physicsserver/int/boxcolliderint.h> +#include <oxygen/physicsserver/int/capsulecolliderint.h> +#include <oxygen/physicsserver/int/colliderint.h> +#include <oxygen/physicsserver/int/compoundcolliderint.h> +#include <oxygen/physicsserver/int/concavecolliderint.h> +#include <oxygen/physicsserver/int/conecolliderint.h> +#include <oxygen/physicsserver/int/conetwistjointint.h> +#include <oxygen/physicsserver/int/contactjointhandlerint.h> +#include <oxygen/physicsserver/int/convexcolliderint.h> +#include <oxygen/physicsserver/int/cylindercolliderint.h> +#include <oxygen/physicsserver/int/dynamicbodyint.h> +#include <oxygen/physicsserver/int/emptycolliderint.h> +#include <oxygen/physicsserver/int/fixedjointint.h> +#include <oxygen/physicsserver/int/generic6dofjointint.h> +#include <oxygen/physicsserver/int/hinge2jointint.h> +#include <oxygen/physicsserver/int/hingejointint.h> +#include <oxygen/physicsserver/int/jointint.h> +#include <oxygen/physicsserver/int/physicsobjectint.h> +#include <oxygen/physicsserver/int/physicsserverint.h> +#include <oxygen/physicsserver/int/planecolliderint.h> +#include <oxygen/physicsserver/int/raycolliderint.h> +#include <oxygen/physicsserver/int/rigidbodyint.h> +#include <oxygen/physicsserver/int/sliderjointint.h> +#include <oxygen/physicsserver/int/softbodyint.h> +#include <oxygen/physicsserver/int/spaceint.h> +#include <oxygen/physicsserver/int/spherecolliderint.h> +#include <oxygen/physicsserver/int/staticbodyint.h> +#include <oxygen/physicsserver/int/transformcolliderint.h> +#include <oxygen/physicsserver/int/universaljointint.h> +#include <oxygen/physicsserver/int/worldint.h> + +#include <oxygen/physicsserver/ode/odeangularmotor.h> +#include <oxygen/physicsserver/ode/odeballjoint.h> +#include <oxygen/physicsserver/ode/odebody.h> +#include <oxygen/physicsserver/ode/odeboxcollider.h> +#include <oxygen/physicsserver/ode/odecapsulecollider.h> +#include <oxygen/physicsserver/ode/odecollider.h> +#include <oxygen/physicsserver/ode/odecompoundcollider.h> +#include <oxygen/physicsserver/ode/odeconcavecollider.h> +#include <oxygen/physicsserver/ode/odeconecollider.h> +#include <oxygen/physicsserver/ode/odeconetwistjoint.h> +#include <oxygen/physicsserver/ode/odecontactjointhandler.h> +#include <oxygen/physicsserver/ode/odeconvexcollider.h> +#include <oxygen/physicsserver/ode/odecylindercollider.h> +#include <oxygen/physicsserver/ode/odedynamicbody.h> +#include <oxygen/physicsserver/ode/odeemptycollider.h> +#include <oxygen/physicsserver/ode/odefixedjoint.h> +#include <oxygen/physicsserver/ode/odegeneric6dofjoint.h> +#include <oxygen/physicsserver/ode/odehinge2joint.h> +#include <oxygen/physicsserver/ode/odehingejoint.h> +#include <oxygen/physicsserver/ode/odejoint.h> +#include <oxygen/physicsserver/ode/odephysicsobject.h> +#include <oxygen/physicsserver/ode/odephysicsserver.h> +#include <oxygen/physicsserver/ode/odeplanecollider.h> +#include <oxygen/physicsserver/ode/oderaycollider.h> +#include <oxygen/physicsserver/ode/oderigidbody.h> +#include <oxygen/physicsserver/ode/odesliderjoint.h> +#include <oxygen/physicsserver/ode/odesoftbody.h> +#include <oxygen/physicsserver/ode/odespace.h> +#include <oxygen/physicsserver/ode/odespherecollider.h> +#include <oxygen/physicsserver/ode/odestaticbody.h> +#include <oxygen/physicsserver/ode/odetransformcollider.h> +#include <oxygen/physicsserver/ode/odeuniversaljoint.h> +#include <oxygen/physicsserver/ode/odeworld.h> + +using namespace oxygen; +using namespace boost; + +shared_ptr<AngularMotorInt> ODEImpFactory::CreateAngularMotorImp(){ + return shared_ptr<AngularMotorInt>(new ODEAngularMotor()); +} + +shared_ptr<BallJointInt> ODEImpFactory::CreateBallJointImp(){ + return shared_ptr<BallJointInt>(new ODEBallJoint()); +} + +shared_ptr<BodyInt> ODEImpFactory::CreateBodyImp(){ + return shared_ptr<BodyInt>(new ODEBody()); +} + +shared_ptr<BoxColliderInt> ODEImpFactory::CreateBoxColliderImp(){ + return shared_ptr<BoxColliderInt>(new ODEBoxCollider()); +} + +shared_ptr<CapsuleColliderInt> ODEImpFactory::CreateCapsuleColliderImp(){ + return shared_ptr<CapsuleColliderInt>(new ODECapsuleCollider()); +} + +shared_ptr<ColliderInt> ODEImpFactory::CreateColliderImp(){ + return shared_ptr<ColliderInt>(new ODECollider()); +} + +shared_ptr<CompoundColliderInt> ODEImpFactory::CreateCompoundColliderImp(){ + return shared_ptr<CompoundColliderInt>(new ODECompoundCollider()); +} + +shared_ptr<ConcaveColliderInt> ODEImpFactory::CreateConcaveColliderImp(){ + return shared_ptr<ConcaveColliderInt>(new ODEConcaveCollider()); +} + +shared_ptr<ConeColliderInt> ODEImpFactory::CreateConeColliderImp(){ + return shared_ptr<ConeColliderInt>(new ODEConeCollider()); +} + +shared_ptr<ConeTwistJointInt> ODEImpFactory::CreateConeTwistJointImp(){ + return shared_ptr<ConeTwistJointInt>(new ODEConeTwistJoint()); +} + +shared_ptr<ContactJointHandlerInt> ODEImpFactory::CreateContactJointHandlerImp(){ + return shared_ptr<ContactJointHandlerInt>(new ODEContactJointHandler()); +} + +shared_ptr<ConvexColliderInt> ODEImpFactory::CreateConvexColliderImp(){ + return shared_ptr<ConvexColliderInt>(new ODEConvexCollider()); +} + +shared_ptr<CylinderColliderInt> ODEImpFactory::CreateCylinderColliderImp(){ + return shared_ptr<CylinderColliderInt>(new ODECylinderCollider()); +} + +shared_ptr<DynamicBodyInt> ODEImpFactory::CreateDynamicBodyImp(){ + return shared_ptr<DynamicBodyInt>(new ODEDynamicBody()); +} + +shared_ptr<EmptyColliderInt> ODEImpFactory::CreateEmptyColliderImp(){ + return shared_ptr<EmptyColliderInt>(new ODEEmptyCollider()); +} + +shared_ptr<FixedJointInt> ODEImpFactory::CreateFixedJointImp(){ + return shared_ptr<FixedJointInt>(new ODEFixedJoint()); +} + +shared_ptr<Generic6DOFJointInt> ODEImpFactory::CreateGeneric6DOFJointImp(){ + return shared_ptr<Generic6DOFJointInt>(new ODEGeneric6DOFJoint()); +} + +shared_ptr<Hinge2JointInt> ODEImpFactory::CreateHinge2JointImp(){ + return shared_ptr<Hinge2JointInt>(new ODEHinge2Joint()); +} + +shared_ptr<HingeJointInt> ODEImpFactory::CreateHingeJointImp(){ + return shared_ptr<HingeJointInt>(new ODEHingeJoint()); +} + +shared_ptr<JointInt> ODEImpFactory::CreateJointImp(){ + return shared_ptr<JointInt>(new ODEJoint()); +} + +shared_ptr<PhysicsObjectInt> ODEImpFactory::CreatePhysicsObjectImp(){ + return shared_ptr<PhysicsObjectInt>(new ODEPhysicsObject()); +} + +shared_ptr<PhysicsServerInt> ODEImpFactory::CreatePhysicsServerImp(){ + return shared_ptr<PhysicsServerInt>(new ODEPhysicsServer()); +} + +shared_ptr<PlaneColliderInt> ODEImpFactory::CreatePlaneColliderImp(){ + return shared_ptr<PlaneColliderInt>(new ODEPlaneCollider()); +} + +shared_ptr<RayColliderInt> ODEImpFactory::CreateRayColliderImp(){ + return shared_ptr<RayColliderInt>(new ODERayCollider()); +} + +shared_ptr<RigidBodyInt> ODEImpFactory::CreateRigidBodyImp(){ + return shared_ptr<RigidBodyInt>(new ODERigidBody()); +} + +shared_ptr<SliderJointInt> ODEImpFactory::CreateSliderJointImp(){ + return shared_ptr<SliderJointInt>(new ODESliderJoint()); +} + +shared_ptr<SoftBodyInt> ODEImpFactory::CreateSoftBodyImp(){ + return shared_ptr<SoftBodyInt>(new ODESoftBody()); +} + +shared_ptr<SpaceInt> ODEImpFactory::CreateSpaceImp(){ + return shared_ptr<SpaceInt>(new ODESpace()); +} + +shared_ptr<SphereColliderInt> ODEImpFactory::CreateSphereColliderImp(){ + return shared_ptr<SphereColliderInt>(new ODESphereCollider()); +} + +shared_ptr<StaticBodyInt> ODEImpFactory::CreateStaticBodyImp(){ + return shared_ptr<StaticBodyInt>(new ODEStaticBody()); +} + +shared_ptr<TransformColliderInt> ODEImpFactory::CreateTransformColliderImp(){ + return shared_ptr<TransformColliderInt>(new ODETransformCollider()); +} + +shared_ptr<UniversalJointInt> ODEImpFactory::CreateUniversalJointImp(){ + return shared_ptr<UniversalJointInt>(new ODEUniversalJoint()); +} + +shared_ptr<WorldInt> ODEImpFactory::CreateWorldImp(){ + return shared_ptr<WorldInt>(new ODEWorld()); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeimpfactory.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeimpfactory.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeimpfactory.h 2010-01-28 07:17:35 UTC (rev 153) @@ -0,0 +1,68 @@ +/* -*- 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: hingejoint.h 138 2010-01-08 07:35:25Z 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_ODEIMPFACTORY_H +#define OXYGEN_ODEIMPFACTORY_H + +#include <oxygen/oxygen_defines.h> +#include <oxygen/physicsserver/int/impfactoryint.h> + +namespace oxygen{ + +class OXYGEN_API ODEImpFactory : public ImpFactoryInt{ + +public: + boost::shared_ptr<AngularMotorInt> CreateAngularMotorImp(); + boost::shared_ptr<BallJointInt> CreateBallJointImp(); + boost::shared_ptr<BodyInt> CreateBodyImp(); + boost::shared_ptr<BoxColliderInt> CreateBoxColliderImp(); + boost::shared_ptr<CapsuleColliderInt> CreateCapsuleColliderImp(); + boost::shared_ptr<ColliderInt> CreateColliderImp(); + boost::shared_ptr<CompoundColliderInt> CreateCompoundColliderImp(); + boost::shared_ptr<ConcaveColliderInt> CreateConcaveColliderImp(); + boost::shared_ptr<ConeColliderInt> CreateConeColliderImp(); + boost::shared_ptr<ConeTwistJointInt> CreateConeTwistJointImp(); + boost::shared_ptr<ContactJointHandlerInt> CreateContactJointHandlerImp(); + boost::shared_ptr<ConvexColliderInt> CreateConvexColliderImp(); + boost::shared_ptr<CylinderColliderInt> CreateCylinderColliderImp(); + boost::shared_ptr<DynamicBodyInt> CreateDynamicBodyImp(); + boost::shared_ptr<EmptyColliderInt> CreateEmptyColliderImp(); + boost::shared_ptr<FixedJointInt> CreateFixedJointImp(); + boost::shared_ptr<Generic6DOFJointInt> CreateGeneric6DOFJointImp(); + boost::shared_ptr<Hinge2JointInt> CreateHinge2JointImp(); + boost::shared_ptr<HingeJointInt> CreateHingeJointImp(); + boost::shared_ptr<JointInt> CreateJointImp(); + boost::shared_ptr<PhysicsObjectInt> CreatePhysicsObjectImp(); + boost::shared_ptr<PhysicsServerInt> CreatePhysicsServerImp(); + boost::shared_ptr<PlaneColliderInt> CreatePlaneColliderImp(); + boost::shared_ptr<RayColliderInt> CreateRayColliderImp(); + boost::shared_ptr<RigidBodyInt> CreateRigidBodyImp(); + boost::shared_ptr<SliderJointInt> CreateSliderJointImp(); + boost::shared_ptr<SoftBodyInt> CreateSoftBodyImp(); + boost::shared_ptr<SpaceInt> CreateSpaceImp(); + boost::shared_ptr<SphereColliderInt> CreateSphereColliderImp(); + boost::shared_ptr<StaticBodyInt> CreateStaticBodyImp(); + boost::shared_ptr<TransformColliderInt> CreateTransformColliderImp(); + boost::shared_ptr<UniversalJointInt> CreateUniversalJointImp(); + boost::shared_ptr<WorldInt> CreateWorldImp(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODEIMPFACTORY_H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-01-28 07:14:04
|
Revision: 152 http://simspark.svn.sourceforge.net/simspark/?rev=152&view=rev Author: a-held Date: 2010-01-28 07:13:43 +0000 (Thu, 28 Jan 2010) Log Message: ----------- Created a factory for implementation objects that also uses the bridge pattern. Instead of each physics object having its own implementation object, all objects of the same type get a reference to the same implementation object. This saves some memory and (I think) makes good use of the processor cache; there was a noteable increase on the average FPS after the implementation (before: 23.3 to 23.8, after: 24.1 to 24.8). Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/softbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/staticbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-01-28 07:13:43 UTC (rev 152) @@ -15,6 +15,7 @@ oxygen.h oxygen_defines.h physicsserver/genericphysicsobjects.h + physicsserver/impfactory.h physicsserver/physicsobject.h physicsserver/body.h physicsserver/rigidbody.h @@ -75,6 +76,7 @@ physicsserver/int/generic6dofjointint.h physicsserver/int/hingejointint.h physicsserver/int/hinge2jointint.h + physicsserver/int/impfactoryint.h physicsserver/int/jointint.h physicsserver/int/physicsobjectint.h physicsserver/int/physicsserverint.h @@ -111,6 +113,7 @@ physicsserver/ode/odegeneric6dofjoint.h physicsserver/ode/odehingejoint.h physicsserver/ode/odehinge2joint.h + physicsserver/ode/odeimpfactory.h physicsserver/ode/odejoint.h physicsserver/ode/odephysicsobject.h physicsserver/ode/odephysicsserver.h @@ -190,6 +193,7 @@ oxygen.cpp physicsserver/physicsobject.cpp physicsserver/physicsobject_c.cpp + physicsserver/impfactory.cpp physicsserver/body.cpp physicsserver/body_c.cpp physicsserver/rigidbody.cpp @@ -285,6 +289,7 @@ physicsserver/ode/odegeneric6dofjoint.cpp physicsserver/ode/odehingejoint.cpp physicsserver/ode/odehinge2joint.cpp + physicsserver/ode/odeimpfactory.cpp physicsserver/ode/odejoint.cpp physicsserver/ode/odephysicsobject.cpp physicsserver/ode/odephysicsserver.cpp Modified: branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -18,7 +18,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/angularmotor.h> -#include <oxygen/physicsserver/ode/odeangularmotor.h> +#include <oxygen/physicsserver/int/angularmotorint.h> +#include <oxygen/physicsserver/int/jointint.h> +#include <oxygen/physicsserver/impfactory.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -27,7 +29,7 @@ AngularMotor::AngularMotor() : Joint() { - mAngularMotorImp = boost::shared_ptr<ODEAngularMotor>(new ODEAngularMotor()); + mAngularMotorImp = ImpFactory::GetInstance()->GetAngularMotorImp(); } AngularMotor::~AngularMotor() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -17,8 +17,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <oxygen/physicsserver/ode/odeballjoint.h> +#include <oxygen/physicsserver/int/balljointint.h> +#include <oxygen/physicsserver/int/jointint.h> #include <oxygen/physicsserver/balljoint.h> +#include <oxygen/physicsserver/impfactory.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -27,7 +29,7 @@ BallJoint::BallJoint() : Generic6DOFJoint() { - mBallJointImp = boost::shared_ptr<ODEBallJoint>(new ODEBallJoint()); + mBallJointImp = ImpFactory::GetInstance()->GetBallJointImp(); } BallJoint::~BallJoint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,14 +20,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/body.h> -#include <oxygen/physicsserver/ode/odebody.h> +#include <oxygen/physicsserver/int/bodyint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; Body::Body() : PhysicsObject(), mBodyID(0), mMassTransformed(false), mMassTrans(0,0,0) { - mBodyImp = boost::shared_ptr<ODEBody>(new ODEBody()); + mBodyImp = ImpFactory::GetInstance()->GetBodyImp(); } Body::~Body(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -21,14 +21,15 @@ */ #include <oxygen/physicsserver/boxcollider.h> -#include <oxygen/physicsserver/ode/odeboxcollider.h> +#include <oxygen/physicsserver/int/boxcolliderint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; using namespace salt; BoxCollider::BoxCollider() : ConvexCollider() { - mBoxColliderImp = boost::shared_ptr<ODEBoxCollider>(new ODEBoxCollider()); + mBoxColliderImp = ImpFactory::GetInstance()->GetBoxColliderImp(); } void BoxCollider::SetBoxLengths(const Vector3f& extents) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,14 +20,15 @@ */ #include <oxygen/physicsserver/capsulecollider.h> -#include <oxygen/physicsserver/ode/odecapsulecollider.h> +#include <oxygen/physicsserver/int/capsulecolliderint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; using namespace salt; CapsuleCollider::CapsuleCollider() : ConvexCollider() { - mCapsuleColliderImp = boost::shared_ptr<ODECapsuleCollider>(new ODECapsuleCollider()); + mCapsuleColliderImp = ImpFactory::GetInstance()->GetCapsuleColliderImp(); } void CapsuleCollider::SetParams(float radius, float length) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,7 +20,8 @@ */ #include <oxygen/physicsserver/genericphysicsobjects.h> #include <oxygen/physicsserver/collider.h> -#include <oxygen/physicsserver/ode/odecollider.h> +#include <oxygen/physicsserver/int/colliderint.h> +#include <oxygen/physicsserver/impfactory.h> #include <oxygen/physicsserver/collisionhandler.h> #include <oxygen/physicsserver/space.h> #include <oxygen/physicsserver/staticphysicsmethods.h> @@ -37,7 +38,7 @@ Collider::Collider() : PhysicsObject(), mGeomID(0) { - mColliderImp = boost::shared_ptr<ODECollider>(new ODECollider()); + mColliderImp = ImpFactory::GetInstance()->GetColliderImp(); } Collider::~Collider() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/compoundcollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,12 +20,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/compoundcollider.h> -#include <oxygen/physicsserver/ode/odecompoundcollider.h> +#include <oxygen/physicsserver/int/compoundcolliderint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; CompoundCollider::CompoundCollider() : Collider(){ - mCompoundColliderImp = boost::shared_ptr<ODECompoundCollider>(new ODECompoundCollider()); + mCompoundColliderImp = ImpFactory::GetInstance()->GetCompoundColliderImp(); } CompoundCollider::~CompoundCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/concavecollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,12 +20,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/concavecollider.h> -#include <oxygen/physicsserver/ode/odeconcavecollider.h> +#include <oxygen/physicsserver/int/concavecolliderint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; ConcaveCollider::ConcaveCollider() : Collider(){ - mConcaveColliderImp = boost::shared_ptr<ODEConcaveCollider>(new ODEConcaveCollider()); + mConcaveColliderImp = ImpFactory::GetInstance()->GetConcaveColliderImp(); } ConcaveCollider::~ConcaveCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,12 +20,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/conecollider.h> -#include <oxygen/physicsserver/ode/odeconecollider.h> +#include <oxygen/physicsserver/int/conecolliderint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; ConeCollider::ConeCollider() : ConvexCollider(){ - mConeColliderImp = boost::shared_ptr<ODEConeCollider>(new ODEConeCollider()); + mConeColliderImp = ImpFactory::GetInstance()->GetConeColliderImp(); } ConeCollider::~ConeCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -21,12 +21,13 @@ */ #include <oxygen/physicsserver/conetwistjoint.h> -#include <oxygen/physicsserver/ode/odeconetwistjoint.h> +#include <oxygen/physicsserver/int/conetwistjointint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; ConeTwistJoint::ConeTwistJoint() : Generic6DOFJoint(){ - mConeTwistJointImp = boost::shared_ptr<ODEConeTwistJoint>(new ODEConeTwistJoint()); + mConeTwistJointImp = ImpFactory::GetInstance()->GetConeTwistJointImp(); } ConeTwistJoint::~ConeTwistJoint(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,7 +20,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/contactjointhandler.h> -#include <oxygen/physicsserver/ode/odecontactjointhandler.h> +#include <oxygen/physicsserver/int/contactjointhandlerint.h> +#include <oxygen/physicsserver/impfactory.h> #include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/space.h> #include <oxygen/physicsserver/world.h> @@ -31,7 +32,7 @@ ContactJointHandler::ContactJointHandler() : CollisionHandler() { - mContactJointHandlerImp = boost::shared_ptr<ODEContactJointHandler>(new ODEContactJointHandler()); + mContactJointHandlerImp = ImpFactory::GetInstance()->GetContactJointHandlerImp(); mSurfaceParameter = mContactJointHandlerImp->Initialize(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,12 +20,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/convexcollider.h> -#include <oxygen/physicsserver/ode/odeconvexcollider.h> +#include <oxygen/physicsserver/int/convexcolliderint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; ConvexCollider::ConvexCollider() : Collider(){ - mConvexColliderImp = boost::shared_ptr<ODEConvexCollider>(new ODEConvexCollider()); + mConvexColliderImp = ImpFactory::GetInstance()->GetConvexColliderImp(); } ConvexCollider::~ConvexCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,12 +20,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/cylindercollider.h> -#include <oxygen/physicsserver/ode/odecylindercollider.h> +#include <oxygen/physicsserver/int/cylindercolliderint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; CylinderCollider::CylinderCollider() : ConvexCollider(){ - mCylinderColliderImp = boost::shared_ptr<ODECylinderCollider>(new ODECylinderCollider()); + mCylinderColliderImp = ImpFactory::GetInstance()->GetCylinderColliderImp(); } CylinderCollider::~CylinderCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/dynamicbody.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,12 +20,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/dynamicbody.h> -#include <oxygen/physicsserver/ode/odedynamicbody.h> +#include <oxygen/physicsserver/int/dynamicbodyint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; DynamicBody::DynamicBody() : Body(){ - mDynamicBodyImp = boost::shared_ptr<ODEDynamicBody>(new ODEDynamicBody()); + mDynamicBodyImp = ImpFactory::GetInstance()->GetDynamicBodyImp(); } DynamicBody::~DynamicBody(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/emptycollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,12 +20,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/emptycollider.h> -#include <oxygen/physicsserver/ode/odeemptycollider.h> +#include <oxygen/physicsserver/int/emptycolliderint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; EmptyCollider::EmptyCollider() : Collider(){ - mEmptyColliderImp = boost::shared_ptr<ODEEmptyCollider>(new ODEEmptyCollider()); + mEmptyColliderImp = ImpFactory::GetInstance()->GetEmptyColliderImp(); } EmptyCollider::~EmptyCollider(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -18,14 +18,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/fixedjoint.h> -#include <oxygen/physicsserver/ode/odefixedjoint.h> +#include <oxygen/physicsserver/int/fixedjointint.h> +#include <oxygen/physicsserver/impfactory.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; FixedJoint::FixedJoint() : Generic6DOFJoint() { - mFixedJointImp = boost::shared_ptr<ODEFixedJoint>(new ODEFixedJoint()); + mFixedJointImp = ImpFactory::GetInstance()->GetFixedJointImp(); } FixedJoint::~FixedJoint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -21,12 +21,13 @@ */ #include <oxygen/physicsserver/generic6dofjoint.h> -#include <oxygen/physicsserver/ode/odegeneric6dofjoint.h> +#include <oxygen/physicsserver/int/generic6dofjointint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; Generic6DOFJoint::Generic6DOFJoint() : Joint(){ - mGeneric6DOFJointImp = boost::shared_ptr<ODEGeneric6DOFJoint>(new ODEGeneric6DOFJoint()); + mGeneric6DOFJointImp = ImpFactory::GetInstance()->GetGeneric6DOFJointImp(); } Generic6DOFJoint::~Generic6DOFJoint(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -18,7 +18,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/hinge2joint.h> -#include <oxygen/physicsserver/ode/odehinge2joint.h> +#include <oxygen/physicsserver/int/hinge2jointint.h> +#include <oxygen/physicsserver/impfactory.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -27,7 +28,7 @@ Hinge2Joint::Hinge2Joint() : Generic6DOFJoint() { - mHinge2JointImp = boost::shared_ptr<ODEHinge2Joint>(new ODEHinge2Joint()); + mHinge2JointImp = ImpFactory::GetInstance()->GetHinge2JointImp(); } Hinge2Joint::~Hinge2Joint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -18,7 +18,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/hingejoint.h> -#include <oxygen/physicsserver/ode/odehingejoint.h> +#include <oxygen/physicsserver/int/hingejointint.h> +#include <oxygen/physicsserver/int/jointint.h> +#include <oxygen/physicsserver/impfactory.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -27,7 +29,7 @@ HingeJoint::HingeJoint() : Generic6DOFJoint() { - mHingeJointImp = boost::shared_ptr<ODEHingeJoint>(new ODEHingeJoint()); + mHingeJointImp = ImpFactory::GetInstance()->GetHingeJointImp(); } HingeJoint::~HingeJoint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-01-28 07:13:43 UTC (rev 152) @@ -25,6 +25,7 @@ #include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/oxygen_defines.h> +#include <salt/matrix.h> #include <set> #include <string> Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,7 +20,8 @@ #include <oxygen/physicsserver/joint.h> #include <oxygen/physicsserver/rigidbody.h> #include <oxygen/physicsserver/staticphysicsmethods.h> -#include <oxygen/physicsserver/ode/odejoint.h> +#include <oxygen/physicsserver/impfactory.h> +#include <oxygen/physicsserver/int/jointint.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -33,7 +34,7 @@ mJointMaxSpeed1(0), mJointMaxSpeed2(0), mIsLimitJointMaxSpeed1(false), mIsLimitJointMaxSpeed2(false) { - mJointImp = boost::shared_ptr<ODEJoint>(new ODEJoint()); + mJointImp = ImpFactory::GetInstance()->GetJointImp(); } Joint::~Joint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -24,7 +24,8 @@ #include <oxygen/physicsserver/physicsobject.h> #include <oxygen/physicsserver/space.h> #include <oxygen/physicsserver/world.h> -#include <oxygen/physicsserver/ode/odephysicsobject.h> +#include <oxygen/physicsserver/int/physicsobjectint.h> +#include <oxygen/physicsserver/impfactory.h> #include <oxygen/sceneserver/scene.h> #include <zeitgeist/logserver/logserver.h> @@ -33,7 +34,7 @@ PhysicsObject::PhysicsObject() : BaseNode() { - mPhysicsObjectImp = shared_ptr<ODEPhysicsObject>(new ODEPhysicsObject()); + mPhysicsObjectImp = ImpFactory::GetInstance()->GetPhysicsObjectImp(); } PhysicsObject::~PhysicsObject() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsserver.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,11 +20,12 @@ */ #include <oxygen/physicsserver/physicsserver.h> -#include <oxygen/physicsserver/ode/odephysicsserver.h> +#include <oxygen/physicsserver/int/physicsserverint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; PhysicsServer::PhysicsServer() : Leaf() { - mPhysicsServerImp = boost::shared_ptr<ODEPhysicsServer>(new ODEPhysicsServer()); + mPhysicsServerImp = ImpFactory::GetInstance()->GetPhysicsServerImp(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,7 +20,8 @@ */ #include <oxygen/physicsserver/planecollider.h> -#include <oxygen/physicsserver/ode/odeplanecollider.h> +#include <oxygen/physicsserver/int/planecolliderint.h> +#include <oxygen/physicsserver/impfactory.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -28,7 +29,7 @@ PlaneCollider::PlaneCollider() : Collider() { - mPlaneColliderImp = boost::shared_ptr<ODEPlaneCollider>(new ODEPlaneCollider()); + mPlaneColliderImp = ImpFactory::GetInstance()->GetPlaneColliderImp(); } void PlaneCollider::SetParams(float a, float b, float c, float d) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -19,14 +19,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <oxygen/physicsserver/ode/oderaycollider.h> +#include <oxygen/physicsserver/int/raycolliderint.h> +#include <oxygen/physicsserver/impfactory.h> #include <oxygen/physicsserver/raycollider.h> using namespace oxygen; RayCollider::RayCollider() : Collider() { - mRayColliderImp = boost::shared_ptr<ODERayCollider>(new ODERayCollider()); + mRayColliderImp = ImpFactory::GetInstance()->GetRayColliderImp(); } void RayCollider::SetParams(salt::Vector3f pos, Modified: branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -21,7 +21,8 @@ #include <oxygen/physicsserver/transformcollider.h> #include <oxygen/physicsserver/staticphysicsmethods.h> #include <oxygen/physicsserver/world.h> -#include <oxygen/physicsserver/ode/oderigidbody.h> +#include <oxygen/physicsserver/int/rigidbodyint.h> +#include <oxygen/physicsserver/impfactory.h> #include <oxygen/sceneserver/scene.h> #include <oxygen/sceneserver/transform.h> #include <zeitgeist/logserver/logserver.h> @@ -33,7 +34,7 @@ RigidBody::RigidBody() : Body() { - mRigidBodyImp = boost::shared_ptr<ODERigidBody>(new ODERigidBody()); + mRigidBodyImp = ImpFactory::GetInstance()->GetRigidBodyImp(); } RigidBody::~RigidBody() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -18,7 +18,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/sliderjoint.h> -#include <oxygen/physicsserver/ode/odesliderjoint.h> +#include <oxygen/physicsserver/int/sliderjointint.h> +#include <oxygen/physicsserver/impfactory.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -27,7 +28,7 @@ SliderJoint::SliderJoint() : Generic6DOFJoint() { - mSliderJointImp = boost::shared_ptr<ODESliderJoint>(new ODESliderJoint()); + mSliderJointImp = ImpFactory::GetInstance()->GetSliderJointImp(); } SliderJoint::~SliderJoint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/softbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/softbody.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/softbody.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,12 +20,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/softbody.h> -#include <oxygen/physicsserver/ode/odesoftbody.h> +#include <oxygen/physicsserver/int/softbodyint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; SoftBody::SoftBody() : Body(){ - mSoftBodyImp = boost::shared_ptr<ODESoftBody>(new ODESoftBody()); + mSoftBodyImp = ImpFactory::GetInstance()->GetSoftBodyImp(); } SoftBody::~SoftBody(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,7 +20,8 @@ */ #include <oxygen/physicsserver/space.h> -#include <oxygen/physicsserver/ode/odespace.h> +#include <oxygen/physicsserver/int/spaceint.h> +#include <oxygen/physicsserver/impfactory.h> #include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/world.h> #include <oxygen/sceneserver/scene.h> @@ -33,7 +34,7 @@ Space::Space() : PhysicsObject(), mSpaceID(0) { - mSpaceImp = shared_ptr<ODESpace>(new ODESpace()); + mSpaceImp = ImpFactory::GetInstance()->GetSpaceImp(); } Space::~Space() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,14 +20,15 @@ */ #include <oxygen/physicsserver/spherecollider.h> -#include <oxygen/physicsserver/ode/odespherecollider.h> +#include <oxygen/physicsserver/int/spherecolliderint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; using namespace salt; SphereCollider::SphereCollider() : ConvexCollider() { - mSphereColliderImp = boost::shared_ptr<ODESphereCollider>(new ODESphereCollider()); + mSphereColliderImp = ImpFactory::GetInstance()->GetSphereColliderImp(); } void SphereCollider::SetRadius(float r) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/staticbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/staticbody.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/staticbody.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,12 +20,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/staticbody.h> -#include <oxygen/physicsserver/ode/odestaticbody.h> +#include <oxygen/physicsserver/int/staticbodyint.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; StaticBody::StaticBody() : Body(){ - mStaticBodyImp = boost::shared_ptr<ODEStaticBody>(new ODEStaticBody()); + mStaticBodyImp = ImpFactory::GetInstance()->GetStaticBodyImp(); } StaticBody::~StaticBody(){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -20,15 +20,16 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <oxygen/physicsserver/ode/odetransformcollider.h> +#include <oxygen/physicsserver/int/transformcolliderint.h> #include <oxygen/physicsserver/transformcollider.h> +#include <oxygen/physicsserver/impfactory.h> using namespace oxygen; using namespace salt; TransformCollider::TransformCollider() : Collider() { - mTransformColliderImp = boost::shared_ptr<ODETransformCollider>(new ODETransformCollider()); + mTransformColliderImp = ImpFactory::GetInstance()->GetTransformColliderImp(); } bool TransformCollider::ConstructInternal() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -18,7 +18,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/universaljoint.h> -#include <oxygen/physicsserver/ode/odeuniversaljoint.h> +#include <oxygen/physicsserver/int/universaljointint.h> +#include <oxygen/physicsserver/int/jointint.h> +#include <oxygen/physicsserver/impfactory.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -27,7 +29,7 @@ UniversalJoint::UniversalJoint() : Generic6DOFJoint() { - mUniversalJointImp = boost::shared_ptr<ODEUniversalJoint>(new ODEUniversalJoint()); + mUniversalJointImp = ImpFactory::GetInstance()->GetUniversalJointImp(); } UniversalJoint::~UniversalJoint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp 2010-01-26 11:23:42 UTC (rev 151) +++ branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp 2010-01-28 07:13:43 UTC (rev 152) @@ -19,7 +19,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <oxygen/physicsserver/ode/odeworld.h> +#include <oxygen/physicsserver/int/worldint.h> +#include <oxygen/physicsserver/impfactory.h> #include <oxygen/physicsserver/space.h> #include <oxygen/physicsserver/world.h> #include <oxygen/sceneserver/scene.h> @@ -30,7 +31,7 @@ World::World() : PhysicsObject() { - mWorldImp = shared_ptr<ODEWorld>(new ODEWorld()); + mWorldImp = ImpFactory::GetInstance()->GetWorldImp(); } World::~World() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-01-26 11:23:50
|
Revision: 151 http://simspark.svn.sourceforge.net/simspark/?rev=151&view=rev Author: a-held Date: 2010-01-26 11:23:42 +0000 (Tue, 26 Jan 2010) Log Message: ----------- Corrected some code so that really nothing is stored in implementation objects Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/joint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.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/world.cpp branches/multiphys/spark/lib/oxygen/physicsserver/world.h branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.cpp Modified: branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2010-01-26 11:23:42 UTC (rev 151) @@ -32,11 +32,12 @@ ContactJointHandler::ContactJointHandler() : CollisionHandler() { mContactJointHandlerImp = boost::shared_ptr<ODEContactJointHandler>(new ODEContactJointHandler()); - mContactJointHandlerImp->Initialize(); + mSurfaceParameter = mContactJointHandlerImp->Initialize(); } ContactJointHandler::~ContactJointHandler() { + delete mSurfaceParameter; } void @@ -75,7 +76,7 @@ // calculate the resulting surface parameters mContactJointHandlerImp->CalcSurfaceParam( - contact, handler->GetSurfaceParameter()); + contact, handler->GetSurfaceParameter(), mSurfaceParameter); // create the contact joint and attach it to the body long joint = mContactJointHandlerImp->CreateContactJoint( @@ -87,120 +88,115 @@ void ContactJointHandler::SetSurfaceParameter(const GenericSurfaceParameter& surface) { - mContactJointHandlerImp->SetSurfaceParameter(surface); + GenericSurfaceParameter* newSurface = (GenericSurfaceParameter*) &surface; + mSurfaceParameter = newSurface; } GenericSurfaceParameter& ContactJointHandler::GetSurfaceParameter() const { - return mContactJointHandlerImp->GetSurfaceParameter(); + return (GenericSurfaceParameter&) *mSurfaceParameter; } -void -ContactJointHandler::SetContactMode(int mode, bool set) -{ - mContactJointHandlerImp->SetContactMode(mode, set); -} - int ContactJointHandler::GetContactMode() const { - return mContactJointHandlerImp->GetContactMode(); + return mContactJointHandlerImp->GetContactMode(mSurfaceParameter); } void ContactJointHandler::SetContactBounceMode(bool set) { - mContactJointHandlerImp->SetContactBounceMode(set); + mContactJointHandlerImp->SetContactBounceMode(set, mSurfaceParameter); } void ContactJointHandler::SetMinBounceVel(float vel) { - mContactJointHandlerImp->SetMinBounceVel(vel); + mContactJointHandlerImp->SetMinBounceVel(vel, mSurfaceParameter); } float ContactJointHandler::GetMinBounceVel() const { - return mContactJointHandlerImp->GetMinBounceVel(); + return mContactJointHandlerImp->GetMinBounceVel(mSurfaceParameter); } void ContactJointHandler::SetBounceValue(float bounce) { - mContactJointHandlerImp->SetBounceValue(bounce); + mContactJointHandlerImp->SetBounceValue(bounce, mSurfaceParameter); } float ContactJointHandler::GetBounceValue() const { - return mContactJointHandlerImp->GetBounceValue(); + return mContactJointHandlerImp->GetBounceValue(mSurfaceParameter); } void ContactJointHandler::SetContactSoftERPMode(bool set) { - mContactJointHandlerImp->SetContactSoftERPMode(set); + mContactJointHandlerImp->SetContactSoftERPMode(set, mSurfaceParameter); } void ContactJointHandler::SetContactSoftERP(float erp) { - mContactJointHandlerImp->SetContactSoftERP(erp); + mContactJointHandlerImp->SetContactSoftERP(erp, mSurfaceParameter); } float ContactJointHandler::GetContactSoftERP() const { - return mContactJointHandlerImp->GetContactSoftERP(); + return mContactJointHandlerImp->GetContactSoftERP(mSurfaceParameter); } void ContactJointHandler::SetContactSoftCFMMode(bool set) { - mContactJointHandlerImp->SetContactSoftCFMMode(set); + mContactJointHandlerImp->SetContactSoftCFMMode(set, mSurfaceParameter); } void ContactJointHandler::SetContactSoftCFM(float cfm) { - mContactJointHandlerImp->SetContactSoftCFM(cfm); + mContactJointHandlerImp->SetContactSoftCFM(cfm, mSurfaceParameter); } float ContactJointHandler::GetContactSoftCFM() const { - return mContactJointHandlerImp->GetContactSoftCFM(); + return mContactJointHandlerImp->GetContactSoftCFM(mSurfaceParameter); } void ContactJointHandler::SetContactSlipMode (bool set) { - mContactJointHandlerImp->SetContactSlipMode(set); + mContactJointHandlerImp->SetContactSlipMode(set, mSurfaceParameter); } void ContactJointHandler::SetContactSlip(float slip) { - mContactJointHandlerImp->SetContactSlip(slip); + mContactJointHandlerImp->SetContactSlip(slip, mSurfaceParameter); } float ContactJointHandler::GetContactSlip1() const { - return mContactJointHandlerImp->GetContactSlip1(); + return mContactJointHandlerImp->GetContactSlip1(mSurfaceParameter); } float ContactJointHandler::GetContactSlip2() const { - return mContactJointHandlerImp->GetContactSlip2(); + return mContactJointHandlerImp->GetContactSlip2(mSurfaceParameter); } void ContactJointHandler::SetContactMu(float mu) { - mContactJointHandlerImp->SetContactMu(mu); + mContactJointHandlerImp->SetContactMu(mu, mSurfaceParameter); } float ContactJointHandler::GetContactMu() const { - return mContactJointHandlerImp->GetContactMu(); + return mContactJointHandlerImp->GetContactMu(mSurfaceParameter); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h 2010-01-26 11:23:42 UTC (rev 151) @@ -70,9 +70,6 @@ */ GenericSurfaceParameter& GetSurfaceParameter() const; - /** sets or resets a contact mode flag in the surface parameter*/ - void SetContactMode(int mode, bool set); - /** returns the current set of contact mode flags in the surface parameter */ @@ -142,6 +139,8 @@ protected: boost::shared_ptr<ContactJointHandlerInt> mContactJointHandlerImp; + + GenericSurfaceParameter* mSurfaceParameter; }; DECLARE_CLASS(ContactJointHandler); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-01-26 11:23:42 UTC (rev 151) @@ -35,36 +35,31 @@ { public: virtual float MixValues(const float v1, const float v2, const int n) const = 0; - virtual void Initialize() = 0; + virtual GenericSurfaceParameter* Initialize() = 0; virtual long RetrieveBody(long geomID) = 0; virtual long CreateContactJoint(long worldID, long jointGroupID, GenericContact& contact) = 0; virtual void AttachContactJoint(long jointID, long bodyID1, long bodyID2) = 0; - virtual void CalcSurfaceParam(GenericContact& surface, GenericSurfaceParameter& collideeParam) = 0; - - virtual void SetSurfaceParameter(const GenericSurfaceParameter& surface) = 0; - virtual GenericSurfaceParameter& GetSurfaceParameter() const = 0; - virtual void SetContactMode(int mode, bool set) = 0; - virtual int GetContactMode() const = 0; - virtual void SetContactBounceMode(bool set) = 0; - virtual void SetBounceValue(float bounce) = 0; - virtual float GetBounceValue() const = 0; - virtual void SetMinBounceVel(float vel) = 0; - virtual float GetMinBounceVel() const = 0; - virtual void SetContactSoftERPMode(bool set) = 0; - virtual void SetContactSoftERP(float erp) = 0; - virtual float GetContactSoftERP() const = 0; - virtual void SetContactSoftCFMMode(bool set) = 0; - virtual void SetContactSoftCFM(float cfm) = 0; - virtual float GetContactSoftCFM() const = 0; - virtual void SetContactSlipMode (bool set) = 0; - virtual void SetContactSlip(float slip) = 0; - virtual float GetContactSlip1() const = 0; - virtual float GetContactSlip2() const = 0; - virtual void SetContactMu(float mu) = 0; - virtual float GetContactMu() const = 0; - - /** the ODE surface parameters of the created contact joint */ - dSurfaceParameters mSurfaceParameter; + virtual void CalcSurfaceParam(GenericContact& surface, + GenericSurfaceParameter& collideeParam, + GenericSurfaceParameter* surfacePtr) = 0; + virtual int GetContactMode(GenericSurfaceParameter* surface) const = 0; + virtual void SetContactBounceMode(bool set, GenericSurfaceParameter* surface) = 0; + virtual void SetBounceValue(float bounce, GenericSurfaceParameter* surface) = 0; + virtual float GetBounceValue(GenericSurfaceParameter* surface) const = 0; + virtual void SetMinBounceVel(float vel, GenericSurfaceParameter* surface) = 0; + virtual float GetMinBounceVel(GenericSurfaceParameter* surface) const = 0; + virtual void SetContactSoftERPMode(bool set, GenericSurfaceParameter* surface) = 0; + virtual void SetContactSoftERP(float erp, GenericSurfaceParameter* surface) = 0; + virtual float GetContactSoftERP(GenericSurfaceParameter* surface) const = 0; + virtual void SetContactSoftCFMMode(bool set, GenericSurfaceParameter* surface) = 0; + virtual void SetContactSoftCFM(float cfm, GenericSurfaceParameter* surface) = 0; + virtual float GetContactSoftCFM(GenericSurfaceParameter* surface) const = 0; + virtual void SetContactSlipMode (bool set, GenericSurfaceParameter* surface) = 0; + virtual void SetContactSlip(float slip, GenericSurfaceParameter* surface) = 0; + virtual float GetContactSlip1(GenericSurfaceParameter* surface) const = 0; + virtual float GetContactSlip2(GenericSurfaceParameter* surface) const = 0; + virtual void SetContactMu(float mu, GenericSurfaceParameter* surface) = 0; + virtual float GetContactMu(GenericSurfaceParameter* surface) const = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-01-26 11:23:42 UTC (rev 151) @@ -39,14 +39,18 @@ { public: - virtual void DestroyJoint(long jointID) = 0; + virtual void DestroyJoint(long jointID, + boost::shared_ptr<GenericJointFeedback> feedback) = 0; virtual void Attach(long bodyID1, long bodiID2, long jointID) = 0; virtual int GetType(long jointID) const = 0; virtual long GetBodyID(int idx, long jointID) = 0; - virtual void EnableFeedback(bool enable, long jointID) = 0; + virtual void EnableFeedback(bool enable, long jointID, + boost::shared_ptr<GenericJointFeedback> feedback) = 0; virtual bool FeedbackEnabled(long jointID) const = 0; - virtual salt::Vector3f GetFeedbackForce(int idx) const = 0; - virtual salt::Vector3f GetFeedbackTorque(int idx) const = 0; + virtual salt::Vector3f GetFeedbackForce(int idx, + boost::shared_ptr<GenericJointFeedback> feedback) const = 0; + virtual salt::Vector3f GetFeedbackTorque(int idx, + boost::shared_ptr<GenericJointFeedback> feedback) const = 0; virtual void SetFudgeFactor(int idx, float fudge_factor, long jointID) = 0; virtual float GetFudgeFactor(int idx, long jointID) const = 0; virtual void SetBounce(int idx, float bounce, long jointID) = 0; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h 2010-01-26 11:23:42 UTC (rev 151) @@ -32,23 +32,19 @@ { public: - virtual long GetWorldID() const = 0; - virtual void SetGravity(const salt::Vector3f& gravity) = 0; - virtual salt::Vector3f GetGravity() const = 0; - virtual void SetERP(float erp) = 0; - virtual float GetERP() const = 0; - virtual void SetCFM(float cfm) = 0; - virtual float GetCFM() const = 0; - virtual void Step(float deltaTime) = 0; - virtual bool GetAutoDisableFlag() const = 0; - virtual void SetAutoDisableFlag(bool flag) = 0; - virtual void SetContactSurfaceLayer(float depth) = 0; - virtual float GetContactSurfaceLayer() const = 0; - virtual void CreateWorld() = 0; - virtual void DestroyWorld() = 0; - -protected: - long mWorldID; + virtual void SetGravity(const salt::Vector3f& gravity, long worldID) = 0; + virtual salt::Vector3f GetGravity(long worldID) const = 0; + virtual void SetERP(float erp, long worldID) = 0; + virtual float GetERP(long worldID) const = 0; + virtual void SetCFM(float cfm, long worldID) = 0; + virtual float GetCFM(long worldID) const = 0; + virtual void Step(float deltaTime, long worldID) = 0; + virtual bool GetAutoDisableFlag(long worldID) const = 0; + virtual void SetAutoDisableFlag(bool flag, long worldID) = 0; + virtual void SetContactSurfaceLayer(float depth, long worldID) = 0; + virtual float GetContactSurfaceLayer(long worldID) const = 0; + virtual long CreateWorld() = 0; + virtual void DestroyWorld(long worldID) = 0; }; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-01-26 11:23:42 UTC (rev 151) @@ -208,7 +208,7 @@ void Joint::EnableFeedback(bool enable) { - mJointImp->EnableFeedback(enable, mJointID); + mJointImp->EnableFeedback(enable, mJointID, mFeedback); } bool Joint::FeedBackEnabled() const @@ -218,12 +218,12 @@ Vector3f Joint::GetFeedbackForce(EBodyIndex idx) const { - return mJointImp->GetFeedbackForce(idx); + return mJointImp->GetFeedbackForce(idx, mFeedback); } Vector3f Joint::GetFeedbackTorque(EBodyIndex idx) const { - return mJointImp->GetFeedbackTorque(idx); + return mJointImp->GetFeedbackTorque(idx, mFeedback); } void Joint::SetFudgeFactor(EAxisIndex idx, float fudge_factor) @@ -374,7 +374,7 @@ } EnableFeedback(false); - mJointImp->DestroyJoint(mJointID); + mJointImp->DestroyJoint(mJointID, mFeedback); mJointID = 0; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2010-01-26 11:23:42 UTC (rev 151) @@ -279,11 +279,15 @@ /** gets the node at 'path' and tries a cast to Body */ boost::shared_ptr<RigidBody> GetBody(const std::string& path); -protected: + // + // Members + // + /** the ID of the managed joint */ long mJointID; + + boost::shared_ptr<GenericJointFeedback> mFeedback; -protected: /** The maximum joint speed in rad, valid for both hingejoint and universaljoint */ float mJointMaxSpeed1; bool mIsLimitJointMaxSpeed1; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp 2010-01-26 11:23:42 UTC (rev 151) @@ -25,18 +25,22 @@ } -void ODEContactJointHandler::Initialize(){ +GenericSurfaceParameter* ODEContactJointHandler::Initialize(){ + dSurfaceParameters* ODESurface = new dSurfaceParameters(); + // set up default contact surface parameters - mSurfaceParameter.mode = dContactBounce; - mSurfaceParameter.mu = dInfinity; - mSurfaceParameter.bounce = 0.8f; - mSurfaceParameter.bounce_vel = 2.0f; + ODESurface->mode = dContactBounce; + ODESurface->mu = dInfinity; + ODESurface->bounce = 0.8f; + ODESurface->bounce_vel = 2.0f; // In contactjointhandler_c.cpp, setContactSlip function, only // accept one parameter, so two parameter is a mistake, and then // these two value will be not initialized, but slipe mode is open - mSurfaceParameter.slip1 = 5e-3; - mSurfaceParameter.slip2 = 5e-3; + ODESurface->slip1 = 5e-3; + ODESurface->slip2 = 5e-3; + + return (GenericSurfaceParameter*) ODESurface; } long ODEContactJointHandler::RetrieveBody(long geomID){ @@ -66,11 +70,14 @@ } void -ODEContactJointHandler::CalcSurfaceParam(GenericContact& surface, GenericSurfaceParameter& collideeParam){ +ODEContactJointHandler::CalcSurfaceParam(GenericContact& surface, + GenericSurfaceParameter& collideeParam, + GenericSurfaceParameter* surfacePtr){ dContact& ODEContact = (dContact&) surface; dSurfaceParameters& ODEParams = (dSurfaceParameters&) collideeParam; + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surfacePtr; - CalcSurfaceParamInternal(ODEContact.surface, ODEParams); + CalcSurfaceParamInternal(ODEContact.surface, ODEParams, ODESurface); } float @@ -99,209 +106,215 @@ void ODEContactJointHandler::CalcSurfaceParamInternal(dSurfaceParameters& surface, - const dSurfaceParameters& collideeParam) + const dSurfaceParameters& collideeParam, + const dSurfaceParameters* surfacePtr) { // init surface surface.mode = 0; // calculate average mu; mu can be dInfinity, so first multiply with // 0.5 and the sum up to avoid a range error - surface.mu = mSurfaceParameter.mu*0.5f + collideeParam.mu*0.5f; + surface.mu = surfacePtr->mu*0.5f + collideeParam.mu*0.5f; // soft cfm const int nCfm = - ((mSurfaceParameter.mode & dContactSoftCFM) ? 1:0) + + ((surfacePtr->mode & dContactSoftCFM) ? 1:0) + ((collideeParam.mode & dContactSoftCFM) ? 2:0); if (nCfm>0) { surface.soft_cfm = MixValues - (mSurfaceParameter.soft_cfm, collideeParam.soft_cfm, nCfm); + (surfacePtr->soft_cfm, collideeParam.soft_cfm, nCfm); surface.mode |= dContactSoftCFM; } // soft_erp const int nErp = - ((mSurfaceParameter.mode & dContactSoftERP) ? 1:0) + + ((surfacePtr->mode & dContactSoftERP) ? 1:0) + ((collideeParam.mode & dContactSoftERP) ? 2:0); if (nErp>0) { surface.soft_erp = MixValues - (mSurfaceParameter.soft_erp, collideeParam.soft_erp, nErp); + (surfacePtr->soft_erp, collideeParam.soft_erp, nErp); surface.mode |= dContactSoftERP; } // bounce const int nBounce = - ((mSurfaceParameter.mode & dContactBounce) ? 1:0) + + ((surfacePtr->mode & dContactBounce) ? 1:0) + ((collideeParam.mode & dContactBounce) ? 2:0); if (nBounce>0) { surface.bounce = MixValues - (mSurfaceParameter.bounce, collideeParam.bounce, nBounce); + (surfacePtr->bounce, collideeParam.bounce, nBounce); surface.bounce_vel = MixValues - (mSurfaceParameter.bounce_vel, collideeParam.bounce_vel, nBounce); + (surfacePtr->bounce_vel, collideeParam.bounce_vel, nBounce); surface.mode |= dContactBounce; } // slip1 const int nSlip1 = - ((mSurfaceParameter.mode & dContactSlip1) ? 1 : 0) + + ((surfacePtr->mode & dContactSlip1) ? 1 : 0) + ((collideeParam.mode & dContactSlip1) ? 2 : 0); if (nSlip1 > 0) { surface.slip1 = MixValues - (mSurfaceParameter.slip1, collideeParam.slip1, nSlip1); + (surfacePtr->slip1, collideeParam.slip1, nSlip1); surface.mode |= dContactSlip1; } // slip2 const int nSlip2 = - ((mSurfaceParameter.mode & dContactSlip2) ? 1 : 0) + + ((surfacePtr->mode & dContactSlip2) ? 1 : 0) + ((collideeParam.mode & dContactSlip2) ? 2 : 0); if (nSlip2 > 0) { surface.slip2 = MixValues - (mSurfaceParameter.slip2, collideeParam.slip2, nSlip2); + (surfacePtr->slip2, collideeParam.slip2, nSlip2); surface.mode |= dContactSlip2; } } void -ODEContactJointHandler::SetSurfaceParameter(const GenericSurfaceParameter& surface) +ODEContactJointHandler::SetContactMode(int mode, bool set, dSurfaceParameters* ODESurface) { - dSurfaceParameters& ODESurface = (dSurfaceParameters&) surface; - mSurfaceParameter = ODESurface; -} - -GenericSurfaceParameter& -ODEContactJointHandler::GetSurfaceParameter() const -{ - return (GenericSurfaceParameter&) mSurfaceParameter; -} - -void -ODEContactJointHandler::SetContactMode(int mode, bool set) -{ if (set) { - mSurfaceParameter.mode |= mode; + ODESurface->mode |= mode; } else { - mSurfaceParameter.mode &= ~mode; + ODESurface->mode &= ~mode; } } int -ODEContactJointHandler::GetContactMode() const +ODEContactJointHandler::GetContactMode(GenericSurfaceParameter* surface) const { - return mSurfaceParameter.mode; + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + return ODESurface->mode; } void -ODEContactJointHandler::SetContactBounceMode(bool set) +ODEContactJointHandler::SetContactBounceMode(bool set, GenericSurfaceParameter* surface) { - SetContactMode(dContactBounce,set); + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + SetContactMode(dContactBounce, set, ODESurface); } void -ODEContactJointHandler::SetMinBounceVel(float vel) +ODEContactJointHandler::SetMinBounceVel(float vel, GenericSurfaceParameter* surface) { - mSurfaceParameter.bounce_vel = std::max<float>(0.0f,vel); + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + ODESurface->bounce_vel = std::max<float>(0.0f,vel); } float -ODEContactJointHandler::GetMinBounceVel() const +ODEContactJointHandler::GetMinBounceVel(GenericSurfaceParameter* surface) const { - return mSurfaceParameter.bounce_vel; + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + return ODESurface->bounce_vel; } void -ODEContactJointHandler::SetBounceValue(float bounce) +ODEContactJointHandler::SetBounceValue(float bounce, GenericSurfaceParameter* surface) { - mSurfaceParameter.bounce = std::max<float>(0.0f,bounce); + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + ODESurface->bounce = std::max<float>(0.0f,bounce); } float -ODEContactJointHandler::GetBounceValue() const +ODEContactJointHandler::GetBounceValue(GenericSurfaceParameter* surface) const { - return mSurfaceParameter.bounce; + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + return ODESurface->bounce; } void -ODEContactJointHandler::SetContactSoftERPMode(bool set) +ODEContactJointHandler::SetContactSoftERPMode(bool set, GenericSurfaceParameter* surface) { - SetContactMode(dContactSoftERP,set); + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + SetContactMode(dContactSoftERP, set, ODESurface); } void -ODEContactJointHandler::SetContactSoftERP(float erp) -{ +ODEContactJointHandler::SetContactSoftERP(float erp, GenericSurfaceParameter* surface) +{ + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; salt::gClamp(erp,0.0f,1.0f); - mSurfaceParameter.soft_erp = erp; + ODESurface->soft_erp = erp; } float -ODEContactJointHandler::GetContactSoftERP() const +ODEContactJointHandler::GetContactSoftERP(GenericSurfaceParameter* surface) const { - return mSurfaceParameter.soft_erp; + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + return ODESurface->soft_erp; } void -ODEContactJointHandler::SetContactSoftCFMMode(bool set) +ODEContactJointHandler::SetContactSoftCFMMode(bool set, GenericSurfaceParameter* surface) { - SetContactMode(dContactSoftCFM,set); + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + SetContactMode(dContactSoftCFM, set, ODESurface); } void -ODEContactJointHandler::SetContactSoftCFM(float cfm) +ODEContactJointHandler::SetContactSoftCFM(float cfm, GenericSurfaceParameter* surface) { - mSurfaceParameter.soft_cfm = std::max<float>(0.0f,cfm); + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + ODESurface->soft_cfm = std::max<float>(0.0f,cfm); } -float ODEContactJointHandler::GetContactSoftCFM() const +float ODEContactJointHandler::GetContactSoftCFM(GenericSurfaceParameter* surface) const { - return mSurfaceParameter.soft_cfm; + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + return ODESurface->soft_cfm; } -void ODEContactJointHandler::SetContactSlipMode (bool set) +void ODEContactJointHandler::SetContactSlipMode (bool set, GenericSurfaceParameter* surface) { - SetContactMode(dContactSlip1,set); - SetContactMode(dContactSlip2,set); + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + SetContactMode(dContactSlip1,set,ODESurface); + SetContactMode(dContactSlip2,set,ODESurface); } -void ODEContactJointHandler::SetContactSlip(float slip) +void ODEContactJointHandler::SetContactSlip(float slip, GenericSurfaceParameter* surface) { - mSurfaceParameter.slip1 = slip; - mSurfaceParameter.slip2 = slip; + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + ODESurface->slip1 = slip; + ODESurface->slip2 = slip; } float -ODEContactJointHandler::GetContactSlip1() const +ODEContactJointHandler::GetContactSlip1(GenericSurfaceParameter* surface) const { - return mSurfaceParameter.slip1; + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + return ODESurface->slip1; } float -ODEContactJointHandler::GetContactSlip2() const +ODEContactJointHandler::GetContactSlip2(GenericSurfaceParameter* surface) const { - return mSurfaceParameter.slip2; + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + return ODESurface->slip2; } -void ODEContactJointHandler::SetContactMu(float mu) +void ODEContactJointHandler::SetContactMu(float mu, GenericSurfaceParameter* surface) { - mSurfaceParameter.mu = mu; + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + ODESurface->mu = mu; } -float ODEContactJointHandler::GetContactMu() const +float ODEContactJointHandler::GetContactMu(GenericSurfaceParameter* surface) const { - return mSurfaceParameter.mu; + dSurfaceParameters* ODESurface = (dSurfaceParameters*) surface; + return ODESurface->mu; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h 2010-01-26 11:23:42 UTC (rev 151) @@ -32,38 +32,38 @@ { public: ODEContactJointHandler(); - void Initialize(); + GenericSurfaceParameter* Initialize(); long RetrieveBody(long geomID); long CreateContactJoint(long worldID, long jointGroupID, GenericContact& contact); void AttachContactJoint(long jointID, long bodyID1, long bodyID2); - void CalcSurfaceParam(GenericContact& surface, GenericSurfaceParameter& collideeParam); - - void SetSurfaceParameter(const GenericSurfaceParameter& surface); - GenericSurfaceParameter& GetSurfaceParameter() const; - void SetContactMode(int mode, bool set); - int GetContactMode() const; - void SetContactBounceMode(bool set); - void SetBounceValue(float bounce); - float GetBounceValue() const; - void SetMinBounceVel(float vel); - float GetMinBounceVel() const; - void SetContactSoftERPMode(bool set); - void SetContactSoftERP(float erp); - float GetContactSoftERP() const; - void SetContactSoftCFMMode(bool set); - void SetContactSoftCFM(float cfm); - float GetContactSoftCFM() const; - void SetContactSlipMode (bool set); - void SetContactSlip(float slip); - float GetContactSlip1() const; - float GetContactSlip2() const; - void SetContactMu(float mu); - float GetContactMu() const; + void CalcSurfaceParam(GenericContact& surface, + GenericSurfaceParameter& collideeParam, + GenericSurfaceParameter* surfacePtr); + int GetContactMode(GenericSurfaceParameter* surface) const; + void SetContactBounceMode(bool set, GenericSurfaceParameter* surface); + void SetBounceValue(float bounce, GenericSurfaceParameter* surface); + float GetBounceValue(GenericSurfaceParameter* surface) const; + void SetMinBounceVel(float vel, GenericSurfaceParameter* surface); + float GetMinBounceVel(GenericSurfaceParameter* surface) const; + void SetContactSoftERPMode(bool set, GenericSurfaceParameter* surface); + void SetContactSoftERP(float erp, GenericSurfaceParameter* surface); + float GetContactSoftERP(GenericSurfaceParameter* surface) const; + void SetContactSoftCFMMode(bool set, GenericSurfaceParameter* surface); + void SetContactSoftCFM(float cfm, GenericSurfaceParameter* surface); + float GetContactSoftCFM(GenericSurfaceParameter* surface) const; + void SetContactSlipMode (bool set, GenericSurfaceParameter* surface); + void SetContactSlip(float slip, GenericSurfaceParameter* surface); + float GetContactSlip1(GenericSurfaceParameter* surface) const; + float GetContactSlip2(GenericSurfaceParameter* surface) const; + void SetContactMu(float mu, GenericSurfaceParameter* surface); + float GetContactMu(GenericSurfaceParameter* surface) const; protected: f_inline float MixValues(const float v1, const float v2, const int n) const; void CalcSurfaceParamInternal(dSurfaceParameters& surface, - const dSurfaceParameters& collideeParam); + const dSurfaceParameters& collideeParam, + const dSurfaceParameters* ODESurface); + void SetContactMode(int mode, bool set, dSurfaceParameters* ODESurface); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp 2010-01-26 11:23:42 UTC (rev 151) @@ -57,26 +57,32 @@ return (long) ODEBodyID; } -void ODEJoint::EnableFeedback(bool enable, long jointID) +void ODEJoint::EnableFeedback(bool enable, long jointID, + shared_ptr<GenericJointFeedback> feedback) { dJointID ODEJoint = (dJointID) jointID; if (enable) { - if (mFeedback.get() == 0) + if (feedback.get() == 0) { - mFeedback = shared_ptr<dJointFeedback>(new dJointFeedback()); - memset(mFeedback.get(),0,sizeof(dJointFeedback)); + feedback = shared_ptr<GenericJointFeedback>( + (GenericJointFeedback*) new dJointFeedback()); + memset(feedback.get(),0,sizeof(dJointFeedback)); } } else { - if (mFeedback.get() != 0) + if (feedback.get() != 0) { - mFeedback.reset(); + feedback.reset(); } } - dJointSetFeedback(ODEJoint,mFeedback.get()); + cout << "bla"; + std::cin; + dJointFeedback* ODEFeedback = (dJointFeedback*) feedback.get(); + + dJointSetFeedback(ODEJoint,ODEFeedback); } bool ODEJoint::FeedbackEnabled(long jointID) const @@ -85,9 +91,10 @@ return (dJointGetFeedback(ODEJoint) != 0); } -Vector3f ODEJoint::GetFeedbackForce(int idx) const +Vector3f ODEJoint::GetFeedbackForce(int idx, + shared_ptr<GenericJointFeedback> feedback) const { - dJointFeedback* fb = mFeedback.get(); + dJointFeedback* fb = (dJointFeedback*) feedback.get(); if (fb == 0) { return Vector3f(0,0,0); @@ -114,9 +121,10 @@ } } -Vector3f ODEJoint::GetFeedbackTorque(int idx) const +Vector3f ODEJoint::GetFeedbackTorque(int idx, + shared_ptr<GenericJointFeedback> feedback) const { - dJointFeedback* fb = mFeedback.get(); + dJointFeedback* fb = (dJointFeedback*) feedback.get(); if (fb == 0) { return Vector3f(0,0,0); @@ -283,10 +291,11 @@ return GetParameter(dParamFMax + (idx * dParamGroup), jointID); } -void ODEJoint::DestroyJoint(long jointID) +void ODEJoint::DestroyJoint(long jointID, + shared_ptr<GenericJointFeedback> feedback) { dJointID ODEJoint = (dJointID) jointID; - EnableFeedback(false, jointID); + EnableFeedback(false, jointID, feedback); dJointDestroy(ODEJoint); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h 2010-01-26 11:23:42 UTC (rev 151) @@ -22,6 +22,7 @@ #ifndef OXYGEN_ODEJOINT_H #define OXYGEN_ODEJOINT_H +#include <oxygen/physicsserver/genericphysicsobjects.h> #include <oxygen/physicsserver/ode/odephysicsobject.h> #include <oxygen/physicsserver/int/jointint.h> @@ -33,14 +34,18 @@ public: ODEJoint(); - virtual void DestroyJoint(long jointID); - virtual void Attach(long bodyID1, long bodiID2, long jointID); + virtual void DestroyJoint(long jointID, + boost::shared_ptr<GenericJointFeedback> feedback); + virtual void Attach(long bodyID1, long bodyID2, long jointID); int GetType(long jointID) const; long GetBodyID(int idx, long jointID); - void EnableFeedback(bool enable, long jointID); + void EnableFeedback(bool enable, long jointID, + boost::shared_ptr<GenericJointFeedback> feedback); bool FeedbackEnabled(long jointID) const; - salt::Vector3f GetFeedbackForce(int idx) const; - salt::Vector3f GetFeedbackTorque(int idx) const; + salt::Vector3f GetFeedbackForce(int idx, + boost::shared_ptr<GenericJointFeedback> feedback) const; + salt::Vector3f GetFeedbackTorque(int idx, + boost::shared_ptr<GenericJointFeedback> feedback) const; void SetFudgeFactor(int idx, float fudge_factor, long jointID); float GetFudgeFactor(int idx, long jointID) const; void SetBounce(int idx, float bounce, long jointID); @@ -69,14 +74,9 @@ float GetAngularMotorVelocity(int idx, long jointID) const; void SetMaxMotorForce(int idx, float f, long jointID); float GetMaxMotorForce(int idx, long jointID) const; - virtual void SetParameter(int parameter, float value, long jointID); - virtual float GetParameter(int parameter, long jointID) const; + void SetParameter(int parameter, float value, long jointID); + float GetParameter(int parameter, long jointID) const; void OnLink(long jointID, Joint* joint); - -protected: - //It is encouraged to not store any member variables in the implementation. - //This can cause major problems. However, here, I found no way to avoid it. - boost::shared_ptr<dJointFeedback> mFeedback; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.cpp 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.cpp 2010-01-26 11:23:42 UTC (rev 151) @@ -21,90 +21,94 @@ #include <oxygen/physicsserver/ode/odeworld.h> #include <oxygen/physicsserver/space.h> -#include <oxygen/sceneserver/scene.h> using namespace boost; using namespace oxygen; using namespace salt; ODEWorld::ODEWorld() : ODEPhysicsObject(){ - mWorldID = 0; } -long ODEWorld::GetWorldID() const +void ODEWorld::SetGravity(const Vector3f& gravity, long worldID) { - return mWorldID; + dWorldID ODEWorld = (dWorldID) worldID; + dWorldSetGravity(ODEWorld, + gravity.x(), + gravity.y(), + gravity.z() + ); } -void ODEWorld::SetGravity(const Vector3f& gravity) +salt::Vector3f ODEWorld::GetGravity(long worldID) const { - dWorldSetGravity(mODEWorld, - gravity.x(), - gravity.y(), - gravity.z() - ); + dWorldID ODEWorld = (dWorldID) worldID; + dVector3 dGravity; + dWorldGetGravity(ODEWorld,dGravity); + return Vector3f(dGravity[0],dGravity[1],dGravity[2]); } -salt::Vector3f ODEWorld::GetGravity() const +void ODEWorld::SetERP(float erp, long worldID) { - dVector3 dGravity; - dWorldGetGravity(mODEWorld,dGravity); - return Vector3f(dGravity[0],dGravity[1],dGravity[2]); + dWorldID ODEWorld = (dWorldID) worldID; + dWorldSetERP(ODEWorld, erp); } -void ODEWorld::SetERP(float erp) +float ODEWorld::GetERP(long worldID) const { - dWorldSetERP(mODEWorld, erp); + dWorldID ODEWorld = (dWorldID) worldID; + return dWorldGetERP(ODEWorld); } -float ODEWorld::GetERP() const +void ODEWorld::SetCFM(float cfm, long worldID) { - return dWorldGetERP(mODEWorld); + dWorldID ODEWorld = (dWorldID) worldID; + dWorldSetCFM(ODEWorld, cfm); } -void ODEWorld::SetCFM(float cfm) +float ODEWorld::GetCFM(long worldID) const { - dWorldSetCFM(mODEWorld, cfm); + dWorldID ODEWorld = (dWorldID) worldID; + return dWorldGetCFM(ODEWorld); } -float ODEWorld::GetCFM() const +void ODEWorld::Step(float deltaTime, long worldID) { - return dWorldGetCFM(mODEWorld); + dWorldID ODEWorld = (dWorldID) worldID; + dWorldStep(ODEWorld, deltaTime); } -void ODEWorld::Step(float deltaTime) +bool ODEWorld::GetAutoDisableFlag(long worldID) const { - dWorldStep(mODEWorld, deltaTime); + dWorldID ODEWorld = (dWorldID) worldID; + return (dWorldGetAutoDisableFlag(ODEWorld) == 1); } -bool ODEWorld::GetAutoDisableFlag() const +void ODEWorld::SetAutoDisableFlag(bool flag, long worldID) { - return (dWorldGetAutoDisableFlag(mODEWorld) == 1); + dWorldID ODEWorld = (dWorldID) worldID; + dWorldSetAutoDisableFlag(ODEWorld, static_cast<int>(flag)); } -void ODEWorld::SetAutoDisableFlag(bool flag) +void ODEWorld::SetContactSurfaceLayer(float depth, long worldID) { - dWorldSetAutoDisableFlag(mODEWorld, static_cast<int>(flag)); + dWorldID ODEWorld = (dWorldID) worldID; + dWorldSetContactSurfaceLayer(ODEWorld, depth); } -void ODEWorld::SetContactSurfaceLayer(float depth) +float ODEWorld::GetContactSurfaceLayer(long worldID) const { - dWorldSetContactSurfaceLayer(mODEWorld, depth); + dWorldID ODEWorld = (dWorldID) worldID; + return dWorldGetContactSurfaceLayer(ODEWorld); } -float ODEWorld::GetContactSurfaceLayer() const +long ODEWorld::CreateWorld() { - return dWorldGetContactSurfaceLayer(mODEWorld); + dWorldID ODEWorld = dWorldCreate(); + return (long) ODEWorld; } -void ODEWorld::CreateWorld() +void ODEWorld::DestroyWorld(long worldID) { - mODEWorld = dWorldCreate(); - mWorldID = (long) mODEWorld; + dWorldID ODEWorld = (dWorldID) worldID; + dWorldDestroy(ODEWorld); } - -void ODEWorld::DestroyWorld() -{ - dWorldDestroy(mODEWorld); - mWorldID = 0; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.h 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeworld.h 2010-01-26 11:23:42 UTC (rev 151) @@ -35,23 +35,19 @@ public: ODEWorld(); - long GetWorldID() const; - void SetGravity(const salt::Vector3f& gravity); - salt::Vector3f GetGravity() const; - void SetERP(float erp); - float GetERP() const; - void SetCFM(float cfm); - float GetCFM() const; - void Step(float deltaTime); - bool GetAutoDisableFlag() const; - void SetAutoDisableFlag(bool flag); - void SetContactSurfaceLayer(float depth); - float GetContactSurfaceLayer() const; - void CreateWorld(); - void DestroyWorld(); - -private: - dWorldID mODEWorld; + void SetGravity(const salt::Vector3f& gravity, long worldID); + salt::Vector3f GetGravity(long worldID) const; + void SetERP(float erp, long worldID); + float GetERP(long worldID) const; + void SetCFM(float cfm, long worldID); + float GetCFM(long worldID) const; + void Step(float deltaTime, long worldID); + bool GetAutoDisableFlag(long worldID) const; + void SetAutoDisableFlag(bool flag, long worldID); + void SetContactSurfaceLayer(float depth, long worldID); + float GetContactSurfaceLayer(long worldID) const; + long CreateWorld(); + void DestroyWorld(long worldID); }; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/world.cpp 2010-01-26 11:23:42 UTC (rev 151) @@ -39,69 +39,69 @@ long World::GetWorldID() const { - return mWorldImp->GetWorldID(); + return mWorldID; } void World::SetGravity(const Vector3f& gravity) { - mWorldImp->SetGravity(gravity); + mWorldImp->SetGravity(gravity, mWorldID); } salt::Vector3f World::GetGravity() const { - return mWorldImp->GetGravity(); + return mWorldImp->GetGravity(mWorldID); } void World::SetERP(float erp) { - mWorldImp->SetERP(erp); + mWorldImp->SetERP(erp, mWorldID); } float World::GetERP() const { - return mWorldImp->GetERP(); + return mWorldImp->GetERP(mWorldID); } void World::SetCFM(float cfm) { - mWorldImp->SetCFM(cfm); + mWorldImp->SetCFM(cfm, mWorldID); } float World::GetCFM() const { - return mWorldImp->GetCFM(); + return mWorldImp->GetCFM(mWorldID); } void World::Step(float deltaTime) { - mWorldImp->Step(deltaTime); + mWorldImp->Step(deltaTime, mWorldID); } bool World::GetAutoDisableFlag() const { - return mWorldImp->GetAutoDisableFlag(); + return mWorldImp->GetAutoDisableFlag(mWorldID); } void World::SetAutoDisableFlag(bool flag) { - mWorldImp->SetAutoDisableFlag(flag); + mWorldImp->SetAutoDisableFlag(flag, mWorldID); } void World::SetContactSurfaceLayer(float depth) { - mWorldImp->SetContactSurfaceLayer(depth); + mWorldImp->SetContactSurfaceLayer(depth, mWorldID); } float World::GetContactSurfaceLayer() const { - return mWorldImp->GetContactSurfaceLayer(); + return mWorldImp->GetContactSurfaceLayer(mWorldID); } bool World::ConstructInternal() { - mWorldImp->CreateWorld(); + mWorldID = mWorldImp->CreateWorld(); - return (mWorldImp->GetWorldID() != 0); + return (mWorldID != 0); } void World::DestroyPhysicsObject() @@ -120,12 +120,13 @@ space->DestroyPhysicsObject(); } - if (mWorldImp->GetWorldID() == 0) + if (mWorldID == 0) { return; } - mWorldImp->DestroyWorld(); + mWorldImp->DestroyWorld(mWorldID); + mWorldID = 0; recurseLock = false; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/world.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/world.h 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/lib/oxygen/physicsserver/world.h 2010-01-26 11:23:42 UTC (rev 151) @@ -122,6 +122,9 @@ the desired physics engine. */ boost::shared_ptr<WorldInt> mWorldImp; + + /** The ID of the managed physics world */ + long mWorldID; }; DECLARE_CLASS(World); Modified: branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.cpp =================================================================== --- branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.cpp 2010-01-18 19:59:05 UTC (rev 150) +++ branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.cpp 2010-01-26 11:23:42 UTC (rev 151) @@ -79,7 +79,7 @@ return; mContactJointHandlerImp->CalcSurfaceParam( - contact, handler->GetSurfaceParameter()); + contact, handler->GetSurfaceParameter(), mSurfaceParameter); // create the contact joint and attach it to the body long joint = mContactJointHandlerImp->CreateContactJoint( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-01-18 19:59:15
|
Revision: 150 http://simspark.svn.sourceforge.net/simspark/?rev=150&view=rev Author: hedayat Date: 2010-01-18 19:59:05 +0000 (Mon, 18 Jan 2010) Log Message: ----------- RCSSServer3D 0.6.3 Release Added Paths: ----------- tags/RCSSSERVER3D_0.6.3_RELEASE/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-01-18 19:24:19
|
Revision: 149 http://simspark.svn.sourceforge.net/simspark/?rev=149&view=rev Author: hedayat Date: 2010-01-18 19:23:56 +0000 (Mon, 18 Jan 2010) Log Message: ----------- SimSpark 0.2 Release Added Paths: ----------- tags/SIMSPARK_0.2_RELEASE/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-01-18 18:36:44
|
Revision: 148 http://simspark.svn.sourceforge.net/simspark/?rev=148&view=rev Author: hedayat Date: 2010-01-18 18:36:24 +0000 (Mon, 18 Jan 2010) Log Message: ----------- Fix windows uninstaller to remove rcssserver3d files (rather than simspark) Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/windows/uninstall_extra.nsi Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2010-01-17 10:43:35 UTC (rev 147) +++ trunk/rcssserver3d/ChangeLog 2010-01-18 18:36:24 UTC (rev 148) @@ -1,3 +1,8 @@ +2010-01-18 Hedayat Vatankhah <he...@gr...> + + * windows/uninstall_extra.nsi: + - rename: simspark -> rcssserver3d + 2010-01-17 Hedayat Vatankhah <he...@gr...> * doc/users/gettingstarted.tex: Modified: trunk/rcssserver3d/windows/uninstall_extra.nsi =================================================================== --- trunk/rcssserver3d/windows/uninstall_extra.nsi 2010-01-17 10:43:35 UTC (rev 147) +++ trunk/rcssserver3d/windows/uninstall_extra.nsi 2010-01-18 18:36:24 UTC (rev 148) @@ -1,4 +1,4 @@ -Delete '$INSTDIR\bin\simspark.cmd' +Delete '$INSTDIR\bin\rcssserver3d.cmd' Delete '$INSTDIR\bin\rcssmonitor3d.cmd' Delete '$INSTDIR\bin\rcssagent3d.cmd' DeleteRegValue HKLM 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' 'RCSSSERVER3D_DIR' @@ -6,5 +6,5 @@ Var /GLOBAL STARTMENU_DIR_FORLINKS !insertmacro MUI_STARTMENU_GETFOLDER Application $STARTMENU_DIR_FORLINKS -Delete "$SMPROGRAMS\$STARTMENU_DIR_FORLINKS\Simspark.lnk" +Delete "$SMPROGRAMS\$STARTMENU_DIR_FORLINKS\RCSSServer3D.lnk" Delete "$SMPROGRAMS\$STARTMENU_DIR_FORLINKS\RCSSMonitor3D.lnk" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-01-17 10:43:41
|
Revision: 147 http://simspark.svn.sourceforge.net/simspark/?rev=147&view=rev Author: hedayat Date: 2010-01-17 10:43:35 +0000 (Sun, 17 Jan 2010) Log Message: ----------- Bumped Kerosin's major version because of Sander's rendering fixes Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2010-01-17 09:30:24 UTC (rev 146) +++ trunk/spark/CMakeLists.txt 2010-01-17 10:43:35 UTC (rev 147) @@ -147,7 +147,7 @@ set(OXYGEN_SO_VERSION 3) set(OXYGEN_VERSION ${OXYGEN_SO_VERSION}.3.0) set(KEROSIN_SO_VERSION 1) -set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.0.2) +set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.1.0) set(SPARK_SO_VERSION 0) set(SPARK_VERSION ${SPARK_SO_VERSION}.0.0) set(RCSSNET_SO_VERSION 0) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2010-01-17 09:30:24 UTC (rev 146) +++ trunk/spark/ChangeLog 2010-01-17 10:43:35 UTC (rev 147) @@ -11,7 +11,7 @@ - add required third party .dlls on windows to simspark rather than rcssserver3d, which will be installed in lib/thirdparty directory. ruby dlls will be included too. - - bumped library major versions: zeitgeist, oxygen and rcssnet + - bumped library major versions: zeitgeist, oxygen, kerosin and rcssnet - bumped package version to 0.2 2010-01-01 Hedayat Vatankhah <he...@gr...> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-01-17 09:30:32
|
Revision: 146 http://simspark.svn.sourceforge.net/simspark/?rev=146&view=rev Author: hedayat Date: 2010-01-17 09:30:24 +0000 (Sun, 17 Jan 2010) Log Message: ----------- Updated some documentation Updated simspark release notes and NEWS file Bumped simspark package and library versions Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/doc/users/definitions.tex trunk/rcssserver3d/doc/users/gettingstarted.tex trunk/rcssserver3d/doc/users/simulations.tex trunk/rcssserver3d/doc/users/user-manual.tex trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/NEWS trunk/spark/RELEASE Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2010-01-16 23:52:20 UTC (rev 145) +++ trunk/rcssserver3d/ChangeLog 2010-01-17 09:30:24 UTC (rev 146) @@ -1,5 +1,10 @@ 2010-01-17 Hedayat Vatankhah <he...@gr...> + * doc/users/gettingstarted.tex: + * doc/users/simulations.tex: + * doc/users/user-manual.tex: + - updated to reflect some new changes + * RELEASE: * NEWS: - preparing for a new release Modified: trunk/rcssserver3d/doc/users/definitions.tex =================================================================== --- trunk/rcssserver3d/doc/users/definitions.tex 2010-01-16 23:52:20 UTC (rev 145) +++ trunk/rcssserver3d/doc/users/definitions.tex 2010-01-17 09:30:24 UTC (rev 146) @@ -128,7 +128,7 @@ \vspace*{-0.25cm} \hspace*{-3cm}% \begin{minipage}[b]{3cm} - \textsf{\Large\flushleft{February 2009}} + \textsf{\Large\flushleft{January 2010}} \end{minipage} \end{titlepage}% Modified: trunk/rcssserver3d/doc/users/gettingstarted.tex =================================================================== --- trunk/rcssserver3d/doc/users/gettingstarted.tex 2010-01-16 23:52:20 UTC (rev 145) +++ trunk/rcssserver3d/doc/users/gettingstarted.tex 2010-01-17 09:30:24 UTC (rev 146) @@ -5,8 +5,6 @@ \section{Download and Installation Instructions} \label{section:install} -%Currently the simspark SVN builds only for Linux (the Win32 build system is not yet ported/tested, so we should focus on *nix systems. - This chapter explains how to install SimSpark on an Ubuntu Linux. It should work with slight modifications on other distributions like Fedora, Suse and especially Debian system\footnote{For more guides please visit Simspark Wiki: @@ -50,18 +48,21 @@ \begin{enumerate} \item Ruby \item The Open Dynamics Engine (ODE) -\item The boost C++ libraries +\item The Boost C++ Libraries +\item Freetype +\item Developer Image Library (DevIL) +\item OpenGL +\item SDL \end{enumerate} -The rendering of SimSpark can be omitted from the build process +Some parts of SimSpark can be omitted from the build process therefore these packages are optional: \begin{enumerate} -\item OpenGL -\item SDL -\item Freetype -\item Developer Image Library (DevIL) -\item Tiff library (libtiff) +\item wxWidgets Library +\item FMOD Sound Library +\item Latex (pdflatex): to generate developers manual +\item Doxygen: to generate API documentation \end{enumerate} \texttt{\$ sudo apt-get install g++ subversion cmake libfreetype6-dev libode0-dev libsdl-dev ruby1.8 ruby1.8-dev libdevil-dev libboost-dev libboost-thread-dev libboost-regex-dev} @@ -145,7 +146,7 @@ \item Run the simulation -\texttt{\$ simspark} +\texttt{\$ rcsoccersim3d} \item Optionally @@ -197,7 +198,7 @@ \item{Start the Server} The first step is to start the simulation server. To do this type -\texttt{simspark} on the console. The server is by default configured +\texttt{rcssserver3d} on the console. The server is by default configured to run without internal monitor support and to start the soccer simulation. @@ -206,7 +207,7 @@ \begin{verbatim} -simspark, a monolithic simulator 0.1 +rcssserver3d, a monolithic simulator 0.6.x Copyright (C) 2004 Markus Rollmann, Universit�t Koblenz. Copyright (C) 2004, The RoboCup Soccer Server Maintenance Group. Modified: trunk/rcssserver3d/doc/users/simulations.tex =================================================================== --- trunk/rcssserver3d/doc/users/simulations.tex 2010-01-16 23:52:20 UTC (rev 145) +++ trunk/rcssserver3d/doc/users/simulations.tex 2010-01-17 09:30:24 UTC (rev 146) @@ -9,7 +9,7 @@ \subsection{Overview} -We implemented a simulation for SimSpark where two teams of up to 5 +We implemented a simulation for SimSpark where two teams of up to 6 humanoid robots play soccer against each other. This seemingly simple setup poses a challenge to agent implementers on several levels. @@ -48,12 +48,12 @@ \subsection{Environment and Objects on the Field} -The dimensions of the soccer field are 50 by 32 meters. The center -spot has a radius of 4.5 meters. Each goal is 9 by 2 meter with a -height of 4 meters. The soccer field is surrounded by a border of 10 +The dimensions of the soccer field are 18 by 12 meters. The center +spot has a radius of 4.5 meters. Each goal is 2.1 by 0.6 meter with a +height of 0.8 meters. The soccer field is surrounded by a border of 10 meters in each direction. Space outside this border area is not -reachable by an agent. The soccer ball has a radius of 0.4 meter and a -mass of 430 gram. +reachable by an agent. The soccer ball has a radius of 0.04 meter and a +mass of 26 grams. At each corner of the soccer field, and at the goal posts, a distinctive flag is placed. The positions of these flags are fixed and known to Modified: trunk/rcssserver3d/doc/users/user-manual.tex =================================================================== --- trunk/rcssserver3d/doc/users/user-manual.tex 2010-01-16 23:52:20 UTC (rev 145) +++ trunk/rcssserver3d/doc/users/user-manual.tex 2010-01-17 09:30:24 UTC (rev 146) @@ -4,7 +4,7 @@ \\ Feng Xue \\ Marian Buchta \\ Hedayat Vatankhah} \title{Simspark User Manual} -\date{February 2009} +\date{January 2010} \begin{document} Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2010-01-16 23:52:20 UTC (rev 145) +++ trunk/spark/CMakeLists.txt 2010-01-17 09:30:24 UTC (rev 146) @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(simspark CXX C) -set(PACKAGE_VERSION "0.1.2") +set(PACKAGE_VERSION "0.2") ########## check for headerfiles/libraries ########## include(CheckIncludeFile) @@ -143,15 +143,15 @@ set(SALT_SO_VERSION 0) set(SALT_VERSION ${SALT_SO_VERSION}.3.2) set(ZEITGEIST_SO_VERSION 3) -set(ZEITGEIST_VERSION ${ZEITGEIST_SO_VERSION}.0.2) +set(ZEITGEIST_VERSION ${ZEITGEIST_SO_VERSION}.1.0) set(OXYGEN_SO_VERSION 3) -set(OXYGEN_VERSION ${OXYGEN_SO_VERSION}.2.4) +set(OXYGEN_VERSION ${OXYGEN_SO_VERSION}.3.0) set(KEROSIN_SO_VERSION 1) set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.0.2) set(SPARK_SO_VERSION 0) set(SPARK_VERSION ${SPARK_SO_VERSION}.0.0) set(RCSSNET_SO_VERSION 0) -set(RCSSNET_VERSION ${RCSSNET_SO_VERSION}.0.0) +set(RCSSNET_VERSION ${RCSSNET_SO_VERSION}.1.0) ########## additional variables for -config scripts ########## set(prefix ${CMAKE_INSTALL_PREFIX}) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2010-01-16 23:52:20 UTC (rev 145) +++ trunk/spark/ChangeLog 2010-01-17 09:30:24 UTC (rev 146) @@ -1,5 +1,9 @@ 2010-01-17 Hedayat Vatankhah <he...@gr...> + * NEWS: + * RELEASE: + - preparing for the new release (0.2) + * lib/oxygen/proxyserver/agentproxy.cpp: - added a temporary workaround to allow compilation under windows @@ -7,6 +11,8 @@ - add required third party .dlls on windows to simspark rather than rcssserver3d, which will be installed in lib/thirdparty directory. ruby dlls will be included too. + - bumped library major versions: zeitgeist, oxygen and rcssnet + - bumped package version to 0.2 2010-01-01 Hedayat Vatankhah <he...@gr...> Modified: trunk/spark/NEWS =================================================================== --- trunk/spark/NEWS 2010-01-16 23:52:20 UTC (rev 145) +++ trunk/spark/NEWS 2010-01-17 09:30:24 UTC (rev 146) @@ -1,3 +1,37 @@ +[0.2] +In this release you can find some bug and compilation fixes, improved Windows +support and some new features including a new sensor and features to facilitate +agent debugging and development. It also provides a more deterministic behavior +for agents which should make them more reliable. + +* New features: + - An Accelerometer sensor which reports the linear acceleration + - A "Sync Mode" operation is introduced. In this mode, the server will not + advance to the next cycle until all connected agents send a "(syn)" command + to the server. You can use this mode by setting "agentSyncMode" to true in + simspark.rb (or spark.rb) + - Simulator will run in simulation time mode instead of real time + if "useRealTime" variable is set to false in simspark.rb (or spark.rb) + +* More deterministic agent-server communication + - Simspark will now collect received commands right before sending + sense data of the last cycle. So, any commands which is sent by agents + after receiving new sense data will be executed in the next cycle, not the + current one. This results in a more deterministic behavior, and agents' + efficiency should not change between remote and local runs considerably. + +* More convenience: + - Simspark should always accept connections. No more "Connection refused" + messages and the need to wait for simspark's network port to be freed! + - To make changes to most of the resource files (e.g. simspark.rb), you can + create a copy in ~/.simspark directory and make desired changes there. The + directory structure of the original files should be preserved (e.g. + rsg/agent/nao/nao.rgs) + +* Fixes: + - Compilation fixes + - Fixed some rendering bugs (agents not visible through goals) + [0.1.2] This release brings some bugfixes, better performance and also better Windows support. A Windows installer will be available too. This is the first version Modified: trunk/spark/RELEASE =================================================================== --- trunk/spark/RELEASE 2010-01-16 23:52:20 UTC (rev 145) +++ trunk/spark/RELEASE 2010-01-17 09:30:24 UTC (rev 146) @@ -1,29 +1,37 @@ -RELEASE News of simspark-0.1.3 (in progress) +RELEASE News of simspark-0.2 -SOME INTERESTING COMMENTS! +In this release you can find some bug and compilation fixes, improved Windows +support and some new features including a new sensor and features to facilitate +agent debugging and development. It also provides a more deterministic behavior +for agents which should make them more reliable. -Main changes of this release are: - - Compilation fixes - - Improved Windows support - - Simspark should always accept connections. No more "Connection refused" - messages and the need to wait for simspark's network port to be freed! +* New features: + - An Accelerometer sensor which reports the linear acceleration + - A "Sync Mode" operation is introduced. In this mode, the server will not + advance to the next cycle until all connected agents send a "(syn)" command + to the server. You can use this mode by setting "agentSyncMode" to true in + simspark.rb (or spark.rb) + - Simulator will run in simulation time mode instead of real time + if "useRealTime" variable is set to false in simspark.rb (or spark.rb) + +* More deterministic agent-server communication - Simspark will now collect received commands right before sending sense data of the last cycle. So, any commands which is sent by agents after receiving new sense data will be executed in the next cycle, not the current one. This results in a more deterministic behavior, and agents' efficiency should not change between remote and local runs considerably. - - An Accelerometer sensor - - Fixed some rendering bugs (agents not visible through goals) - - A "Sync Mode" operation is introduced. In this mode, the server will not - advance to the next cycle untill all connected agents send a "(syn)" command - to the server. You can use this mode by setting "agentSyncMode" to true in - simspark.rb (or spark.rb) - - Simulator will run in simulation time mode instead of real time - if "useRealTime" variable is set to false in simspark.rb (or spark.rb) + +* More convenience: + - Simspark should always accept connections. No more "Connection refused" + messages and the need to wait for simspark's network port to be freed! - To make changes to most of the resource files (e.g. simspark.rb), you can create a copy in ~/.simspark directory and make desired changes there. The directory structure of the original files should be preserved (e.g. rsg/agent/nao/nao.rgs) +* Fixes: + - Compilation fixes + - Fixed some rendering bugs (agents not visible through goals) + You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-01-16 23:52:27
|
Revision: 145 http://simspark.svn.sourceforge.net/simspark/?rev=145&view=rev Author: hedayat Date: 2010-01-16 23:52:20 +0000 (Sat, 16 Jan 2010) Log Message: ----------- A temporary workaround to allow agentproxy to be compiled on Windows Added third party libraries including ruby to the Windows installer Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2010-01-16 23:45:06 UTC (rev 144) +++ trunk/spark/CMakeLists.txt 2010-01-16 23:52:20 UTC (rev 145) @@ -190,6 +190,35 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sparkconfig.h DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}) +if (WIN32) # try to find and install third-party .dlls to lib/thirdparty directory + set(THLIBDIR ${LIBDIR}/thirdparty) + + string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" ODEDLL "${ODE_LIBRARY}") + if (EXISTS ${ODEDLL}) + install(PROGRAMS ${ODEDLL} DESTINATION ${THLIBDIR}) + endif (EXISTS ${ODEDLL}) + + install(DIRECTORY "${Boost_LIBRARY_DIRS}/" DESTINATION ${THLIBDIR} + FILES_MATCHING PATTERN "*.dll") + + string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" DevIL_DLL "${DevIL_LIBRARY_IL}") + if (EXISTS ${DevIL_DLL}) + install(PROGRAMS ${DevIL_DLL} DESTINATION ${THLIBDIR}) + endif (EXISTS ${DevIL_DLL}) + + string(REGEX REPLACE "(.*)/ruby.exe" "\\1/" RUBY_BINDIR "${RUBY_EXECUTABLE}") + install(DIRECTORY "${RUBY_BINDIR}" + DESTINATION ${THLIBDIR} FILES_MATCHING PATTERN "*.dll") + + install(DIRECTORY "${FREETYPE_INCLUDE_DIR_ft2build}/../bin/" + DESTINATION ${THLIBDIR} FILES_MATCHING PATTERN "*.dll") + + set(SDL_DLL "${SDL_INCLUDE_DIR}/../lib/sdl.dll") + if (EXISTS ${SDL_DLL}) + install(PROGRAMS ${SDL_DLL} DESTINATION ${THLIBDIR}) + endif (EXISTS ${SDL_DLL}) +endif (WIN32) + ########### uninstall support ############ CONFIGURE_FILE( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2010-01-16 23:45:06 UTC (rev 144) +++ trunk/spark/ChangeLog 2010-01-16 23:52:20 UTC (rev 145) @@ -1,3 +1,13 @@ +2010-01-17 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/proxyserver/agentproxy.cpp: + - added a temporary workaround to allow compilation under windows + + * CMakeLists.txt: + - add required third party .dlls on windows to simspark rather than + rcssserver3d, which will be installed in lib/thirdparty directory. + ruby dlls will be included too. + 2010-01-01 Hedayat Vatankhah <he...@gr...> * lib/oxygen/proxyserver/proxyserver.h: Modified: trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp =================================================================== --- trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp 2010-01-16 23:45:06 UTC (rev 144) +++ trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp 2010-01-16 23:52:20 UTC (rev 145) @@ -28,6 +28,12 @@ #include <sys/socket.h> #endif +#ifndef EAGAIN +// FIXME: This is only a workaround, and doesn't work fine. +#define EAGAIN 0 +#define MSG_DONTWAIT 0 +#endif + using namespace oxygen; using namespace zeitgeist; using namespace std; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-01-16 23:45:28
|
Revision: 144 http://simspark.svn.sourceforge.net/simspark/?rev=144&view=rev Author: hedayat Date: 2010-01-16 23:45:06 +0000 (Sat, 16 Jan 2010) Log Message: ----------- Preparing for a new release Removed installation of third party libraries under Windows (now done by simspark) Simspark -> rcssserver3d for Windows installer Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/NEWS trunk/rcssserver3d/RELEASE trunk/rcssserver3d/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/windows/install_extra.nsi Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2010-01-14 09:15:14 UTC (rev 143) +++ trunk/rcssserver3d/CMakeLists.txt 2010-01-16 23:45:06 UTC (rev 144) @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(rcssserver3d CXX C) -set(PACKAGE_VERSION "0.6.2") +set(PACKAGE_VERSION "0.6.3") ########## check for headerfiles/libraries ########## include(CheckIncludeFile) @@ -86,29 +86,6 @@ install(FILES ${CMAKE_BINARY_DIR}/rcssserver3d_config.h DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}) -if (WIN32) # try to find and install third-party .dlls to bin/ directory - string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" ODEDLL "${ODE_LIBRARY}") - if (EXISTS ${ODEDLL}) - install(PROGRAMS ${ODEDLL} DESTINATION ${BINDIR}) - endif (EXISTS ${ODEDLL}) - - install(DIRECTORY "${Boost_LIBRARY_DIRS}/" DESTINATION ${BINDIR} - FILES_MATCHING PATTERN "*.dll") - - string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" DevIL_DLL "${DevIL_LIBRARY_IL}") - if (EXISTS ${DevIL_DLL}) - install(PROGRAMS ${DevIL_DLL} DESTINATION ${BINDIR}) - endif (EXISTS ${DevIL_DLL}) - - install(DIRECTORY "${FREETYPE_INCLUDE_DIR_ft2build}/../bin/" DESTINATION ${BINDIR} - FILES_MATCHING PATTERN "*.dll") - - set(SDL_DLL "${SDL_INCLUDE_DIR}/../lib/sdl.dll") - if (EXISTS ${SDL_DLL}) - install(PROGRAMS ${SDL_DLL} DESTINATION ${BINDIR}) - endif (EXISTS ${SDL_DLL}) -endif (WIN32) - ########### uninstall support ############ CONFIGURE_FILE( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2010-01-14 09:15:14 UTC (rev 143) +++ trunk/rcssserver3d/ChangeLog 2010-01-16 23:45:06 UTC (rev 144) @@ -1,3 +1,21 @@ +2010-01-17 Hedayat Vatankhah <he...@gr...> + + * RELEASE: + * NEWS: + - preparing for a new release + + * CMakeLists.txt: + - removed installation of third party libraries. these are now included + in simspark package. + - bumped package version to 0.6.3 + + * windows/install_extra.nsi: + - use rcssserver3d instead of simspark. + - added thirdparty library path to the path + + * rcssserver3d/CMakeLists.txt: + - do not install shell scripts and symbolic links on Windows + 2010-01-11 Hedayat Vatankhah <he...@gr...> * RELEASE: Modified: trunk/rcssserver3d/NEWS =================================================================== --- trunk/rcssserver3d/NEWS 2010-01-14 09:15:14 UTC (rev 143) +++ trunk/rcssserver3d/NEWS 2010-01-16 23:45:06 UTC (rev 144) @@ -1,3 +1,33 @@ +[0.6.3] +In this release, we are preparing for a simulation with more robots than before. +The current target is to have 6 vs 6 games, so we have made some changes to +make the simulator more suitable for it. The most notable changes made in +rcssserver3d package in this direction are: +1. Disabling the internal monitor by default: starting from this version, the +simulation server (simspark binary, now called rcssserver3d) no longer brings +up a monitor when run. To actually view the simulation, a monitor (e.g. +rcsmonitor3d which is included in this package) should be run separately. This +separation noticeably improves the performance of the server. A new executable +called "rcsoccersim3d" is provided which runs both the simulation server and a +monitor on the local machine. +2. Bigger field: in this version, field dimensions and goal width are 1.5 times +larger than before to provide enough area for 6 vs 6 games. + +* New names: + - rcssserver3d: the old simspark binary has been renamed to rcssserver3d, as + it more clearly shows the functionality of the simulator. A symbolic link + called simspark is provided for compatibility. + - rcsoccersim3d: as stated above, running rcssserver3d (formerly simspark) + no longer starts a monitor to view the simulation, and a monitor should be + run separately. For users' convenience a new executable called rcsoccersim3d + is provided which runs both rcssserver3d and rcssmonitor3 to connect to + the running simulator. + +* Other notable changes: + - Added HMDP effector/perceptor + - Some compilation fixes + - Improved Windows support + [0.6.2] This release is mainly a bug-fix release, and is the last release before RoboCup 2009 competitions. Modified: trunk/rcssserver3d/RELEASE =================================================================== --- trunk/rcssserver3d/RELEASE 2010-01-14 09:15:14 UTC (rev 143) +++ trunk/rcssserver3d/RELEASE 2010-01-16 23:45:06 UTC (rev 144) @@ -1,10 +1,30 @@ -RELEASE News of rcssserver3d-0.6.3 (In progress) +RELEASE News of rcssserver3d-0.6.3 -* Most notable changes: - - Name change: simspark -> rcssserver3d. To make the functionality more clear. - - No internal monitor by default. Run rcssmonitor3d separately to see the game. - As another option, you might run rcsoccersim3d which runs both - rcssserver3d (simspark) and rcssmonitor3d on the local machine. +In this release, we are preparing for a simulation with more robots than before. +The current target is to have 6 vs 6 games, so we have made some changes to +make the simulator more suitable for it. The most notable changes made in +rcssserver3d package in this direction are: +1. Disabling the internal monitor by default: starting from this version, the +simulation server (simspark binary, now called rcssserver3d) no longer brings +up a monitor when run. To actually view the simulation, a monitor (e.g. +rcsmonitor3d which is included in this package) should be run separately. This +separation noticeably improves the performance of the server. A new executable +called "rcsoccersim3d" is provided which runs both the simulation server and a +monitor on the local machine. +2. Bigger field: in this version, field dimensions and goal width are 1.5 times +larger than before to provide enough area for 6 vs 6 games. + +* New names: + - rcssserver3d: the old simspark binary has been renamed to rcssserver3d, as + it more clearly shows the functionality of the simulator. A symbolic link + called simspark is provided for compatibility. + - rcsoccersim3d: as stated above, running rcssserver3d (formerly simspark) + no longer starts a monitor to view the simulation, and a monitor should be + run separately. For users' convenience a new executable called rcsoccersim3d + is provided which runs both rcssserver3d and rcssmonitor3 to connect to + the running simulator. + +* Other notable changes: - Added HMDP effector/perceptor - Some compilation fixes - Improved Windows support Modified: trunk/rcssserver3d/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/rcssserver3d/CMakeLists.txt 2010-01-14 09:15:14 UTC (rev 143) +++ trunk/rcssserver3d/rcssserver3d/CMakeLists.txt 2010-01-16 23:45:06 UTC (rev 144) @@ -32,7 +32,9 @@ internalsoccermonitor.rb internalsoccerbindings.rb DESTINATION ${DATADIR}/${CMAKE_PROJECT_NAME}) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rcsoccersim3d +if (NOT WIN32) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rcsoccersim3d ${CMAKE_CURRENT_BINARY_DIR}/simspark DESTINATION ${BINDIR} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) +endif (NOT WIN32) \ No newline at end of file Modified: trunk/rcssserver3d/windows/install_extra.nsi =================================================================== --- trunk/rcssserver3d/windows/install_extra.nsi 2010-01-14 09:15:14 UTC (rev 143) +++ trunk/rcssserver3d/windows/install_extra.nsi 2010-01-16 23:45:06 UTC (rev 144) @@ -1,24 +1,24 @@ -CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Simspark.lnk" "$INSTDIR\bin\simspark.cmd" +CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\RCSSServer3D.lnk" "$INSTDIR\bin\rcssserver3d.cmd" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\RCSSMonitor3D.lnk" "$INSTDIR\bin\rcssmonitor3d.cmd" !insertmacro MUI_STARTMENU_WRITE_END !define MUI_STARTMENUPAGE_CURRENT_ID "SOMETHING_NOT_AVAILABLE" WriteRegExpandStr HKLM 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' 'RCSSSERVER3D_DIR' '$INSTDIR' ClearErrors -FileOpen $0 $INSTDIR\bin\simspark.cmd w -FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' +FileOpen $0 $INSTDIR\bin\rcssserver3d.cmd w +FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%SPARK_DIR%\lib\thirdparty;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' FileWrite $0 'cd "%RCSSSERVER3D_DIR%\bin\"$\n' -FileWrite $0 'simspark.exe %1 %2 %3 %4' +FileWrite $0 'rcssserver3d.exe %1 %2 %3 %4' FileClose $0 ClearErrors FileOpen $0 $INSTDIR\bin\rcssmonitor3d.cmd w -FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' +FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%SPARK_DIR%\lib\thirdparty;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' FileWrite $0 'cd "%RCSSSERVER3D_DIR%\bin\"$\n' FileWrite $0 'rcssmonitor3d.exe %1 %2 %3 %4' FileClose $0 ClearErrors FileOpen $0 $INSTDIR\bin\rcssagent3d.cmd w -FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' +FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%SPARK_DIR%\lib\thirdparty;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' FileWrite $0 'cd "%RCSSSERVER3D_DIR%\bin\"$\n' FileWrite $0 'rcssagent3d.exe %1 %2 %3 %4' FileClose $0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-01-14 09:15:21
|
Revision: 143 http://simspark.svn.sourceforge.net/simspark/?rev=143&view=rev Author: a-held Date: 2010-01-14 09:15:14 +0000 (Thu, 14 Jan 2010) Log Message: ----------- Completed bridge pattern for Space class Completed Abstract Physics Layer! :-) Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.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/space.cpp branches/multiphys/spark/lib/oxygen/physicsserver/space.h branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods_ode.cpp Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h 2010-01-13 13:21:31 UTC (rev 142) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/spaceint.h 2010-01-14 09:15:14 UTC (rev 143) @@ -25,39 +25,33 @@ #include <set> #include <oxygen/oxygen_defines.h> +#include <oxygen/physicsserver/genericphysicsobjects.h> namespace oxygen { class Transform; class RigidBody; class Collider; -class Scene; +class Space; class OXYGEN_API SpaceInt { public: - typedef std::set<dSpaceID> TSpaceIdSet; - - //virtual void collisionNearCallback (void *data, dGeomID obj1, dGeomID obj2) = 0; - virtual long GetSpaceID() const = 0; - virtual dJointGroupID GetODEJointGroup() const = 0; - virtual void Collide() = 0; - virtual void DestroyPhysicsObject() = 0; - virtual long GetParentSpaceID() = 0; - virtual bool IsGlobalSpace() = 0; - virtual void DisableInnerCollision(bool disable) = 0; - virtual bool GetDisableInnerCollision() const = 0; - virtual void OnUnlink() = 0; - virtual void OnLink() = 0; - virtual void Collide(dSpaceID space) = 0; - virtual void HandleCollide(dGeomID obj1, dGeomID obj2) = 0; - virtual void HandleSpaceCollide(dGeomID obj1, dGeomID obj2) = 0; - virtual bool ConstructInternal() = 0; - virtual void PostPhysicsUpdateInternal() = 0; - virtual void DestroySpaceObjects() = 0; - - boost::shared_ptr<Scene> scene; + virtual long CreateSpace(long spaceID) = 0; + virtual void DestroySpace(long contactGroup, long spaceID) = 0; + virtual long GetParentSpaceID(long spaceID) = 0; + virtual void Collide(long space, Space* callee) = 0; + virtual void Collide2(long obj1, long obj2, Space* callee) = 0; + virtual long ConstructInternal() = 0; + virtual void PostPhysicsUpdateInternal(long contactGroup) = 0; + virtual bool ObjectIsSpace(long objectID) = 0; + virtual long FetchBody(long geomID) = 0; + virtual long FetchSpace(long geomID) = 0; + virtual bool AreConnectedWithJoint(long bodyID1, long bodyID2) = 0; + virtual void CollideInternal(boost::shared_ptr<Collider> collider, + boost::shared_ptr<Collider> collidee, + long geomID1, long geomID2) = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.cpp 2010-01-13 13:21:31 UTC (rev 142) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.cpp 2010-01-14 09:15:14 UTC (rev 143) @@ -24,119 +24,107 @@ #include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/space.h> #include <oxygen/sceneserver/scene.h> -#include <zeitgeist/logserver/logserver.h> using namespace boost; using namespace oxygen; -/** set of spaces with disabled inner collision */ -ODESpace::TSpaceIdSet ODESpace::gDisabledInnerCollisionSet; - -//void ODESpace::collisionNearCallback (void *data, dGeomID obj1, dGeomID obj2) -//{ - // Space *space = (Space*)data; - // space->HandleCollide(obj1, obj2); -//} - -ODESpace::ODESpace() : ODEPhysicsObject(), mODESpace(0), mODEContactGroup(0) +void ODESpace::collisionNearCallback(void* data, dGeomID obj1, dGeomID obj2) { + Space* space = (Space*) data; + space->HandleCollide((long) obj1, (long) obj2); } -long ODESpace::GetSpaceID() const +ODESpace::ODESpace() : ODEPhysicsObject() { - return (long) mODESpace; } -dJointGroupID ODESpace::GetODEJointGroup() const +void ODESpace::Collide(long space, Space* callee) { - return mODEContactGroup; + dSpaceID ODESpace = (dSpaceID) space; + dSpaceCollide(ODESpace, callee, collisionNearCallback); } -void ODESpace::Collide() +void ODESpace::Collide2(long obj1, long obj2, Space* callee) { - // bind collision callback function to this object - Collide(mODESpace); + dGeomID ODEObj1 = (dGeomID) obj1; + dGeomID ODEObj2 = (dGeomID) obj2; + dSpaceCollide2(ODEObj1, ODEObj2, callee, &collisionNearCallback); } -void ODESpace::Collide(dSpaceID space) +long ODESpace::GetParentSpaceID(long spaceID) { - if (gDisabledInnerCollisionSet.find(space) == gDisabledInnerCollisionSet.end()) - { - //dSpaceCollide(space, this, Space::collisionNearCallback); - } + dGeomID ODESpace = (dGeomID) spaceID; + dSpaceID parentSpace = dGeomGetSpace(ODESpace); + return (long) parentSpace; } -void ODESpace::HandleSpaceCollide(dGeomID obj1, dGeomID obj2) +long ODESpace::ConstructInternal() { - // collide all geoms internal to the space(s) - //dSpaceCollide2 (obj1,obj2,this,&Space::collisionNearCallback); + // create a joint group for the contacts + dJointGroupID ODEContactGroup = dJointGroupCreate(0); - if (dGeomIsSpace (obj1)) - { - Collide((dSpaceID)obj1); - } + return (long) ODEContactGroup; +} - if (dGeomIsSpace (obj2)) - { - Collide((dSpaceID)obj2); - } +void ODESpace::PostPhysicsUpdateInternal(long contactGroup) +{ + dJointGroupID ODEContactGroup = (dJointGroupID) contactGroup; + // remove all contact joints + dJointGroupEmpty(ODEContactGroup); } -void ODESpace::HandleCollide(dGeomID obj1, dGeomID obj2) +long ODESpace::CreateSpace(long spaceID){ + dSpaceID ODESpace = (dSpaceID) spaceID; + dSpaceID CreatedSpace = dHashSpaceCreate(ODESpace); + return (long) CreatedSpace; +} + +void ODESpace::DestroySpace(long contactGroup, long spaceID) { - if ( - (dGeomIsSpace (obj1)) || - (dGeomIsSpace (obj2)) - ) + dJointGroupID ODEContactGroup = (dJointGroupID) contactGroup; + dSpaceID ODESpace = (dSpaceID) spaceID; + + if (ODEContactGroup) { - // colliding a space with something - HandleSpaceCollide(obj1, obj2); - return; + dJointGroupDestroy(ODEContactGroup); } - // colliding two non-space geoms; reject collisions - // between bodies that are connected with joints - const dBodyID b1 = dGeomGetBody(obj1); - const dBodyID b2 = dGeomGetBody(obj2); + // release the ODE space + dSpaceDestroy(ODESpace); +} - if ( - (b1) && (b2) && - (dAreConnectedExcluding(b1,b2,dJointTypeContact)) - ) - { - return; - } +bool ODESpace::ObjectIsSpace(long objectID){ + dGeomID ODEGeom = (dGeomID) objectID; + return dGeomIsSpace(ODEGeom); +} - // if obj1 and obj2 are in a space that disabled inner collision, - // reject the collision - const dSpaceID s1 = dGeomGetSpace(obj1); - const dSpaceID s2 = dGeomGetSpace(obj2); +long ODESpace::FetchBody(long geomID){ + dGeomID ODEGeom = (dGeomID) geomID; + dBodyID ODEBody = dGeomGetBody(ODEGeom); + return (long) ODEBody; +} - // get shared pointers to the two corresponding Collider nodes first - shared_ptr<Collider> collider = Collider::GetCollider((long) obj1); - shared_ptr<Collider> collidee = Collider::GetCollider((long) obj2); +long ODESpace::FetchSpace(long geomID){ + dGeomID ODEGeom = (dGeomID) geomID; + dSpaceID ODESpace = dGeomGetSpace(ODEGeom); + return (long) ODESpace; +} - if ( - (collider.get() == 0) || - (collidee.get() == 0) - ) - { - return; - } +bool ODESpace::AreConnectedWithJoint(long bodyID1, long bodyID2){ + if ((!bodyID1) || (!bodyID2)) + return false; - if (s1 == s2) - { - const oxygen::Collider::TColliderNameSet & collider_set = collider->GetNotCollideWithSet(); - const oxygen::Collider::TColliderNameSet & collidee_set = collidee->GetNotCollideWithSet(); - if ( - (collider_set.find(collidee->GetName()) != collider_set.end()) || - (collidee_set.find(collider->GetName()) != collidee_set.end()) - ) - { - return; - } - } + dBodyID ODEBody1 = (dBodyID) bodyID1; + dBodyID ODEBody2 = (dBodyID) bodyID2; + return dAreConnectedExcluding(ODEBody1, ODEBody2, dJointTypeContact); +} +void ODESpace::CollideInternal(boost::shared_ptr<Collider> collider, + boost::shared_ptr<Collider> collidee, + long geomID1, long geomID2) +{ + dGeomID geom1 = (dGeomID) geomID1; + dGeomID geom2 = (dGeomID) geomID2; // dSpaceCollide(), is guaranteed to pass all potentially // intersecting geom pairs to the callback function, but depending // on the internal algorithms used by the space it may also make @@ -146,8 +134,8 @@ static const int nContacts = 4; static dContact contacts[nContacts]; - int n = dCollide (obj1, obj2, nContacts, - &contacts[0].geom, sizeof(dContact)); + int n = dCollide (geom1, geom2, nContacts, + &contacts[0].geom, sizeof(dContact)); if (n == 0) { @@ -158,153 +146,7 @@ for (int i=0;i<n;++i) { // notify the collider nodes - //collider->OnCollision(collidee,contacts[i],Collider::CT_DIRECT); - //collidee->OnCollision(collider,contacts[i],Collider::CT_SYMMETRIC); + collider->OnCollision(collidee,(GenericContact&) contacts[i],Collider::CT_DIRECT); + collidee->OnCollision(collider,(GenericContact&) contacts[i],Collider::CT_SYMMETRIC); } } - -void ODESpace::OnUnlink() -{ - DisableInnerCollision(false); -} - -void ODESpace::OnLink() -{ - /*shared_ptr<Space> space = GetSpace(); - dSpaceID spaceID = 0; - - if (space.get() != 0) - { - spaceID = (dSpaceID) space->GetSpaceID(); - } - - mODESpace = dHashSpaceCreate(spaceID);*/ -} - -long ODESpace::GetParentSpaceID() -{ - if (mODESpace == 0) - { - return 0; - } - - return (long) dGeomGetSpace((dGeomID)mODESpace); -} - -bool ODESpace::IsGlobalSpace() -{ - return - ( - (mODESpace != 0) && - (GetParentSpaceID() == 0) - ); -} - -bool ODESpace::ConstructInternal() -{ - // create a joint group for the contacts - mODEContactGroup = dJointGroupCreate(0); - - return (mODEContactGroup != 0); -} - -void ODESpace::PostPhysicsUpdateInternal() -{ - // remove all contact joints - dJointGroupEmpty (mODEContactGroup); -} - -void ODESpace::DestroySpaceObjects(){} -/*{ - if (scene.get() == 0) - { - return; - } - - TLeafList objects; - const bool recursive = true; - scene->ListChildrenSupportingClass<PhysicsObject>(objects, recursive); - - bool globalSpace = IsGlobalSpace(); - shared_ptr<Space> self = shared_static_cast<Space>(GetSelf().lock()); - - for ( - TLeafList::iterator iter = objects.begin(); - iter != objects.end(); - ++iter - ) - { - shared_ptr<PhysicsObject> object = shared_static_cast<PhysicsObject>(*iter); - if (object == self) - { - continue; - } - - // destroy objects registered to this space; the top level - // space object also destroy any other ODE object - const long parentSpace = object->GetParentSpaceID(); - if ( - ( - (globalSpace) && - (parentSpace == 0) - ) || - (parentSpace == (long) mODESpace) - ) - { - object->DestroyPhysicsObject(); - } - } -}*/ - -void ODESpace::DestroyPhysicsObject() -{ - if (! mODESpace) - { - return; - } - - // make sure that all objects registered to this space are destroyed - // before this space. Any other order provokes a segfault in ODE. - DestroySpaceObjects(); - - if (mODEContactGroup) - { - dJointGroupDestroy(mODEContactGroup); - mODEContactGroup = 0; - } - - // release the ODE space - dSpaceDestroy(mODESpace); - mODESpace = 0; -} - -void ODESpace::DisableInnerCollision(bool disable) -{ - if (mODESpace == 0) - { - //assert(false); - return; - } - - if (disable) - { - gDisabledInnerCollisionSet.insert(mODESpace); - return; - } - - TSpaceIdSet::iterator iter = gDisabledInnerCollisionSet.find(mODESpace); - if (iter == gDisabledInnerCollisionSet.end()) - { - return; - } - - gDisabledInnerCollisionSet.erase(iter); -} - -bool ODESpace::GetDisableInnerCollision() const -{ - TSpaceIdSet::const_iterator iter - = gDisabledInnerCollisionSet.find(mODESpace); - - return (iter != gDisabledInnerCollisionSet.end()); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.h 2010-01-13 13:21:31 UTC (rev 142) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.h 2010-01-14 09:15:14 UTC (rev 143) @@ -28,43 +28,31 @@ namespace oxygen { +class Space; class OXYGEN_API ODESpace : public SpaceInt, public ODEPhysicsObject { public: - typedef std::set<dSpaceID> TSpaceIdSet; - -public: ODESpace(); - - long GetSpaceID() const; - dJointGroupID GetODEJointGroup() const; - void Collide(); - virtual void DestroyPhysicsObject(); - virtual long GetParentSpaceID(); - bool IsGlobalSpace(); - void DisableInnerCollision(bool disable); - bool GetDisableInnerCollision() const; - dSpaceID mODESpace; - -protected: - //void collisionNearCallback (void *data, dGeomID obj1, dGeomID obj2); - virtual void OnUnlink(); - virtual void OnLink(); - void Collide(dSpaceID space); - void HandleCollide(dGeomID obj1, dGeomID obj2); - void HandleSpaceCollide(dGeomID obj1, dGeomID obj2); - virtual bool ConstructInternal(); - virtual void PostPhysicsUpdateInternal(); - void DestroySpaceObjects(); - + long CreateSpace(long spaceID); + void DestroySpace(long contactGroup, long spaceID); + long GetParentSpaceID(long spaceID); + long ConstructInternal(); + void PostPhysicsUpdateInternal(long contactGroup); + void Collide(long spaceID, Space* callee); + void Collide2(long obj1, long obj2, Space* callee); + bool ObjectIsSpace(long objectID); + long FetchBody(long geomID); + long FetchSpace(long geomID); + bool AreConnectedWithJoint(long bodyID1, long bodyID2); + void CollideInternal(boost::shared_ptr<Collider> collider, + boost::shared_ptr<Collider> collidee, + long geomID1, long geomID2); + private: - dJointGroupID mODEContactGroup; - -private: - static TSpaceIdSet gDisabledInnerCollisionSet; + static void collisionNearCallback(void* data, dGeomID obj1, dGeomID obj2); }; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2010-01-13 13:21:31 UTC (rev 142) +++ branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2010-01-14 09:15:14 UTC (rev 143) @@ -24,7 +24,6 @@ #include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/world.h> #include <oxygen/sceneserver/scene.h> -#include <zeitgeist/logserver/logserver.h> using namespace boost; using namespace oxygen; @@ -32,14 +31,8 @@ /** set of spaces with disabled inner collision */ Space::TSpaceIdSet Space::gDisabledInnerCollisionSet; -void Space::collisionNearCallback (void *data, dGeomID obj1, dGeomID obj2) +Space::Space() : PhysicsObject(), mSpaceID(0) { - Space *space = (Space*)data; - space->HandleCollide((long) obj1, (long) obj2); -} - -Space::Space() : PhysicsObject(), mODESpace(0) -{ mSpaceImp = shared_ptr<ODESpace>(new ODESpace()); } @@ -49,80 +42,70 @@ long Space::GetSpaceID() const { - return mSpaceImp->GetSpaceID(); + return mSpaceID; } long Space::GetODEJointGroup() const { - return (long) mSpaceImp->GetODEJointGroup(); + return mContactGroupID; } void Space::Collide() { // bind collision callback function to this object - Collide(mODESpace); + Collide(mSpaceID); } -void Space::Collide(dSpaceID space) +void Space::Collide(long space) { if (gDisabledInnerCollisionSet.find(space) == gDisabledInnerCollisionSet.end()) { - dSpaceCollide(space, this, collisionNearCallback); + mSpaceImp->Collide(space, this); } } -void Space::HandleSpaceCollide(dGeomID obj1, dGeomID obj2) -{ - // collide all geoms internal to the space(s) - dSpaceCollide2 (obj1,obj2,this,&collisionNearCallback); - - //mSpaceImp->HandleSpaceCollide(obj1, obj2); +void Space::HandleSpaceCollide(long obj1, long obj2) +{ + // collide all geoms internal to the space(s) + mSpaceImp->Collide2(obj1, obj2, this); - if (dGeomIsSpace (obj1)) + if (mSpaceImp->ObjectIsSpace(obj1)) { - Collide((dSpaceID)obj1); + Collide(obj1); } - if (dGeomIsSpace (obj2)) + if (mSpaceImp->ObjectIsSpace(obj2)) { - Collide((dSpaceID)obj2); + Collide(obj2); } } void Space::HandleCollide(long obj1, long obj2) -{ - //mSpaceImp->HandleCollide(obj1, obj2); - - dGeomID geom1 = (dGeomID) obj1; - dGeomID geom2 = (dGeomID) obj2; - +{ if ( - (dGeomIsSpace (geom1)) || - (dGeomIsSpace (geom2)) + (mSpaceImp->ObjectIsSpace(obj1)) || + (mSpaceImp->ObjectIsSpace(obj2)) ) { // colliding a space with something - HandleSpaceCollide(geom1, geom2); + HandleSpaceCollide(obj1, obj2); return; } // colliding two non-space geoms; reject collisions // between bodies that are connected with joints - const dBodyID b1 = dGeomGetBody(geom1); - const dBodyID b2 = dGeomGetBody(geom2); + const long body1 = mSpaceImp->FetchBody(obj1); + const long body2 = mSpaceImp->FetchBody(obj2); - if ( - (b1) && (b2) && - (dAreConnectedExcluding(b1,b2,dJointTypeContact)) - ) + if (mSpaceImp->AreConnectedWithJoint(body1, body2)) { return; } // if obj1 and obj2 are in a space that disabled inner collision, // reject the collision - const dSpaceID s1 = dGeomGetSpace(geom1); - const dSpaceID s2 = dGeomGetSpace(geom2); + const long s1 = mSpaceImp->FetchSpace(obj1); + const long s2 = mSpaceImp->FetchSpace(obj2); // get shared pointers to the two corresponding Collider nodes first shared_ptr<Collider> collider = Collider::GetCollider(obj1); @@ -149,35 +132,12 @@ } } - // dSpaceCollide(), is guaranteed to pass all potentially - // intersecting geom pairs to the callback function, but depending - // on the internal algorithms used by the space it may also make - // mistakes and pass non-intersecting pairs. Thus we can not - // expect that dCollide() will return contacts for every pair - // passed to the callback. - static const int nContacts = 4; - static dContact contacts[nContacts]; - - int n = dCollide (geom1, geom2, nContacts, - &contacts[0].geom, sizeof(dContact)); - - if (n == 0) - { - return; - } - - - for (int i=0;i<n;++i) - { - // notify the collider nodes - collider->OnCollision(collidee,(GenericContact&) contacts[i],Collider::CT_DIRECT); - collidee->OnCollision(collider,(GenericContact&) contacts[i],Collider::CT_SYMMETRIC); - } + mSpaceImp->CollideInternal(collider, collidee, obj1, obj2); } void Space::OnUnlink() { - mSpaceImp->DisableInnerCollision(false); + DisableInnerCollision(false); PhysicsObject::OnUnlink(); } @@ -193,50 +153,127 @@ spaceID = space->GetSpaceID(); } - mODESpace = dHashSpaceCreate((dSpaceID) spaceID); - - shared_ptr<ODESpace> odespace = shared_static_cast<ODESpace>(mSpaceImp); - odespace->mODESpace = mODESpace; + mSpaceID = mSpaceImp->CreateSpace(spaceID); } long Space::GetParentSpaceID() { - return mSpaceImp->GetParentSpaceID(); + if (mSpaceID == 0) + { + return 0; + } + + return mSpaceImp->GetParentSpaceID(mSpaceID); } bool Space::IsGlobalSpace() { - return mSpaceImp->IsGlobalSpace(); + return + ( + (mSpaceID != 0) && + (GetParentSpaceID() == 0) + ); } bool Space::ConstructInternal() { - return mSpaceImp->ConstructInternal(); + mContactGroupID = mSpaceImp->ConstructInternal(); + + return (mContactGroupID != 0); } void Space::PostPhysicsUpdateInternal() { - mSpaceImp->PostPhysicsUpdateInternal(); + mSpaceImp->PostPhysicsUpdateInternal(mContactGroupID); } void Space::DestroySpaceObjects() { - mSpaceImp->scene = GetScene(); - - mSpaceImp->DestroySpaceObjects(); + boost::shared_ptr<Scene> scene = GetScene(); + + if (scene.get() == 0) + { + return; + } + + TLeafList objects; + const bool recursive = true; + scene->ListChildrenSupportingClass<PhysicsObject>(objects, recursive); + + bool globalSpace = IsGlobalSpace(); + shared_ptr<Space> self = shared_static_cast<Space>(GetSelf().lock()); + + for ( + TLeafList::iterator iter = objects.begin(); + iter != objects.end(); + ++iter + ) + { + shared_ptr<PhysicsObject> object = shared_static_cast<PhysicsObject>(*iter); + if (object == self) + { + continue; + } + + // destroy objects registered to this space; the top level + // space object also destroy any other ODE object + const long parentSpace = object->GetParentSpaceID(); + if ( + ( + (globalSpace) && + (parentSpace == 0) + ) || + (parentSpace == mSpaceID) + ) + { + object->DestroyPhysicsObject(); + } + } } void Space::DestroyPhysicsObject() { - mSpaceImp->DestroyPhysicsObject(); + if (mSpaceID == 0) + { + return; + } + + // make sure that all objects registered to this space are destroyed + // before this space. Any other order provokes a segfault in ODE. + DestroySpaceObjects(); + + mSpaceImp->DestroySpace(mSpaceID, mContactGroupID); + + mSpaceID = 0; + mContactGroupID = 0; } void Space::DisableInnerCollision(bool disable) { - mSpaceImp->DisableInnerCollision(disable); + if (mSpaceID == 0) + { + return; + } + + if (disable) + { + gDisabledInnerCollisionSet.insert(mSpaceID); + return; + } + + TSpaceIdSet::iterator iter = gDisabledInnerCollisionSet.find(mSpaceID); + if (iter == gDisabledInnerCollisionSet.end()) + { + return; + } + + gDisabledInnerCollisionSet.erase(iter); } bool Space::GetDisableInnerCollision() const { - return mSpaceImp->GetDisableInnerCollision(); + TSpaceIdSet::const_iterator iter + = gDisabledInnerCollisionSet.find(mSpaceID); + + return (iter != gDisabledInnerCollisionSet.end()); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/space.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/space.h 2010-01-13 13:21:31 UTC (rev 142) +++ branches/multiphys/spark/lib/oxygen/physicsserver/space.h 2010-01-14 09:15:14 UTC (rev 143) @@ -42,7 +42,7 @@ class OXYGEN_API Space : public PhysicsObject { public: - typedef std::set<dSpaceID> TSpaceIdSet; + typedef std::set<long> TSpaceIdSet; public: Space(); @@ -76,10 +76,14 @@ /** query disabled inner collision flag */ bool GetDisableInnerCollision() const; + + /** callback to handle a potential collision between two contained + geoms. It will look up and notify the corresponding colliders + for a potential collision. + */ + void HandleCollide(long obj1, long obj2); protected: - static void collisionNearCallback (void *data, dGeomID obj1, dGeomID obj2); - /** unregisters the managed Space of the Scene. */ virtual void OnUnlink(); @@ -89,18 +93,12 @@ /** calls ODE's collision detection for this space if internal collision * detection is enabled for this space. */ - void Collide(dSpaceID space); + void Collide(long space); - /** callback to handle a potential collision between two contained - geoms. It will look up and notify the corresponding colliders - for a potential collision. - */ - void HandleCollide(long obj1, long obj2); - /** handle the collision between two geoms from which at least one is a space geom */ - void HandleSpaceCollide(dGeomID obj1, dGeomID obj2); + void HandleSpaceCollide(long obj1, long obj2); /** creates them managed ODE space and a contact joint group */ virtual bool ConstructInternal(); @@ -116,11 +114,13 @@ // // Members // -private: +private: boost::shared_ptr<SpaceInt> mSpaceImp; - /** the managed ODE space */ - dSpaceID mODESpace; + long mContactGroupID; + + /** the managed space */ + long mSpaceID; private: /** set of spaces with disabled inner collision */ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods_ode.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods_ode.cpp 2010-01-13 13:21:31 UTC (rev 142) +++ branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods_ode.cpp 2010-01-14 09:15:14 UTC (rev 143) @@ -22,6 +22,7 @@ #include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/joint.h> #include <oxygen/physicsserver/rigidbody.h> +#include <oxygen/physicsserver/space.h> #include <oxygen/physicsserver/ode/odewrapper.h> using namespace oxygen; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-01-13 13:21:38
|
Revision: 142 http://simspark.svn.sourceforge.net/simspark/?rev=142&view=rev Author: a-held Date: 2010-01-13 13:21:31 +0000 (Wed, 13 Jan 2010) Log Message: ----------- Finished bridge pattern for ContactJointHandler class made the collisionperceptor plugin a little less ODE-specific added the rcsoccersim3d script that SVN "forgot" in the last update Changes to soccer.rsg are temporary Modified Paths: -------------- branches/multiphys/rcssserver3d/data/rsg/agent/nao/soccer.rsg branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp branches/multiphys/spark/lib/oxygen/physicsserver/space.h branches/multiphys/spark/plugin/collisionperceptor/forceresistanceperceptor.cpp branches/multiphys/spark/plugin/collisionperceptor/forceresistanceperceptor.h branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.cpp branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.h Added Paths: ----------- branches/multiphys/rcssserver3d/rcssserver3d/rcsoccersim3d.in Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/soccer.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/soccer.rsg 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/soccer.rsg 2010-01-13 13:21:31 UTC (rev 142) @@ -81,6 +81,49 @@ ) ) +; create falling box + (nd AgentAspect + (setName fallBox) + (setLocalPos -4.9 -3.5 200) + (importScene rsg/boxspheres/box.rsg 1 1 1 100 matGrey) +) + + (nd AgentAspect + (setName 2Box) + (setLocalPos -4.9 -3.5 0.5) + (importScene rsg/boxspheres/box.rsg 1 0.1 2 1 matRed) +) + +(nd AgentAspect + (setName 3Box) + (setLocalPos -4.9 -2 0.5) + (importScene rsg/boxspheres/box.rsg 1 0.1 2 1 matRed) +) + +(nd AgentAspect + (setName 4Box) + (setLocalPos -4.9 -0.5 0.5) + (importScene rsg/boxspheres/box.rsg 1 0.1 2 2 matRed) +) + +(nd AgentAspect + (setName 5Box) + (setLocalPos -4.9 1 0.5) + (importScene rsg/boxspheres/box.rsg 1 0.1 2 2 matRed) +) + +(nd AgentAspect + (setName 6Box) + (setLocalPos -4.9 2.5 0.5) + (importScene rsg/boxspheres/box.rsg 1 0.1 2 3 matRed) +) + +(nd AgentAspect + (setName Sphere) + (setLocalPos -4.9 -4.2 0.5) + (importScene rsg/boxspheres/sphere.rsg 0.5 0.2 matYellow) +) + ; create skybox (nd Transform (setLocalPos 0 0 0) Added: branches/multiphys/rcssserver3d/rcssserver3d/rcsoccersim3d.in =================================================================== --- branches/multiphys/rcssserver3d/rcssserver3d/rcsoccersim3d.in (rev 0) +++ branches/multiphys/rcssserver3d/rcssserver3d/rcsoccersim3d.in 2010-01-13 13:21:31 UTC (rev 142) @@ -0,0 +1,72 @@ +#! /bin/sh + +bindir="@CMAKE_INSTALL_PREFIX@/@BINDIR@" +libdir="@CMAKE_INSTALL_PREFIX@/@LIBDIR@" + +LIBPATH="$libdir/simspark:$libdir/rcssserver3d" +if [ x"$LIBPATH" != x ] ; then + if [ x"$LD_LIBRARY_PATH" = x ] ; then + LD_LIBRARY_PATH=$LIBPATH + else + LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH + fi + export LD_LIBRARY_PATH +fi + +#-------------------------------------------------- +# option +# + +SERV="$bindir/rcssserver3d" +if [ ! -f $SERV ]; then + echo "Error: $SERV does not exist!" + echo "" + exit 1 +fi + +MON="$bindir/rcssmonitor3d" +if [ ! -f $MON ]; then + echo "Error: $MON does not exist!" + echo "" + exit 1 +fi + +AGT="$bindir/rcssagent3d" +if [ ! -f $AGT ]; then + echo "Error: $AGT does not exist!" + echo "" + exit 1 +fi + +#-------------------------------------------------- +# set handler +# + +trap kill_server INT + +#-------------------------------------------------- +# start server +# + +$SERV & +PID=$! + +#-------------------------------------------------- +# kill server +# +kill_server() +{ + kill -s INT $PID + echo "" + exit 0 +} + +#-------------------------------------------------- +# start monitor +# + +sleep 2 + +$MON & $AGT + +kill_server Property changes on: branches/multiphys/rcssserver3d/rcssserver3d/rcsoccersim3d.in ___________________________________________________________________ Added: svn:executable + * Modified: branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2010-01-13 13:21:31 UTC (rev 142) @@ -32,135 +32,16 @@ ContactJointHandler::ContactJointHandler() : CollisionHandler() { mContactJointHandlerImp = boost::shared_ptr<ODEContactJointHandler>(new ODEContactJointHandler()); - - - // set up default contact surface parameters - mSurfaceParameter.mode = dContactBounce; - mSurfaceParameter.mu = dInfinity; - mSurfaceParameter.bounce = 0.8f; - mSurfaceParameter.bounce_vel = 2.0f; - - // In contactjointhandler_c.cpp, setContactSlip function, only - // accept one parameter, so two parameter is a mistake, and then - // these two value will be not initialized, but slipe mode is open - mSurfaceParameter.slip1 = 5e-3; - mSurfaceParameter.slip2 = 5e-3; - - - //mContactJointHandlerImp->Initialize(); + mContactJointHandlerImp->Initialize(); } ContactJointHandler::~ContactJointHandler() { } -float -ContactJointHandler::MixValues(const float v1, const float v2, const int n) const -{ - switch(n) - { - default: - case 0: - // undefined, default 0 - return 0.0f; - - case 1: - // first one defined - return v1; - - case 2: - // second one defined - return v2; - - case 3: - // both defined, return average - return (v1 + v2) / 2.0f; - } -} - void -ContactJointHandler::CalcSurfaceParam(dSurfaceParameters& surface, - const dSurfaceParameters& collideeParam) -{ - // init surface - surface.mode = 0; - - // calculate average mu; mu can be dInfinity, so first multiply with - // 0.5 and the sum up to avoid a range error - surface.mu = mSurfaceParameter.mu*0.5f + collideeParam.mu*0.5f; - - // soft cfm - const int nCfm = - ((mSurfaceParameter.mode & dContactSoftCFM) ? 1:0) + - ((collideeParam.mode & dContactSoftCFM) ? 2:0); - - if (nCfm>0) - { - surface.soft_cfm = MixValues - (mSurfaceParameter.soft_cfm, collideeParam.soft_cfm, nCfm); - surface.mode |= dContactSoftCFM; - } - - // soft_erp - const int nErp = - ((mSurfaceParameter.mode & dContactSoftERP) ? 1:0) + - ((collideeParam.mode & dContactSoftERP) ? 2:0); - - if (nErp>0) - { - surface.soft_erp = MixValues - (mSurfaceParameter.soft_erp, collideeParam.soft_erp, nErp); - surface.mode |= dContactSoftERP; - } - - // bounce - const int nBounce = - ((mSurfaceParameter.mode & dContactBounce) ? 1:0) + - ((collideeParam.mode & dContactBounce) ? 2:0); - - if (nBounce>0) - { - surface.bounce = MixValues - (mSurfaceParameter.bounce, collideeParam.bounce, nBounce); - - surface.bounce_vel = MixValues - (mSurfaceParameter.bounce_vel, collideeParam.bounce_vel, nBounce); - - surface.mode |= dContactBounce; - } - - // slip1 - const int nSlip1 = - ((mSurfaceParameter.mode & dContactSlip1) ? 1 : 0) + - ((collideeParam.mode & dContactSlip1) ? 2 : 0); - - if (nSlip1 > 0) - { - surface.slip1 = MixValues - (mSurfaceParameter.slip1, collideeParam.slip1, nSlip1); - - surface.mode |= dContactSlip1; - } - - // slip2 - const int nSlip2 = - ((mSurfaceParameter.mode & dContactSlip2) ? 1 : 0) + - ((collideeParam.mode & dContactSlip2) ? 2 : 0); - - if (nSlip2 > 0) - { - surface.slip2 = MixValues - (mSurfaceParameter.slip2, collideeParam.slip2, nSlip2); - - surface.mode |= dContactSlip2; - } -} - -void ContactJointHandler::HandleCollision(shared_ptr<Collider> collidee, GenericContact& contact) { - dContact& ODEContact = (dContact&) contact; - if ( (mCollider.get() == 0) || (mWorld.get() == 0) || @@ -172,8 +53,8 @@ // to create a contact joint it we must have at least one body to // attach it to. - dBodyID myBody = dGeomGetBody((dGeomID) mCollider->GetGeomID()); - dBodyID collideeBody = dGeomGetBody((dGeomID) collidee->GetGeomID()); + long myBody = mContactJointHandlerImp->RetrieveBody(mCollider->GetGeomID()); + long collideeBody = mContactJointHandlerImp->RetrieveBody(collidee->GetGeomID()); if ( (myBody == 0) && @@ -192,143 +73,134 @@ return; } - // calculate the resulting surface parameters - CalcSurfaceParam(ODEContact.surface,handler->mSurfaceParameter); + // calculate the resulting surface parameters + mContactJointHandlerImp->CalcSurfaceParam( + contact, handler->GetSurfaceParameter()); // create the contact joint and attach it to the body - dJointID joint = dJointCreateContact - ((dWorldID) mWorld->GetWorldID(), mSpace->GetODEJointGroup(), &ODEContact); + long joint = mContactJointHandlerImp->CreateContactJoint( + mWorld->GetWorldID(), mSpace->GetODEJointGroup(), contact); - dJointAttach (joint, myBody, collideeBody); + mContactJointHandlerImp->AttachContactJoint(joint, myBody, collideeBody); } void ContactJointHandler::SetSurfaceParameter(const GenericSurfaceParameter& surface) { - dSurfaceParameters& ODESurface = (dSurfaceParameters&) surface; - mSurfaceParameter = ODESurface; + mContactJointHandlerImp->SetSurfaceParameter(surface); } -const GenericSurfaceParameter& +GenericSurfaceParameter& ContactJointHandler::GetSurfaceParameter() const { - return (GenericSurfaceParameter&) mSurfaceParameter; + return mContactJointHandlerImp->GetSurfaceParameter(); } void ContactJointHandler::SetContactMode(int mode, bool set) { - if (set) - { - mSurfaceParameter.mode |= mode; - } else - { - mSurfaceParameter.mode &= ~mode; - } + mContactJointHandlerImp->SetContactMode(mode, set); } int ContactJointHandler::GetContactMode() const { - return mSurfaceParameter.mode; + return mContactJointHandlerImp->GetContactMode(); } void ContactJointHandler::SetContactBounceMode(bool set) { - SetContactMode(dContactBounce,set); + mContactJointHandlerImp->SetContactBounceMode(set); } void ContactJointHandler::SetMinBounceVel(float vel) { - mSurfaceParameter.bounce_vel = std::max<float>(0.0f,vel); + mContactJointHandlerImp->SetMinBounceVel(vel); } float ContactJointHandler::GetMinBounceVel() const { - return mSurfaceParameter.bounce_vel; + return mContactJointHandlerImp->GetMinBounceVel(); } void ContactJointHandler::SetBounceValue(float bounce) { - mSurfaceParameter.bounce = std::max<float>(0.0f,bounce); + mContactJointHandlerImp->SetBounceValue(bounce); } float ContactJointHandler::GetBounceValue() const { - return mSurfaceParameter.bounce; + return mContactJointHandlerImp->GetBounceValue(); } void ContactJointHandler::SetContactSoftERPMode(bool set) { - SetContactMode(dContactSoftERP,set); + mContactJointHandlerImp->SetContactSoftERPMode(set); } void ContactJointHandler::SetContactSoftERP(float erp) { - salt::gClamp(erp,0.0f,1.0f); - mSurfaceParameter.soft_erp = erp; + mContactJointHandlerImp->SetContactSoftERP(erp); } float ContactJointHandler::GetContactSoftERP() const { - return mSurfaceParameter.soft_erp; + return mContactJointHandlerImp->GetContactSoftERP(); } void ContactJointHandler::SetContactSoftCFMMode(bool set) { - SetContactMode(dContactSoftCFM,set); + mContactJointHandlerImp->SetContactSoftCFMMode(set); } void ContactJointHandler::SetContactSoftCFM(float cfm) { - mSurfaceParameter.soft_cfm = std::max<float>(0.0f,cfm); + mContactJointHandlerImp->SetContactSoftCFM(cfm); } float ContactJointHandler::GetContactSoftCFM() const { - return mSurfaceParameter.soft_cfm; + return mContactJointHandlerImp->GetContactSoftCFM(); } void ContactJointHandler::SetContactSlipMode (bool set) { - SetContactMode(dContactSlip1,set); - SetContactMode(dContactSlip2,set); + mContactJointHandlerImp->SetContactSlipMode(set); } void ContactJointHandler::SetContactSlip(float slip) { - mSurfaceParameter.slip1 = slip; - mSurfaceParameter.slip2 = slip; + mContactJointHandlerImp->SetContactSlip(slip); } float ContactJointHandler::GetContactSlip1() const { - return mSurfaceParameter.slip1; + return mContactJointHandlerImp->GetContactSlip1(); } float ContactJointHandler::GetContactSlip2() const { - return mSurfaceParameter.slip2; + return mContactJointHandlerImp->GetContactSlip2(); } void ContactJointHandler::SetContactMu(float mu) { - mSurfaceParameter.mu = mu; + mContactJointHandlerImp->SetContactMu(mu); } float ContactJointHandler::GetContactMu() const { - return mSurfaceParameter.mu; + return mContactJointHandlerImp->GetContactMu(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h 2010-01-13 13:21:31 UTC (rev 142) @@ -65,10 +65,10 @@ */ void SetSurfaceParameter(const GenericSurfaceParameter& surface); - /** returns the surface parameters for the contact joints taht the + /** returns the surface parameters for the contact joints that the CollisionHandler creates */ - const GenericSurfaceParameter& GetSurfaceParameter() const; + GenericSurfaceParameter& GetSurfaceParameter() const; /** sets or resets a contact mode flag in the surface parameter*/ void SetContactMode(int mode, bool set); @@ -139,16 +139,8 @@ /** returns the Coulomb friction coefficient */ float GetContactMu() const; - -protected: - f_inline float MixValues(const float v1, const float v2, const int n) const; - - void CalcSurfaceParam(dSurfaceParameters& surface, - const dSurfaceParameters& collideeParam); - dSurfaceParameters mSurfaceParameter; - -private: +protected: boost::shared_ptr<ContactJointHandlerInt> mContactJointHandlerImp; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h 2010-01-13 13:21:31 UTC (rev 142) @@ -1,4 +1,4 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- +/* -*- mode: c++= 0; c-basic-offset: 4= 0; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 @@ -6,24 +6,27 @@ 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 + This program is free software= 0; 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. + the Free Software Foundation= 0; 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 + but WITHOUT ANY WARRANTY= 0; 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 + along with this program= 0; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef OXYGEN_CONTACTJOINTHANDLERINT_H #define OXYGEN_CONTACTJOINTHANDLERINT_H +#include <oxygen/physicsserver/ode/odewrapper.h> + #include <oxygen/oxygen_defines.h> +#include <oxygen/physicsserver/genericphysicsobjects.h> namespace oxygen { @@ -33,7 +36,35 @@ public: virtual float MixValues(const float v1, const float v2, const int n) const = 0; virtual void Initialize() = 0; + virtual long RetrieveBody(long geomID) = 0; + virtual long CreateContactJoint(long worldID, long jointGroupID, GenericContact& contact) = 0; + virtual void AttachContactJoint(long jointID, long bodyID1, long bodyID2) = 0; + virtual void CalcSurfaceParam(GenericContact& surface, GenericSurfaceParameter& collideeParam) = 0; + virtual void SetSurfaceParameter(const GenericSurfaceParameter& surface) = 0; + virtual GenericSurfaceParameter& GetSurfaceParameter() const = 0; + virtual void SetContactMode(int mode, bool set) = 0; + virtual int GetContactMode() const = 0; + virtual void SetContactBounceMode(bool set) = 0; + virtual void SetBounceValue(float bounce) = 0; + virtual float GetBounceValue() const = 0; + virtual void SetMinBounceVel(float vel) = 0; + virtual float GetMinBounceVel() const = 0; + virtual void SetContactSoftERPMode(bool set) = 0; + virtual void SetContactSoftERP(float erp) = 0; + virtual float GetContactSoftERP() const = 0; + virtual void SetContactSoftCFMMode(bool set) = 0; + virtual void SetContactSoftCFM(float cfm) = 0; + virtual float GetContactSoftCFM() const = 0; + virtual void SetContactSlipMode (bool set) = 0; + virtual void SetContactSlip(float slip) = 0; + virtual float GetContactSlip1() const = 0; + virtual float GetContactSlip2() const = 0; + virtual void SetContactMu(float mu) = 0; + virtual float GetContactMu() const = 0; + + /** the ODE surface parameters of the created contact joint */ + dSurfaceParameters mSurfaceParameter; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp 2010-01-13 13:21:31 UTC (rev 142) @@ -39,6 +39,40 @@ mSurfaceParameter.slip2 = 5e-3; } +long ODEContactJointHandler::RetrieveBody(long geomID){ + dGeomID ODEGeom = (dGeomID) geomID; + dBodyID ODEBody = dGeomGetBody(ODEGeom); + return (long) ODEBody; +} + +long +ODEContactJointHandler::CreateContactJoint(long worldID, long jointGroupID, GenericContact& contact){ + dWorldID ODEWorld = (dWorldID) worldID; + dJointGroupID ODEJointGroup = (dJointGroupID) jointGroupID; + dContact& ODEContact = (dContact&) contact; + + dJointID ODEJoint = dJointCreateContact + (ODEWorld, ODEJointGroup, &ODEContact); + + return (long) ODEJoint; +} + +void ODEContactJointHandler::AttachContactJoint(long jointID, long bodyID1, long bodyID2){ + dJointID ODEJoint = (dJointID) jointID; + dBodyID ODEBody1 = (dBodyID) bodyID1; + dBodyID ODEBody2 = (dBodyID) bodyID2; + + dJointAttach (ODEJoint, ODEBody1, ODEBody2); +} + +void +ODEContactJointHandler::CalcSurfaceParam(GenericContact& surface, GenericSurfaceParameter& collideeParam){ + dContact& ODEContact = (dContact&) surface; + dSurfaceParameters& ODEParams = (dSurfaceParameters&) collideeParam; + + CalcSurfaceParamInternal(ODEContact.surface, ODEParams); +} + float ODEContactJointHandler::MixValues(const float v1, const float v2, const int n) const { @@ -64,8 +98,8 @@ } void -ODEContactJointHandler::CalcSurfaceParam(dSurfaceParameters& surface, - const dSurfaceParameters& collideeParam) +ODEContactJointHandler::CalcSurfaceParamInternal(dSurfaceParameters& surface, + const dSurfaceParameters& collideeParam) { // init surface surface.mode = 0; @@ -140,3 +174,134 @@ surface.mode |= dContactSlip2; } } + +void +ODEContactJointHandler::SetSurfaceParameter(const GenericSurfaceParameter& surface) +{ + dSurfaceParameters& ODESurface = (dSurfaceParameters&) surface; + mSurfaceParameter = ODESurface; +} + +GenericSurfaceParameter& +ODEContactJointHandler::GetSurfaceParameter() const +{ + return (GenericSurfaceParameter&) mSurfaceParameter; +} + +void +ODEContactJointHandler::SetContactMode(int mode, bool set) +{ + if (set) + { + mSurfaceParameter.mode |= mode; + } else + { + mSurfaceParameter.mode &= ~mode; + } +} + +int +ODEContactJointHandler::GetContactMode() const +{ + return mSurfaceParameter.mode; +} + +void +ODEContactJointHandler::SetContactBounceMode(bool set) +{ + SetContactMode(dContactBounce,set); +} + +void +ODEContactJointHandler::SetMinBounceVel(float vel) +{ + mSurfaceParameter.bounce_vel = std::max<float>(0.0f,vel); +} + +float +ODEContactJointHandler::GetMinBounceVel() const +{ + return mSurfaceParameter.bounce_vel; +} + +void +ODEContactJointHandler::SetBounceValue(float bounce) +{ + mSurfaceParameter.bounce = std::max<float>(0.0f,bounce); +} + +float +ODEContactJointHandler::GetBounceValue() const +{ + return mSurfaceParameter.bounce; +} + +void +ODEContactJointHandler::SetContactSoftERPMode(bool set) +{ + SetContactMode(dContactSoftERP,set); +} + +void +ODEContactJointHandler::SetContactSoftERP(float erp) +{ + salt::gClamp(erp,0.0f,1.0f); + mSurfaceParameter.soft_erp = erp; +} + +float +ODEContactJointHandler::GetContactSoftERP() const +{ + return mSurfaceParameter.soft_erp; +} + +void +ODEContactJointHandler::SetContactSoftCFMMode(bool set) +{ + SetContactMode(dContactSoftCFM,set); +} + +void +ODEContactJointHandler::SetContactSoftCFM(float cfm) +{ + mSurfaceParameter.soft_cfm = std::max<float>(0.0f,cfm); +} + +float ODEContactJointHandler::GetContactSoftCFM() const +{ + return mSurfaceParameter.soft_cfm; +} + +void ODEContactJointHandler::SetContactSlipMode (bool set) +{ + SetContactMode(dContactSlip1,set); + SetContactMode(dContactSlip2,set); +} + +void ODEContactJointHandler::SetContactSlip(float slip) +{ + mSurfaceParameter.slip1 = slip; + mSurfaceParameter.slip2 = slip; +} + +float +ODEContactJointHandler::GetContactSlip1() const +{ + return mSurfaceParameter.slip1; +} + +float +ODEContactJointHandler::GetContactSlip2() const +{ + return mSurfaceParameter.slip2; +} + +void ODEContactJointHandler::SetContactMu(float mu) +{ + mSurfaceParameter.mu = mu; +} + +float ODEContactJointHandler::GetContactMu() const +{ + return mSurfaceParameter.mu; +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h 2010-01-13 13:21:31 UTC (rev 142) @@ -32,15 +32,38 @@ { public: ODEContactJointHandler(); - float MixValues(const float v1, const float v2, const int n) const; void Initialize(); + long RetrieveBody(long geomID); + long CreateContactJoint(long worldID, long jointGroupID, GenericContact& contact); + void AttachContactJoint(long jointID, long bodyID1, long bodyID2); + void CalcSurfaceParam(GenericContact& surface, GenericSurfaceParameter& collideeParam); + + void SetSurfaceParameter(const GenericSurfaceParameter& surface); + GenericSurfaceParameter& GetSurfaceParameter() const; + void SetContactMode(int mode, bool set); + int GetContactMode() const; + void SetContactBounceMode(bool set); + void SetBounceValue(float bounce); + float GetBounceValue() const; + void SetMinBounceVel(float vel); + float GetMinBounceVel() const; + void SetContactSoftERPMode(bool set); + void SetContactSoftERP(float erp); + float GetContactSoftERP() const; + void SetContactSoftCFMMode(bool set); + void SetContactSoftCFM(float cfm); + float GetContactSoftCFM() const; + void SetContactSlipMode (bool set); + void SetContactSlip(float slip); + float GetContactSlip1() const; + float GetContactSlip2() const; + void SetContactMu(float mu); + float GetContactMu() const; -protected: - /** the ODE surface parameters of the created contact joint */ - dSurfaceParameters mSurfaceParameter; - - void CalcSurfaceParam(dSurfaceParameters& surface, - const dSurfaceParameters& collideeParam); +protected: + f_inline float MixValues(const float v1, const float v2, const int n) const; + void CalcSurfaceParamInternal(dSurfaceParameters& surface, + const dSurfaceParameters& collideeParam); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2010-01-13 13:21:31 UTC (rev 142) @@ -52,9 +52,9 @@ return mSpaceImp->GetSpaceID(); } -dJointGroupID Space::GetODEJointGroup() const +long Space::GetODEJointGroup() const { - return mSpaceImp->GetODEJointGroup(); + return (long) mSpaceImp->GetODEJointGroup(); } void Space::Collide() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/space.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/space.h 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/spark/lib/oxygen/physicsserver/space.h 2010-01-13 13:21:31 UTC (rev 142) @@ -52,7 +52,7 @@ long GetSpaceID() const; /** retuns the ID of joint group for all created contact joints */ - dJointGroupID GetODEJointGroup() const; + long GetODEJointGroup() const; /** starts ODE's collision culling system. ODE will quickly identify which pairs of geoms are potentially Modified: branches/multiphys/spark/plugin/collisionperceptor/forceresistanceperceptor.cpp =================================================================== --- branches/multiphys/spark/plugin/collisionperceptor/forceresistanceperceptor.cpp 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/spark/plugin/collisionperceptor/forceresistanceperceptor.cpp 2010-01-13 13:21:31 UTC (rev 142) @@ -52,10 +52,11 @@ mBody.reset(); } -dJointFeedback *ForceResistancePerceptor::AddTouchInfo(dContact &contact) +GenericJointFeedback* ForceResistancePerceptor::AddTouchInfo(oxygen::GenericContact& contact) { - mContactList.push_front(make_pair(contact.geom, dJointFeedback())); - return &mContactList.front().second; + dContact& ODEContact = (dContact&) contact; + mContactList.push_front(make_pair(ODEContact.geom, dJointFeedback())); + return (GenericJointFeedback*) &mContactList.front().second; } bool ForceResistancePerceptor::Percept( Modified: branches/multiphys/spark/plugin/collisionperceptor/forceresistanceperceptor.h =================================================================== --- branches/multiphys/spark/plugin/collisionperceptor/forceresistanceperceptor.h 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/spark/plugin/collisionperceptor/forceresistanceperceptor.h 2010-01-13 13:21:31 UTC (rev 142) @@ -24,6 +24,7 @@ #define FORCERESISTANCEPERCEPTOR_H_ #include <oxygen/agentaspect/perceptor.h> +#include <oxygen/physicsserver/genericphysicsobjects.h> #include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/sceneserver/transform.h> #include <salt/vector.h> @@ -42,7 +43,7 @@ * feedback information. * \return the address of allocated memory */ - dJointFeedback *AddTouchInfo(dContact &contact); + oxygen::GenericJointFeedback* AddTouchInfo(oxygen::GenericContact& contact); /** adds touch information to predList \return true if data is available Modified: branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.cpp =================================================================== --- branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.cpp 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.cpp 2010-01-13 13:21:31 UTC (rev 142) @@ -22,7 +22,7 @@ #include "touchperceptorhandler.h" #include <oxygen/physicsserver/collider.h> -#include <oxygen/physicsserver/genericphysicsobjects.h> +#include <oxygen/physicsserver/ode/odecontactjointhandler.h> #include <oxygen/sceneserver/transform.h> #include <oxygen/physicsserver/world.h> #include <oxygen/physicsserver/space.h> @@ -59,15 +59,15 @@ } void TouchPerceptorHandler::HandleCollision( - boost::shared_ptr<Collider> collidee, dContact& contact) + boost::shared_ptr<Collider> collidee, GenericContact& contact) { if (mCollider.get() == 0 || mWorld.get() == 0 || mSpace.get() == 0) return; - // to create a contact joint it we must have at least one body to + // to create a contact joint we must have at least one body to // attach it to. - dBodyID myBody = dGeomGetBody((dGeomID) mCollider->GetGeomID()); - dBodyID collideeBody = dGeomGetBody((dGeomID) collidee->GetGeomID()); + long myBody = mContactJointHandlerImp->RetrieveBody(mCollider->GetGeomID()); + long collideeBody = mContactJointHandlerImp->RetrieveBody(collidee->GetGeomID()); if (myBody == 0 && collideeBody == 0) return; @@ -78,17 +78,19 @@ if (handler.get() == 0) return; - CalcSurfaceParam(contact.surface, (dSurfaceParameters&) handler->GetSurfaceParameter()); + mContactJointHandlerImp->CalcSurfaceParam( + contact, handler->GetSurfaceParameter()); - dJointID joint = dJointCreateContact((dWorldID) mWorld->GetWorldID(), - mSpace->GetODEJointGroup(), &contact); + // create the contact joint and attach it to the body + long joint = mContactJointHandlerImp->CreateContactJoint( + mWorld->GetWorldID(), mSpace->GetODEJointGroup(), contact); - dJointAttach (joint, myBody, collideeBody); - + mContactJointHandlerImp->AttachContactJoint(joint, myBody, collideeBody); + if (mForceResistancePercept.get() != 0) { - dJointFeedback *feedback = + GenericJointFeedback* feedback = mForceResistancePercept->AddTouchInfo(contact); - dJointSetFeedback(joint, feedback); + dJointSetFeedback( (dJointID) joint, (dJointFeedback*) feedback); } } Modified: branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.h =================================================================== --- branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.h 2010-01-13 06:28:54 UTC (rev 141) +++ branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.h 2010-01-13 13:21:31 UTC (rev 142) @@ -24,6 +24,7 @@ #define TOUCHPERCEPTORHANDLER_H_ #include <oxygen/physicsserver/contactjointhandler.h> +#include <oxygen/physicsserver/genericphysicsobjects.h> class ForceResistancePerceptor; @@ -34,7 +35,7 @@ { public: virtual void HandleCollision(boost::shared_ptr<oxygen::Collider> collidee, - dContact& contact); + oxygen::GenericContact& contact); protected: virtual void OnLink(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |