From: <rc...@us...> - 2010-06-14 09:38:56
|
Revision: 218 http://simspark.svn.sourceforge.net/simspark/?rev=218&view=rev Author: rckeely Date: 2010-06-14 09:38:48 +0000 (Mon, 14 Jun 2010) Log Message: ----------- Added stubs for Bullet plugin Added Paths: ----------- branches/bullet-plugin/spark/plugin/bulletimps/ branches/bullet-plugin/spark/plugin/bulletimps/CMakeLists.txt branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.h branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.h branches/bullet-plugin/spark/plugin/bulletimps/bulletbody_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconetwistjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconetwistjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletconetwistjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcontactjointhandler.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcontactjointhandler.h branches/bullet-plugin/spark/plugin/bulletimps/bulletcontactjointhandler_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconvexcollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletconvexcollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletconvexcollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcylindercollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletcylindercollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletcylindercollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletdynamicbody.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletdynamicbody.h branches/bullet-plugin/spark/plugin/bulletimps/bulletdynamicbody_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletemptycollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletemptycollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletemptycollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletfixedjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletfixedjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletfixedjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletgeneric6dofjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletgeneric6dofjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletgeneric6dofjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullethinge2joint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullethinge2joint.h branches/bullet-plugin/spark/plugin/bulletimps/bullethinge2joint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullethingejoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullethingejoint.h branches/bullet-plugin/spark/plugin/bulletimps/bullethingejoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsobject.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsobject.h branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsobject_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsserver.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsserver.h branches/bullet-plugin/spark/plugin/bulletimps/bulletphysicsserver_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletplanecollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletplanecollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletplanecollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletraycollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletraycollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletraycollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletrigidbody.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletrigidbody.h branches/bullet-plugin/spark/plugin/bulletimps/bulletrigidbody_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletsliderjoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletsliderjoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletsliderjoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletsoftbody.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletsoftbody.h branches/bullet-plugin/spark/plugin/bulletimps/bulletsoftbody_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletspace.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletspace.h branches/bullet-plugin/spark/plugin/bulletimps/bulletspace_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletspherecollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletspherecollider.h branches/bullet-plugin/spark/plugin/bulletimps/bulletspherecollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletstaticbody.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletstaticbody.h branches/bullet-plugin/spark/plugin/bulletimps/bulletstaticbody_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullettransformcollider.cpp branches/bullet-plugin/spark/plugin/bulletimps/bullettransformcollider.h branches/bullet-plugin/spark/plugin/bulletimps/bullettransformcollider_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletuniversaljoint.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletuniversaljoint.h branches/bullet-plugin/spark/plugin/bulletimps/bulletuniversaljoint_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletworld.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletworld.h branches/bullet-plugin/spark/plugin/bulletimps/bulletworld_c.cpp branches/bullet-plugin/spark/plugin/bulletimps/bulletwrapper.h branches/bullet-plugin/spark/plugin/bulletimps/export.cpp Added: branches/bullet-plugin/spark/plugin/bulletimps/CMakeLists.txt =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/CMakeLists.txt (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/CMakeLists.txt 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,115 @@ +########### next target ############### + +set(bulletimps_LIB_SRCS + export.cpp + bulletangularmotor.cpp + bulletangularmotor.h + bulletangularmotor_c.cpp + bulletballjoint.cpp + bulletballjoint.h + bulletballjoint_c.cpp + bulletbody.cpp + bulletbody.h + bulletbody_c.cpp + bulletboxcollider.cpp + bulletboxcollider.h + bulletboxcollider_c.cpp + bulletcapsulecollider.cpp + bulletcapsulecollider.h + bulletcapsulecollider_c.cpp + bulletcollider.cpp + bulletcollider.h + bulletcollider_c.cpp + bulletcompoundcollider.cpp + bulletcompoundcollider.h + bulletcompoundcollider_c.cpp + bulletconcavecollider.cpp + bulletconcavecollider.h + bulletconcavecollider_c.cpp + bulletconecollider.cpp + bulletconecollider.h + bulletconecollider_c.cpp + bulletconetwistjoint.cpp + bulletconetwistjoint.h + bulletconetwistjoint_c.cpp + bulletcontactjointhandler.cpp + bulletcontactjointhandler.h + bulletcontactjointhandler_c.cpp + bulletconvexcollider.cpp + bulletconvexcollider.h + bulletconvexcollider_c.cpp + bulletcylindercollider.cpp + bulletcylindercollider.h + bulletcylindercollider_c.cpp + bulletdynamicbody.cpp + bulletdynamicbody.h + bulletdynamicbody_c.cpp + bulletemptycollider.cpp + bulletemptycollider.h + bulletemptycollider_c.cpp + bulletfixedjoint.cpp + bulletfixedjoint.h + bulletfixedjoint_c.cpp + bulletgeneric6dofjoint.cpp + bulletgeneric6dofjoint.h + bulletgeneric6dofjoint_c.cpp + bullethinge2joint.cpp + bullethinge2joint.h + bullethinge2joint_c.cpp + bullethingejoint.cpp + bullethingejoint.h + bullethingejoint_c.cpp + bulletjoint.cpp + bulletjoint.h + bulletjoint_c.cpp + bulletphysicsobject.cpp + bulletphysicsobject.h + bulletphysicsobject_c.cpp + bulletphysicsserver.cpp + bulletphysicsserver.h + bulletphysicsserver_c.cpp + bulletplanecollider.cpp + bulletplanecollider.h + bulletplanecollider_c.cpp + bulletraycollider.cpp + bulletraycollider.h + bulletraycollider_c.cpp + bulletrigidbody.cpp + bulletrigidbody.h + bulletrigidbody_c.cpp + bulletsliderjoint.cpp + bulletsliderjoint.h + bulletsliderjoint_c.cpp + bulletsoftbody.cpp + bulletsoftbody.h + bulletsoftbody_c.cpp + bulletspace.cpp + bulletspace.h + bulletspace_c.cpp + bulletspherecollider.cpp + bulletspherecollider.h + bulletspherecollider_c.cpp + bulletstaticbody.cpp + bulletstaticbody.h + bulletstaticbody_c.cpp + bullettransformcollider.cpp + bullettransformcollider.h + bullettransformcollider_c.cpp + bulletuniversaljoint.cpp + bulletuniversaljoint.h + bulletuniversaljoint_c.cpp + bulletworld.cpp + bulletworld.h + bulletworld_c.cpp + bulletwrapper.h +) + +add_library(bulletimps MODULE ${bulletimps_LIB_SRCS}) + +target_link_libraries(bulletimps ${BULLET_LIBRARY} ${spark_libs}) + +if (NOT APPLE) + set_target_properties(bulletimps PROPERTIES VERSION 0.0.0 SOVERSION 0) +endif (NOT APPLE) + +install(TARGETS bulletimps DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,109 @@ +/* -*- 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$ + + 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 "bulletangularmotor.h" + +using namespace oxygen; +using namespace salt; + +AngularMotorImp::AngularMotorImp() : JointImp() +{ + +} + +long AngularMotorImp::CreateAngularMotor(long worldID) +{ +// dWorldID ODEWorld = (dWorldID) worldID; +// dJointID ODEJoint = dJointCreateAMotor(ODEWorld, 0); +// return (long) ODEJoint; +} + +void AngularMotorImp::SetModeUserMode(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dJointSetAMotorMode(ODEJoint, dAMotorUser); +} + +void AngularMotorImp::SetModeEulerMode(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dJointSetAMotorMode(ODEJoint, dAMotorEuler); +} + +int AngularMotorImp::GetMode(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// int motorMode = dJointGetAMotorMode(ODEJoint); +// if (motorMode = dAMotorUser) +// return 0; +// //motor is in Euler mode +// return 1; +} + +void AngularMotorImp::SetNumAxes(int num, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dJointSetAMotorNumAxes(ODEJoint, num); +} + +int AngularMotorImp::GetNumAxes(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// return dJointGetAMotorNumAxes(ODEJoint); +} + +void AngularMotorImp::SetMotorAxis(int idx, int anchor, Vector3f axis, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; + +// dJointSetAMotorAxis (ODEJoint, idx, anchor, +// axis[0], axis[1], axis[2]); +} + +int AngularMotorImp::GetAxisAnchor(int idx, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// return dJointGetAMotorAxisRel(ODEJoint, idx); +} + +Vector3f AngularMotorImp::GetMotorAxis(int idx, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dVector3 dAxis; +// dJointGetAMotorAxis(ODEJoint,idx,dAxis); +// return Vector3f(dAxis[0],dAxis[1],dAxis[2]); +} + +void AngularMotorImp::SetAxisAngle(int idx, float degAngle, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dJointSetAMotorAngle(ODEJoint, idx, gDegToRad(degAngle)); +} + +float AngularMotorImp::GetAxisAngle(int idx, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// return gRadToDeg(dJointGetAMotorAngle(ODEJoint, idx)); +} + +float AngularMotorImp::GetAxisAngleRate(int idx, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// return gRadToDeg(dJointGetAMotorAngleRate(ODEJoint,idx)); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,57 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + 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 BULLETANGULARMOTOR_H +#define BULLETANGULARMOTOR_H + +#include <oxygen/physicsserver/int/angularmotorint.h> +#include "bulletjoint.h" + +class AngularMotorImp : public oxygen::AngularMotorInt, public JointImp{ + +/** 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. + + See physicsserver/int/angularmotorint for a documentation. +*/ + +public: + AngularMotorImp(); + long CreateAngularMotor(long worldID); + void SetModeUserMode(long jointID); + void SetModeEulerMode(long jointID); + int GetMode(long jointID); + void SetNumAxes(int num, long jointID); + int GetNumAxes(long jointID); + void SetMotorAxis(int idx, int anchor, salt::Vector3f axis, long jointID); + int GetAxisAnchor(int idx, long jointID); + salt::Vector3f GetMotorAxis(int idx, long jointID); + void SetAxisAngle(int idx, float degAngle, long jointID); + float GetAxisAngle(int idx, long jointID); + float GetAxisAngleRate(int idx, long jointID); +}; + +DECLARE_CLASS(AngularMotorImp); + +#endif //BULLETANGULARMOTOR_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletangularmotor_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + 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 "odeangularmotor.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(AngularMotorImp)::DefineClass() +{ + DEFINE_BASECLASS(JointImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,61 @@ +/* -*- 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$ + + 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 "bulletballjoint.h" + +using namespace oxygen; +using namespace boost; +using namespace salt; + +BallJointImp::BallJointImp() : Generic6DOFJointImp() +{ +} + +long BallJointImp::CreateBallJoint(long worldID) +{ + // dWorldID ODEWorld = (dWorldID) worldID; +// dJointID ODEJoint = dJointCreateBall(ODEWorld, 0); +// return (long) ODEJoint; +} + +void BallJointImp::SetAnchor(const Vector3f& gAnchor, long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dJointSetBallAnchor (ODEJoint, gAnchor[0], gAnchor[1], gAnchor[2]); +} + +Vector3f BallJointImp::GetAnchor1(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dReal anchor[3]; +// dJointGetBallAnchor (ODEJoint, anchor); +// Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); + +// return pos; +} + +Vector3f BallJointImp::GetAnchor2(long jointID) +{ +// dJointID ODEJoint = (dJointID) jointID; +// dReal anchor[3]; +// dJointGetBallAnchor2(ODEJoint, anchor); +// Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); + +// return pos; +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,43 @@ +/* -*- 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$ + + 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 BULLETBALLJOINT_H +#define BULLETBALLJOINT_H + +#include "bulletgeneric6dofjoint.h" +#include <oxygen/physicsserver/int/balljointint.h> + +class BallJointImp : public oxygen::BallJointInt, public Generic6DOFJointImp +{ + /** See physicsserver/int/balljointint.h for documentation */ + +public: + BallJointImp(); + void SetAnchor(const salt::Vector3f& anchor, long jointID); + salt::Vector3f GetAnchor1(long jointID); + salt::Vector3f GetAnchor2(long jointID); + long CreateBallJoint(long worldID); +}; + +DECLARE_CLASS(BallJointImp); + +#endif //BULLETBALLJOINT_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletballjoint_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + 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 "odeballjoint.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(BallJointImp)::DefineClass() +{ + DEFINE_BASECLASS(Generic6DOFJointImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,29 @@ +/* -*- 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$ + + 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 "bulletbody.h" + +using namespace oxygen; + +BodyImp::BodyImp() : PhysicsObjectImp(){ + +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletbody.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,36 @@ +/* -*- 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$ + + 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 BULLETBODY_H +#define BULLETBODY_H + +#include "bulletphysicsobject.h" +#include <oxygen/physicsserver/int/bodyint.h> + +class BodyImp : public oxygen::BodyInt, public PhysicsObjectImp +{ +public: + BodyImp(); +}; + +DECLARE_CLASS(BodyImp); + +#endif //BULLETBODY_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletbody_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletbody_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletbody_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + 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 "bulletbody.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(BodyImp)::DefineClass() +{ + DEFINE_BASECLASS(PhysicsObjectImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,63 @@ +/* -*- 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$ + + 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 "bulletboxcollider.h" + +using namespace oxygen; +using namespace salt; + +BoxColliderImp::BoxColliderImp() : ConvexColliderImp() +{ +} + +void BoxColliderImp::SetBoxLengths(const Vector3f& extents, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomBoxSetLengths( +// ODEGeom, +// extents[0], +// extents[1], +// extents[2] +// ); +} + +long BoxColliderImp::CreateBox() +{ +// dGeomID ODEGeom = dCreateBox (0, 1.0f, 1.0f, 1.0f); +// return (long) ODEGeom; +} + +void BoxColliderImp::GetBoxLengths(Vector3f& extents, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dVector3 lengths; +// dGeomBoxGetLengths(ODEGeom,lengths); +// extents[0] = lengths[0]; +// extents[1] = lengths[1]; +// extents[2] = lengths[2]; +} + +float BoxColliderImp::GetPointDepth(const Vector3f& pos, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// return dGeomBoxPointDepth +// (ODEGeom,pos[0],pos[1],pos[2]); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,43 @@ +/* -*- 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$ + $Id$ + + 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 BULLETBOXCOLLIDER_H +#define BULLETBOXCOLLIDER_H + +#include "bulletconvexcollider.h" +#include <oxygen/physicsserver/int/boxcolliderint.h> + +class BoxColliderImp : public oxygen::BoxColliderInt, public ConvexColliderImp +{ + /** See physicsserver/int/boxcolliderint.h for documentation */ + +public: + BoxColliderImp(); + void SetBoxLengths(const salt::Vector3f& extents, long geomID); + void GetBoxLengths(salt::Vector3f& extents, long geomID); + float GetPointDepth(const salt::Vector3f& pos, long geomID); + long CreateBox(); +}; + +DECLARE_CLASS(BoxColliderImp); + +#endif //BULLETBOXCOLLIDER_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletboxcollider_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + 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 "bulletboxcollider.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(BoxColliderImp)::DefineClass() +{ + DEFINE_BASECLASS(ConvexColliderImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,83 @@ +/* -*- 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$ + + 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 "odecapsulecollider.h" + +using namespace oxygen; +using namespace salt; + +CapsuleColliderImp::CapsuleColliderImp() : ConvexColliderImp() +{ +} + +void CapsuleColliderImp::SetParams(float radius, float length, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomCapsuleSetParams (ODEGeom, radius, length); +} + +void CapsuleColliderImp::SetRadius(float radius, long geomID) +{ +// SetParams(radius, GetLength(geomID), geomID); +} + +void CapsuleColliderImp::SetLength(float length, long geomID) +{ +// SetParams(GetRadius(geomID), length, geomID); +} + +void CapsuleColliderImp::GetParams(float& radius, float& length, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dReal r,l; +// dGeomCapsuleGetParams(ODEGeom,&r,&l); +// radius = r; +// length = l; +} + +float CapsuleColliderImp::GetRadius(long geomID) +{ +// float length; +// float radius; +// GetParams(radius, length, geomID); +// return radius; +} + +float CapsuleColliderImp::GetLength(long geomID) +{ +// float radius; +// float length; +// GetParams(radius, length, geomID); +// return length; +} + +long CapsuleColliderImp::CreateCapsule() +{ +// dGeomID ODEGeom = dCreateCapsule(0, 1.0f, 1.0f); +// return (long) ODEGeom; +} + +float CapsuleColliderImp::GetPointDepth(const Vector3f& pos, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// return dGeomCapsulePointDepth +// (ODEGeom,pos[0],pos[1],pos[2]); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,54 @@ +/* -*- 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$ + + 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 BULLETCAPSULECOLLIDER_H +#define BULLETCAPSULECOLLIDER_H + +#include "bulletconvexcollider.h" +#include <oxygen/physicsserver/int/capsulecolliderint.h> + +class CapsuleColliderImp : public oxygen::CapsuleColliderInt, public ConvexColliderImp +{ +public: + /** CapsuleCollider encapsulates a capsule geometry + object. A capsule is like a cylinder except it has + half-sphere caps at its ends. This feature makes the internal + collision detection code particularly fast and accurate. + + See physicsserver/int/capsulecolliderint.h for documentation + */ + + CapsuleColliderImp(); + + void SetParams(float radius, float length, long geomID); + void SetRadius(float radius, long geomID); + void SetLength(float length, long geomID); + void GetParams(float& radius, float& length, long geomID); + float GetRadius(long geomID); + float GetLength(long geomID); + float GetPointDepth(const salt::Vector3f& pos, long geomID); + long CreateCapsule(); +}; + +DECLARE_CLASS(CapsuleColliderImp); + +#endif //BULLETCAPSULECOLLIDER_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcapsulecollider_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + 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 "odecapsulecollider.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(CapsuleColliderImp)::DefineClass() +{ + DEFINE_BASECLASS(ConvexColliderImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,129 @@ +/* -*- 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$ + + 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 "bulletcollider.h" +#include <oxygen/physicsserver/collider.h> + +using namespace oxygen; +using namespace salt; +using namespace boost; +using namespace std; + +ColliderImp::ColliderImp() : PhysicsObjectImp() +{ +} + +ColliderImp::~ColliderImp() +{ +} + +Collider* ColliderImp::GetColliderPointer(long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// return static_cast<Collider*>(dGeomGetData(ODEGeom)); +} + +void ColliderImp::SetRotation(const Matrix& rot, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dMatrix3 ODEMatrix; +// GenericPhysicsMatrix& matrixRef = (GenericPhysicsMatrix&) ODEMatrix; +// ConvertRotationMatrix(rot, matrixRef); +// dGeomSetRotation(ODEGeom, ODEMatrix); +} + +void ColliderImp::SetPosition(const Vector3f& globalPos, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomSetPosition (ODEGeom, globalPos[0], globalPos[1], globalPos[2]); +} + +void ColliderImp::SetLocalPosition(const Vector3f& pos, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomSetPosition (ODEGeom, pos[0], pos[1], pos[2]); +} + +Vector3f ColliderImp::GetPosition(long geomID) const +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// const dReal* pos = dGeomGetPosition(ODEGeom); +// return Vector3f(pos[0],pos[1],pos[2]); +} + +long ColliderImp::GetParentSpaceID(long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// return (long) dGeomGetSpace(ODEGeom); +} + +bool ColliderImp::Intersect(boost::shared_ptr<Collider> collider, long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dContactGeom contact; + +// return dCollide +// (ODEGeom, +// (dGeomID) collider->GetGeomID(), +// 1, /* ask for at most one collision point */ +// &contact, +// sizeof(contact) +// ) > 0; +} + +void ColliderImp::DestroyGeom(long geomID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomDestroy(ODEGeom); +} + +void ColliderImp::TransformSetGeom(long parentGeomID, long geomID) +{ +// dGeomID parentODEGeom = (dGeomID) parentGeomID; +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomTransformSetGeom(parentODEGeom, ODEGeom); +} + +void ColliderImp::SetSpace(long spaceID, long geomID, Collider* collider) +{ +// dSpaceID ODESpace = (dSpaceID) spaceID; +// dGeomID ODEGeom = (dGeomID) geomID; + +// if (!spaceID) return; +// if (dSpaceQuery(ODESpace, ODEGeom)) return; + +// dGeomSetData(ODEGeom, collider); +// dSpaceAdd(ODESpace, ODEGeom); +} + +void ColliderImp::SetBody(long bodyID, long geomID) +{ +// dBodyID ODEBody = (dBodyID) bodyID; +// dGeomID ODEGeom = (dGeomID) geomID; +// dGeomSetBody(ODEGeom, ODEBody); +} + +void ColliderImp::RemoveFromSpace(long geomID, long spaceID) +{ +// dGeomID ODEGeom = (dGeomID) geomID; +// dSpaceID ODESpace = (dSpaceID) spaceID; +// dSpaceRemove(ODESpace, ODEGeom); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,65 @@ +/* -*- 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$ + + 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 ODECOLLIDER_H +#define ODECOLLIDER_H + +#include "odephysicsobject.h" +#include <oxygen/physicsserver/int/colliderint.h> + +class ColliderImp : public oxygen::ColliderInt, public PhysicsObjectImp +{ + +public: + ColliderImp(); + virtual ~ColliderImp(); + + /** \class Collider encapsulates a geometry object- geom for + short. Geoms are the fundamental objects in the collision + system. They represent a single rigid shape as for example a + sphere or a box. A special kind of geom called 'space' can + represent a group of other geoms. A placeable geom can be + associated with rigid body objects. This allows the collision + engine to get the position and orientation of the geoms from the + bodies. A body and a geom together represent all the properties of + the simulated object. + + See physicsserver/int/colliderint.h for documentation. + */ + + oxygen::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; + void SetRotation(const salt::Matrix& rot, long geomID); + bool Intersect(boost::shared_ptr<oxygen::Collider> collider, long geomID); + long GetParentSpaceID(long geomID); + void DestroyGeom(long geomID); + void TransformSetGeom(long parentGeomID, long geomID); + void SetSpace(long spaceID, long geomID, oxygen::Collider* collider); + void SetBody(long bodyID, long geomID); + void RemoveFromSpace(long geomID, long spaceID); +}; + +DECLARE_CLASS(ColliderImp); + +#endif //ODECOLLIDER_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcollider_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + 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 "bulletcollider.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(ColliderImp)::DefineClass() +{ + DEFINE_BASECLASS(PhysicsObjectImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,29 @@ +/* -*- 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$ + + 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 "bulletcompoundcollider.h" + +using namespace oxygen; + +CompoundColliderImp::CompoundColliderImp() : ColliderImp(){ + +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,36 @@ +/* -*- 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$ + + 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 BULLETCOMPOUNDCOLLIDER_H +#define BULLETCOMPOUNDCOLLIDER_H + +#include "bulletcollider.h" +#include <oxygen/physicsserver/int/compoundcolliderint.h> + +class CompoundColliderImp : public oxygen::CompoundColliderInt, public ColliderImp +{ +public: + CompoundColliderImp(); +}; + +DECLARE_CLASS(CompoundColliderImp); + +#endif //BULLETCOMPOUNDCOLLIDER_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletcompoundcollider_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + 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 "bulletcompoundcollider.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(CompoundColliderImp)::DefineClass() +{ + DEFINE_BASECLASS(ColliderImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,29 @@ +/* -*- 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$ + + 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 "bulletconcavecollider.h" + +using namespace oxygen; + +ConcaveColliderImp::ConcaveColliderImp() : ColliderImp(){ + +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,36 @@ +/* -*- 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$ + + 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 BULLETCONCAVECOLLIDER_H +#define BULLETCONCAVECOLLIDER_H + +#include "bulletcollider.h" +#include <oxygen/physicsserver/int/concavecolliderint.h> + +class ConcaveColliderImp : public oxygen::ConcaveColliderInt, public ColliderImp +{ +public: + ConcaveColliderImp(); +}; + +DECLARE_CLASS(ConcaveColliderImp); + +#endif //BULLETCONCAVECOLLIDER_H Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider_c.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider_c.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletconcavecollider_c.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,27 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + 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 "bulletconcavecollider.h" +#include <zeitgeist/zeitgeist.h> + +void CLASS(ConcaveColliderImp)::DefineClass() +{ + DEFINE_BASECLASS(ColliderImp); +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.cpp =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.cpp (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.cpp 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,29 @@ +/* -*- 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$ + + 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 "bulletconecollider.h" + +using namespace oxygen; + +ConeColliderImp::ConeColliderImp() : ConvexColliderImp(){ + +} Added: branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.h =================================================================== --- branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.h (rev 0) +++ branches/bullet-plugin/spark/plugin/bulletimps/bulletconecollider.h 2010-06-14 09:38:48 UTC (rev 218) @@ -0,0 +1,36 @@ +/* -*- 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$ + + 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 hav... [truncated message content] |