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. |