Project

General

Profile

SO3Engine
OgreNewt_Vehicle.h
Go to the documentation of this file.
1/*
2 OgreNewt Library
3
4 Ogre implementation of Newton Game Dynamics SDK
5
6 OgreNewt basically has no license, you may use any or all of the library however you desire... I hope it can help you in any way.
7
8 by Walaber
9 some changes by melven
10
11*/
12#ifndef _INCLUDE_OGRENEWT_VEHICLE
13#define _INCLUDE_OGRENEWT_VEHICLE
14
16#include "OgreNewt_MaterialID.h"
17#include "OgreNewt_Joint.h"
18
19
20
21namespace OgreNewt
22{
24
27 class _OgreNewtExport Vehicle: public Joint
28 {
29 private:
30 OgreNewt::Body* m_body;
31
32 public:
33
35 Vehicle(OgreNewt::Body* carBody);
36
38 virtual ~Vehicle();
39
40 OgreNewt::Body* getVehicleBody();
41
43 /*
44 The ray cast car does uses rigid bodies to simulates tires, therefore tire movement is no emergent physical behavior
45 instead is come for the interpretation for the empirical equations of the steady state tires curves.
46 \param body of the tire
47 \param radius radius of the tire
48 \param susLength spring length
49 \param susSpring spring strength
50 \param susShock spring damper coefficient
51 */
52 void AddSingleSuspensionTire (Ogre::Node* node, const Ogre::Real mass, const Ogre::Real radius, const Ogre::Real width, const Ogre::Real friction, const Ogre::Real susLength,
53 const Ogre::Real susSpring, const Ogre::Real susShock, const bool steer = false, const bool driving = false);
54
56 int GetTiresCount() const;
57
58 Ogre::Real getSpeed();
59
60 void setSteerAngle(Ogre::Radian angle);
61
62 void setDrivingTorque(Ogre::Radian torque);
63
64 void setBrake(Ogre::Real brake);
65
66 bool getVehicleOnAir();
67
68 bool getTireOnAir(Ogre::Node* node);
69
70 Ogre::Real getTireAngularVelocity(Ogre::Node* node);
71
72 virtual void showDebugData(Ogre::SceneNode* debugRootNode);
73 protected:
74 };
75
76}; // end NAMESPACE OgreNewt
77
78
79#endif
80
main class for all Rigid Bodies in the system.
base class for all joints.
Represents a wheeled vehicle.