2011-02-22 10:33:14 +00:00
|
|
|
|
|
|
|
/** \file KX_VehicleWrapper.h
|
|
|
|
* \ingroup ketsji
|
|
|
|
*/
|
|
|
|
|
2012-02-23 10:41:31 +00:00
|
|
|
#ifndef __KX_VEHICLEWRAPPER_H__
|
|
|
|
#define __KX_VEHICLEWRAPPER_H__
|
2006-01-30 20:33:59 +00:00
|
|
|
|
|
|
|
#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
|
|
|
|
{
|
2011-11-06 01:39:36 +00:00
|
|
|
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);
|
2012-10-09 13:36:42 +00:00
|
|
|
#endif /* WITH_PYTHON */
|
2006-01-30 20:33:59 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
PHY_IVehicle* m_vehicle;
|
|
|
|
PHY_IPhysicsEnvironment* m_physenv;
|
|
|
|
};
|
|
|
|
|
2012-10-09 13:36:42 +00:00
|
|
|
#endif /* __KX_VEHICLEWRAPPER_H__ */
|