adding AMotors works! added test to managed_objects.lua
git-svn-id: svn://anubis/misc/OdeWorld@226 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
f9681f1c79
commit
dd12e508d9
26
OdeWorld.h
26
OdeWorld.h
@ -7,6 +7,10 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include "refptr/refptr.h"
|
||||
#ifdef DEBUG_AMOTOR
|
||||
#include <iostream>
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user