From dd12e508d9ae463097815cf95d6b0cdeb6e1f6c2 Mon Sep 17 00:00:00 2001 From: josh Date: Sun, 31 Jan 2010 02:19:39 +0000 Subject: [PATCH] adding AMotors works! added test to managed_objects.lua git-svn-id: svn://anubis/misc/OdeWorld@226 bd8a9e45-a331-0410-811e-c64571078777 --- OdeWorld.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/OdeWorld.h b/OdeWorld.h index b983887..12861d4 100644 --- a/OdeWorld.h +++ b/OdeWorld.h @@ -7,6 +7,10 @@ #include #include #include "refptr/refptr.h" +#ifdef DEBUG_AMOTOR +#include +using namespace std; +#endif class OdeWorld { @@ -75,31 +79,53 @@ class OdeWorld dJointID createAMotor(dBodyID b1, dBodyID b2); void setAMotorNumAxes(dJointID j, int num_axes) { +#ifdef DEBUG_AMOTOR + cout << "num axes: " << num_axes << endl; +#endif dJointSetAMotorNumAxes(j, num_axes); } void setAMotorAxis(dJointID j, int anum, int rel, dReal x, dReal y, dReal z) { +#ifdef DEBUG_AMOTOR + cout << "axis: " << anum << ", " << rel + << ", (" << x << ", " << y << ", " << z << ")" << endl; +#endif dJointSetAMotorAxis(j, anum, rel, x, y, z); } void setAMotorLoStop(dJointID j, dReal val) { +#ifdef DEBUG_AMOTOR + cout << "lo stop: " << val << endl; +#endif dJointSetAMotorParam(j, dParamLoStop, val); } void setAMotorHiStop(dJointID j, dReal val) { +#ifdef DEBUG_AMOTOR + cout << "hi stop: " << val << endl; +#endif dJointSetAMotorParam(j, dParamHiStop, val); } void setAMotorVel(dJointID j, dReal val) { +#ifdef DEBUG_AMOTOR + cout << "vel: " << val << endl; +#endif dJointSetAMotorParam(j, dParamVel, val); } void setAMotorFMax(dJointID j, dReal val) { +#ifdef DEBUG_AMOTOR + cout << "fmax: " << val << endl; +#endif dJointSetAMotorParam(j, dParamFMax, val); } void setAMotorBounce(dJointID j, dReal val) { +#ifdef DEBUG_AMOTOR + cout << "bounce: " << val << endl; +#endif dJointSetAMotorParam(j, dParamBounce, val); }