SO3Engine
|
OgreNewt_RayCastVehicle.cpp
Go to the documentation of this file.
11 RaycastVehicle::Tire::Tire(RaycastVehicle* vehicle, Ogre::Node* node, const bool steer, const bool driving, const int id)
46 dMatrix carMatrix(dQuaternion (orient.w, orient.x, orient.y, orient.z), dVector (pos.x, pos.y, pos.z, 1.0f));
58 debug.buildDebugObjectFromCollision(m_debug.m_visualDebug, Ogre::ColourValue(0, 0, 1, 1), tire.m_shape);
63 dMatrix tireBaseMatrix (m_vehicle->CalculateSuspensionMatrix(m_tireId, tire.m_posit) * m_vehicle->GetChassisMatrixLocal() * carMatrix);
96 m_node->setPosition((m_nodeParent->_getDerivedOrientation().Inverse() * (pos - m_nodeParent->_getDerivedPosition()) / gscale));
100 RaycastVehicle::RaycastVehicle(const dMatrix carMatrix, OgreNewt::Body* carBody) : CustomDGRayCastCar(16, carMatrix, carBody->getNewtonBody())
103 m_body->setNodeUpdateJointNotify<RaycastVehicle>(&RaycastVehicle::setTireTransformCallback, this);
159 void RaycastVehicle::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)
void setNodeUpdateJointNotify(NodeUpdateNotifyCallback callback)
Definition OgreNewt_Body.cpp:755
void setNodeUpdateNotify(NodeUpdateNotifyCallback callback)
set a custom node update notify.
Definition OgreNewt_Body.cpp:750
void ApplySteering(dFloat angle)
Definition OgreNewt_RayCastVehicle.cpp:140
void ApplyTorque(dFloat torque)
Definition OgreNewt_RayCastVehicle.cpp:130
RaycastVehicle::Tire * getTire(unsigned int index)
Definition OgreNewt_RayCastVehicle.cpp:198
RaycastVehicle(const dMatrix carMatrix, OgreNewt::Body *carBody)
constructor
Definition OgreNewt_RayCastVehicle.cpp:100
void getTireMatrix(unsigned int index, dMatrix &outMatrix)
Definition OgreNewt_RayCastVehicle.cpp:124
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)
Definition OgreNewt_RayCastVehicle.cpp:159
Ogre::Real getTireAngularVelocity(unsigned int index)
Definition OgreNewt_RayCastVehicle.cpp:235
void ApplyBrake(dFloat brakeTorque)
Definition OgreNewt_RayCastVehicle.cpp:150
int getTireIndexByNode(Ogre::Node *node)
Definition OgreNewt_RayCastVehicle.cpp:248
bool getTireOnAir(unsigned int index)
Definition OgreNewt_RayCastVehicle.cpp:224
OgreNewt::Body * getCarBody()
Definition OgreNewt_RayCastVehicle.cpp:119
void showDebugData(Ogre::SceneNode *debugRootNode)
show joint visual debugging data
Definition OgreNewt_RayCastVehicle.cpp:215
_OgreNewtExport void MatrixToQuatPos(const dFloat *matrix, Ogre::Quaternion &quat, Ogre::Vector3 &pos)
Take a Newton matrix and create a Quaternion + Position_vector.
_OgreNewtExport void QuatPosToMatrix(const Ogre::Quaternion &quat, const Ogre::Vector3 &pos, dFloat *matrix)
Take a Quaternion and Position Matrix and create a Newton-happy float matrix!
Definition OgreNewt_Tools.cpp:33
Generated by 1.9.8