2006-01-30 20:33:59 +00:00
|
|
|
#ifndef KX_VEHICLE_WRAPPER
|
|
|
|
#define KX_VEHICLE_WRAPPER
|
|
|
|
|
|
|
|
#include "Value.h"
|
|
|
|
#include "PHY_DynamicTypes.h"
|
|
|
|
class PHY_IVehicle;
|
2006-02-13 06:28:35 +00:00
|
|
|
class PHY_IMotionState;
|
|
|
|
|
|
|
|
#include <vector>
|
2006-01-30 20:33:59 +00:00
|
|
|
|
|
|
|
///Python interface to physics vehicles (primarily 4-wheel cars and 2wheel bikes)
|
|
|
|
class KX_VehicleWrapper : public PyObjectPlus
|
|
|
|
{
|
|
|
|
Py_Header;
|
2006-02-13 06:28:35 +00:00
|
|
|
|
|
|
|
std::vector<PHY_IMotionState*> m_motionStates;
|
|
|
|
|
2006-01-30 20:33:59 +00:00
|
|
|
public:
|
2009-06-28 11:22:26 +00:00
|
|
|
KX_VehicleWrapper(PHY_IVehicle* vehicle,class PHY_IPhysicsEnvironment* physenv);
|
2006-01-30 20:33:59 +00:00
|
|
|
virtual ~KX_VehicleWrapper ();
|
|
|
|
int getConstraintId();
|
|
|
|
|
2010-10-31 04:11:39 +00:00
|
|
|
#ifdef WITH_PYTHON
|
2006-01-30 20:33:59 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,AddWheel);
|
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetNumWheels);
|
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetWheelOrientationQuaternion);
|
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetWheelRotation);
|
2006-02-13 06:28:35 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetWheelPosition);
|
2006-01-30 20:33:59 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetConstraintId);
|
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetConstraintType);
|
2006-01-30 20:33:59 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetSteeringValue);
|
2006-02-13 06:28:35 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,ApplyEngineForce);
|
2006-02-13 06:28:35 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,ApplyBraking);
|
2006-02-13 06:28:35 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetTyreFriction);
|
2006-02-13 06:28:35 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetSuspensionStiffness);
|
2006-02-21 07:08:23 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetSuspensionDamping);
|
2006-02-21 07:08:23 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetSuspensionCompression);
|
2006-02-21 07:08:23 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetRollInfluence);
|
2010-10-31 04:11:39 +00:00
|
|
|
#endif // WITH_PYTHON
|
2006-01-30 20:33:59 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
PHY_IVehicle* m_vehicle;
|
|
|
|
PHY_IPhysicsEnvironment* m_physenv;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //KX_VEHICLE_WRAPPER
|