8#include <CustomDGRayCastCar.h>
19 dMatrix carCordenatSytem;
20 carCordenatSytem.m_front = dVector (0.0f, 0.0f, -1.0f, 0.0f);
21 carCordenatSytem.m_up = dVector (0.0f, 1.0f, 0.0f, 0.0f);
22 carCordenatSytem.m_right = carCordenatSytem.m_front * carCordenatSytem.m_up;
23 carCordenatSytem.m_posit = dVector (0.0f, 0.0f, 0.0f, 1.0f);
38 void Vehicle::AddSingleSuspensionTire(Ogre::Node* node,
const Ogre::Real mass,
const Ogre::Real radius,
const Ogre::Real width,
const Ogre::Real friction,
const Ogre::Real susLength,
const Ogre::Real susSpring,
const Ogre::Real susShock,
const bool steer,
const bool driving)
41 veh->
addTire(node, mass, radius, width, friction, susLength, susSpring, susShock, steer, driving);
47 return veh->GetTiresCount();
53 return veh->GetSpeed();
81 return veh->GetVehicleOnAir() ? true :
false;
main class for all Rigid Bodies in the system.
base class for all joints.
void SetSupportJoint(CustomJoint *supportJoint)
SetSupportJoint.
void ApplySteering(dFloat angle)
void ApplyTorque(dFloat torque)
void addTire(Ogre::Node *node, const Ogre::Real mass, const Ogre::Real radius, const Ogre::Real width, const Ogre::Real friction, const Ogre::Real susLength, const Ogre::Real susSpring, const Ogre::Real susShock, const bool steer, const bool driving)
Ogre::Real getTireAngularVelocity(unsigned int index)
void ApplyBrake(dFloat brakeTorque)
int getTireIndexByNode(Ogre::Node *node)
bool getTireOnAir(unsigned int index)
void showDebugData(Ogre::SceneNode *debugRootNode)
show joint visual debugging data
OgreNewt::Body * getVehicleBody()
virtual void showDebugData(Ogre::SceneNode *debugRootNode)
show joint visual debugging data
int GetTiresCount() const
get current tire count
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, const Ogre::Real susSpring, const Ogre::Real susShock, const bool steer=false, const bool driving=false)
add and independent suspension tire to the car body
virtual ~Vehicle()
destructor
bool getTireOnAir(Ogre::Node *node)
Vehicle(OgreNewt::Body *carBody)
constructor
void setBrake(Ogre::Real brake)
void setDrivingTorque(Ogre::Radian torque)
void setSteerAngle(Ogre::Radian angle)
Ogre::Real getTireAngularVelocity(Ogre::Node *node)