SO3Engine
|
Represents a wheeled vehicle. More...
#include <OgreNewt_Vehicle.h>
Public Member Functions | |
Vehicle (OgreNewt::Body *carBody) | |
constructor | |
virtual | ~Vehicle () |
destructor | |
OgreNewt::Body * | getVehicleBody () |
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 | |
int | GetTiresCount () const |
get current tire count | |
Ogre::Real | getSpeed () |
void | setSteerAngle (Ogre::Radian angle) |
void | setDrivingTorque (Ogre::Radian torque) |
void | setBrake (Ogre::Real brake) |
bool | getVehicleOnAir () |
bool | getTireOnAir (Ogre::Node *node) |
Ogre::Real | getTireAngularVelocity (Ogre::Node *node) |
virtual void | showDebugData (Ogre::SceneNode *debugRootNode) |
show joint visual debugging data | |
Public Member Functions inherited from OgreNewt::Joint | |
Joint () | |
constructor | |
virtual | ~Joint () |
destructor | |
Body * | getBody0 () const |
get the pointer to the first rigid body | |
Body * | getBody1 () const |
get the pointer to the first rigid body | |
const OgreNewt::World * | getWorld () |
get the pointer to the world | |
virtual void | submitConstraint (Ogre::Real timeStep, int threadIndex) |
must be define for a functioning joint. | |
int | getCollisionState () const |
returns collision state | |
void | setCollisionState (int state) const |
sets the collision state | |
Ogre::Real | getStiffness () const |
get joint stiffness | |
void | setStiffness (Ogre::Real stiffness) const |
set joint stiffness | |
Additional Inherited Members | |
Protected Member Functions inherited from OgreNewt::Joint | |
void | addLinearRow (const Ogre::Vector3 &pt0, const Ogre::Vector3 &pt1, const Ogre::Vector3 &dir) const |
void | addAngularRow (Ogre::Radian relativeAngleError, const Ogre::Vector3 &dir) const |
void | addGeneralRow (const Ogre::Vector3 &linear0, const Ogre::Vector3 &angular0, const Ogre::Vector3 &linear1, const Ogre::Vector3 &angular1) const |
void | setRowMinimumFriction (Ogre::Real friction) const |
void | setRowMaximumFriction (Ogre::Real friction) const |
void | setRowStiffness (Ogre::Real stiffness) const |
void | setRowAcceleration (Ogre::Real accel) const |
void | setRowSpringDamper (Ogre::Real springK, Ogre::Real springD) const |
void | SetSupportJoint (CustomJoint *supportJoint) |
SetSupportJoint. | |
CustomJoint * | GetSupportJoint () const |
GetSupportJoint. | |
Static Protected Member Functions inherited from OgreNewt::Joint | |
static void _CDECL | destructorCallback (const CustomJoint *me) |
joint destructor callback glue | |
static void _CDECL | submitConstraintCallback (const CustomJoint *me, dFloat timestep, int threadIndex) |
submintContraint | |
Protected Attributes inherited from OgreNewt::Joint | |
CustomJoint * | m_joint |
Represents a wheeled vehicle.
this class represents a basic vehicle, meant to be inherited by the user, with functionality added.
Definition at line 27 of file OgreNewt_Vehicle.h.
OgreNewt::Vehicle::Vehicle | ( | OgreNewt::Body * | carBody | ) |
constructor
Definition at line 15 of file OgreNewt_Vehicle.cpp.
|
virtual |
destructor
Definition at line 29 of file OgreNewt_Vehicle.cpp.
void OgreNewt::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 = false , |
||
const bool | driving = false |
||
) |
add and independent suspension tire to the car body
Definition at line 38 of file OgreNewt_Vehicle.cpp.
Ogre::Real OgreNewt::Vehicle::getSpeed | ( | ) |
Definition at line 50 of file OgreNewt_Vehicle.cpp.
Ogre::Real OgreNewt::Vehicle::getTireAngularVelocity | ( | Ogre::Node * | node | ) |
Definition at line 100 of file OgreNewt_Vehicle.cpp.
bool OgreNewt::Vehicle::getTireOnAir | ( | Ogre::Node * | node | ) |
Definition at line 90 of file OgreNewt_Vehicle.cpp.
int OgreNewt::Vehicle::GetTiresCount | ( | ) | const |
get current tire count
Definition at line 44 of file OgreNewt_Vehicle.cpp.
OgreNewt::Body * OgreNewt::Vehicle::getVehicleBody | ( | ) |
Definition at line 33 of file OgreNewt_Vehicle.cpp.
bool OgreNewt::Vehicle::getVehicleOnAir | ( | ) |
Definition at line 77 of file OgreNewt_Vehicle.cpp.
void OgreNewt::Vehicle::setBrake | ( | Ogre::Real | brake | ) |
Definition at line 71 of file OgreNewt_Vehicle.cpp.
void OgreNewt::Vehicle::setDrivingTorque | ( | Ogre::Radian | torque | ) |
Definition at line 65 of file OgreNewt_Vehicle.cpp.
void OgreNewt::Vehicle::setSteerAngle | ( | Ogre::Radian | angle | ) |
Definition at line 59 of file OgreNewt_Vehicle.cpp.
|
virtual |
show joint visual debugging data
this function is called from the Debug display utility to show joint debug display information the function should be overridden by any derive class who wishes to show debug physics information for this joint in real time.
Reimplemented from OgreNewt::Joint.
Definition at line 84 of file OgreNewt_Vehicle.cpp.