File: KX_VehicleWrapper.h

package info (click to toggle)
blender 2.46%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 68,208 kB
  • ctags: 77,061
  • sloc: ansic: 518,049; cpp: 199,438; python: 67,585; sh: 7,097; makefile: 3,572; perl: 2,082; java: 8
file content (58 lines) | stat: -rw-r--r-- 1,546 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef KX_VEHICLE_WRAPPER
#define KX_VEHICLE_WRAPPER

#include "Value.h"
#include "PHY_DynamicTypes.h"
class PHY_IVehicle;
class PHY_IMotionState;

#include <vector>

///Python interface to physics vehicles (primarily 4-wheel cars and 2wheel bikes)
class	KX_VehicleWrapper : public PyObjectPlus
{
	Py_Header;
	virtual PyObject*		_getattr(const STR_String& attr);
	virtual int 			_setattr(const STR_String& attr, PyObject *value);

	std::vector<PHY_IMotionState*> m_motionStates;

public:
	KX_VehicleWrapper(PHY_IVehicle* vehicle,class PHY_IPhysicsEnvironment* physenv,PyTypeObject *T = &Type);
	virtual ~KX_VehicleWrapper ();
	int			getConstraintId();
	
	
	KX_PYMETHOD(KX_VehicleWrapper,AddWheel);
	KX_PYMETHOD(KX_VehicleWrapper,GetNumWheels);
	KX_PYMETHOD(KX_VehicleWrapper,GetWheelOrientationQuaternion);
	KX_PYMETHOD(KX_VehicleWrapper,GetWheelRotation);
	
	KX_PYMETHOD(KX_VehicleWrapper,GetWheelPosition);
	
	KX_PYMETHOD(KX_VehicleWrapper,GetConstraintId);
	KX_PYMETHOD(KX_VehicleWrapper,GetConstraintType);

	KX_PYMETHOD(KX_VehicleWrapper,SetSteeringValue);

	KX_PYMETHOD(KX_VehicleWrapper,ApplyEngineForce);

	KX_PYMETHOD(KX_VehicleWrapper,ApplyBraking);

	KX_PYMETHOD(KX_VehicleWrapper,SetTyreFriction);

	KX_PYMETHOD(KX_VehicleWrapper,SetSuspensionStiffness);
	
	KX_PYMETHOD(KX_VehicleWrapper,SetSuspensionDamping);
	
	KX_PYMETHOD(KX_VehicleWrapper,SetSuspensionCompression);
	
	KX_PYMETHOD(KX_VehicleWrapper,SetRollInfluence);
	

private:
	PHY_IVehicle*			 m_vehicle;
	PHY_IPhysicsEnvironment* m_physenv;
};

#endif //KX_VEHICLE_WRAPPER