File: PHY_IVehicle.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 (57 lines) | stat: -rw-r--r-- 1,704 bytes parent folder | download | duplicates (2)
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
#ifndef PHY_IVEHICLE_H
#define PHY_IVEHICLE_H

//PHY_IVehicle provides a generic interface for (raycast based) vehicles. Mostly targetting 4 wheel cars and 2 wheel motorbikes.

class PHY_IMotionState;
#include "PHY_DynamicTypes.h"

class PHY_IVehicle
{
public:

	virtual ~PHY_IVehicle();
	
	virtual void	AddWheel(
			PHY_IMotionState* motionState,
			PHY__Vector3	connectionPoint,
			PHY__Vector3	downDirection,
			PHY__Vector3	axleDirection,
			float	suspensionRestLength,
			float wheelRadius,
			bool hasSteering
		) = 0;


	virtual	int		GetNumWheels() const = 0;
	
	virtual void	GetWheelPosition(int wheelIndex,float& posX,float& posY,float& posZ) const = 0;
	virtual void	GetWheelOrientationQuaternion(int wheelIndex,float& quatX,float& quatY,float& quatZ,float& quatW) const = 0;
	virtual float	GetWheelRotation(int wheelIndex) const = 0;

	virtual int	GetUserConstraintId() const =0;
	virtual int	GetUserConstraintType() const =0;

	//some basic steering/braking/tuning/balancing (bikes)

	virtual	void	SetSteeringValue(float steering,int wheelIndex) = 0;

	virtual	void	ApplyEngineForce(float force,int wheelIndex) = 0;

	virtual	void	ApplyBraking(float braking,int wheelIndex) = 0;

	virtual	void	SetWheelFriction(float friction,int wheelIndex) = 0;
	
	virtual	void	SetSuspensionStiffness(float suspensionStiffness,int wheelIndex) = 0;
	
	virtual	void	SetSuspensionDamping(float suspensionStiffness,int wheelIndex) = 0;
	
	virtual	void	SetSuspensionCompression(float suspensionStiffness,int wheelIndex) = 0;
	
	virtual	void	SetRollInfluence(float rollInfluence,int wheelIndex) = 0;

	virtual void	SetCoordinateSystem(int rightIndex,int upIndex,int forwardIndex) =0;

};

#endif //PHY_IVEHICLE_H