Bullet Collision Detection & Physics Library
Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
btRaycastVehicle Class Reference

rayCast vehicle, very special constraint that turn a rigidbody into a vehicle. More...

#include <btRaycastVehicle.h>

Inheritance diagram for btRaycastVehicle:
Inheritance graph
[legend]
Collaboration diagram for btRaycastVehicle:
Collaboration graph
[legend]

Classes

class  btVehicleTuning
 

Public Member Functions

 btRaycastVehicle (const btVehicleTuning &tuning, btRigidBody *chassis, btVehicleRaycaster *raycaster)
 
virtual ~btRaycastVehicle ()
 
virtual void updateAction (btCollisionWorld *collisionWorld, btScalar step)
 btActionInterface interface More...
 
void debugDraw (btIDebugDraw *debugDrawer)
 btActionInterface interface More...
 
const btTransformgetChassisWorldTransform () const
 
btScalar rayCast (btWheelInfo &wheel)
 
virtual void updateVehicle (btScalar step)
 
void resetSuspension ()
 
btScalar getSteeringValue (int wheel) const
 
void setSteeringValue (btScalar steering, int wheel)
 
void applyEngineForce (btScalar force, int wheel)
 
const btTransformgetWheelTransformWS (int wheelIndex) const
 
void updateWheelTransform (int wheelIndex, bool interpolatedTransform=true)
 
btWheelInfoaddWheel (const btVector3 &connectionPointCS0, const btVector3 &wheelDirectionCS0, const btVector3 &wheelAxleCS, btScalar suspensionRestLength, btScalar wheelRadius, const btVehicleTuning &tuning, bool isFrontWheel)
 
int getNumWheels () const
 
const btWheelInfogetWheelInfo (int index) const
 
btWheelInfogetWheelInfo (int index)
 
void updateWheelTransformsWS (btWheelInfo &wheel, bool interpolatedTransform=true)
 
void setBrake (btScalar brake, int wheelIndex)
 
void setPitchControl (btScalar pitch)
 
void updateSuspension (btScalar deltaTime)
 
virtual void updateFriction (btScalar timeStep)
 
btRigidBodygetRigidBody ()
 
const btRigidBodygetRigidBody () const
 
int getRightAxis () const
 
int getUpAxis () const
 
int getForwardAxis () const
 
btVector3 getForwardVector () const
 Worldspace forward vector. More...
 
btScalar getCurrentSpeedKmHour () const
 Velocity of vehicle (positive if velocity vector has same direction as foward vector) More...
 
virtual void setCoordinateSystem (int rightIndex, int upIndex, int forwardIndex)
 
int getUserConstraintType () const
 backwards compatibility More...
 
void setUserConstraintType (int userConstraintType)
 
void setUserConstraintId (int uid)
 
int getUserConstraintId () const
 
- Public Member Functions inherited from btActionInterface
virtual ~btActionInterface ()
 

Public Attributes

btAlignedObjectArray< btWheelInfom_wheelInfo
 

Private Member Functions

void defaultInit (const btVehicleTuning &tuning)
 

Private Attributes

btAlignedObjectArray< btVector3m_forwardWS
 
btAlignedObjectArray< btVector3m_axle
 
btAlignedObjectArray< btScalarm_forwardImpulse
 
btAlignedObjectArray< btScalarm_sideImpulse
 
int m_userConstraintType
 backwards compatibility More...
 
int m_userConstraintId
 
btVehicleRaycasterm_vehicleRaycaster
 
btScalar m_pitchControl
 
btScalar m_steeringValue
 
btScalar m_currentVehicleSpeedKmHour
 
btRigidBodym_chassisBody
 
int m_indexRightAxis
 
int m_indexUpAxis
 
int m_indexForwardAxis
 

Additional Inherited Members

- Static Protected Member Functions inherited from btActionInterface
static btRigidBodygetFixedBody ()
 

Detailed Description

rayCast vehicle, very special constraint that turn a rigidbody into a vehicle.

Definition at line 25 of file btRaycastVehicle.h.

Constructor & Destructor Documentation

btRaycastVehicle::btRaycastVehicle ( const btVehicleTuning tuning,
btRigidBody chassis,
btVehicleRaycaster raycaster 
)

Definition at line 35 of file btRaycastVehicle.cpp.

btRaycastVehicle::~btRaycastVehicle ( )
virtual

Definition at line 57 of file btRaycastVehicle.cpp.

Member Function Documentation

btWheelInfo & btRaycastVehicle::addWheel ( const btVector3 connectionPointCS0,
const btVector3 wheelDirectionCS0,
const btVector3 wheelAxleCS,
btScalar  suspensionRestLength,
btScalar  wheelRadius,
const btVehicleTuning tuning,
bool  isFrontWheel 
)

Definition at line 65 of file btRaycastVehicle.cpp.

void btRaycastVehicle::applyEngineForce ( btScalar  force,
int  wheel 
)

Definition at line 390 of file btRaycastVehicle.cpp.

void btRaycastVehicle::debugDraw ( btIDebugDraw debugDrawer)
virtual

btActionInterface interface

Implements btActionInterface.

Definition at line 728 of file btRaycastVehicle.cpp.

void btRaycastVehicle::defaultInit ( const btVehicleTuning tuning)
private

Definition at line 47 of file btRaycastVehicle.cpp.

const btTransform & btRaycastVehicle::getChassisWorldTransform ( ) const

Definition at line 260 of file btRaycastVehicle.cpp.

btScalar btRaycastVehicle::getCurrentSpeedKmHour ( ) const
inline

Velocity of vehicle (positive if velocity vector has same direction as foward vector)

Definition at line 183 of file btRaycastVehicle.h.

int btRaycastVehicle::getForwardAxis ( ) const
inline

Definition at line 163 of file btRaycastVehicle.h.

btVector3 btRaycastVehicle::getForwardVector ( ) const
inline

Worldspace forward vector.

Definition at line 170 of file btRaycastVehicle.h.

int btRaycastVehicle::getNumWheels ( ) const
inline

Definition at line 117 of file btRaycastVehicle.h.

int btRaycastVehicle::getRightAxis ( ) const
inline

Definition at line 154 of file btRaycastVehicle.h.

btRigidBody* btRaycastVehicle::getRigidBody ( )
inline

Definition at line 144 of file btRaycastVehicle.h.

const btRigidBody* btRaycastVehicle::getRigidBody ( ) const
inline

Definition at line 149 of file btRaycastVehicle.h.

btScalar btRaycastVehicle::getSteeringValue ( int  wheel) const

Definition at line 384 of file btRaycastVehicle.cpp.

int btRaycastVehicle::getUpAxis ( ) const
inline

Definition at line 158 of file btRaycastVehicle.h.

int btRaycastVehicle::getUserConstraintId ( ) const
inline

Definition at line 212 of file btRaycastVehicle.h.

int btRaycastVehicle::getUserConstraintType ( ) const
inline

backwards compatibility

Definition at line 197 of file btRaycastVehicle.h.

const btWheelInfo & btRaycastVehicle::getWheelInfo ( int  index) const

Definition at line 398 of file btRaycastVehicle.cpp.

btWheelInfo & btRaycastVehicle::getWheelInfo ( int  index)

Definition at line 405 of file btRaycastVehicle.cpp.

const btTransform & btRaycastVehicle::getWheelTransformWS ( int  wheelIndex) const

Definition at line 95 of file btRaycastVehicle.cpp.

btScalar btRaycastVehicle::rayCast ( btWheelInfo wheel)

Definition at line 174 of file btRaycastVehicle.cpp.

void btRaycastVehicle::resetSuspension ( )

Definition at line 143 of file btRaycastVehicle.cpp.

void btRaycastVehicle::setBrake ( btScalar  brake,
int  wheelIndex 
)

Definition at line 412 of file btRaycastVehicle.cpp.

virtual void btRaycastVehicle::setCoordinateSystem ( int  rightIndex,
int  upIndex,
int  forwardIndex 
)
inlinevirtual

Definition at line 188 of file btRaycastVehicle.h.

void btRaycastVehicle::setPitchControl ( btScalar  pitch)
inline

Definition at line 133 of file btRaycastVehicle.h.

void btRaycastVehicle::setSteeringValue ( btScalar  steering,
int  wheel 
)

Definition at line 374 of file btRaycastVehicle.cpp.

void btRaycastVehicle::setUserConstraintId ( int  uid)
inline

Definition at line 207 of file btRaycastVehicle.h.

void btRaycastVehicle::setUserConstraintType ( int  userConstraintType)
inline

Definition at line 202 of file btRaycastVehicle.h.

virtual void btRaycastVehicle::updateAction ( btCollisionWorld collisionWorld,
btScalar  step 
)
inlinevirtual

btActionInterface interface

Implements btActionInterface.

Definition at line 83 of file btRaycastVehicle.h.

void btRaycastVehicle::updateFriction ( btScalar  timeStep)
virtual

Definition at line 534 of file btRaycastVehicle.cpp.

void btRaycastVehicle::updateSuspension ( btScalar  deltaTime)

Definition at line 419 of file btRaycastVehicle.cpp.

void btRaycastVehicle::updateVehicle ( btScalar  step)
virtual

Definition at line 275 of file btRaycastVehicle.cpp.

void btRaycastVehicle::updateWheelTransform ( int  wheelIndex,
bool  interpolatedTransform = true 
)

Definition at line 103 of file btRaycastVehicle.cpp.

void btRaycastVehicle::updateWheelTransformsWS ( btWheelInfo wheel,
bool  interpolatedTransform = true 
)

Definition at line 159 of file btRaycastVehicle.cpp.

Member Data Documentation

btAlignedObjectArray<btVector3> btRaycastVehicle::m_axle
private

Definition at line 29 of file btRaycastVehicle.h.

btRigidBody* btRaycastVehicle::m_chassisBody
private

Definition at line 66 of file btRaycastVehicle.h.

btScalar btRaycastVehicle::m_currentVehicleSpeedKmHour
private

Definition at line 64 of file btRaycastVehicle.h.

btAlignedObjectArray<btScalar> btRaycastVehicle::m_forwardImpulse
private

Definition at line 30 of file btRaycastVehicle.h.

btAlignedObjectArray<btVector3> btRaycastVehicle::m_forwardWS
private

Definition at line 28 of file btRaycastVehicle.h.

int btRaycastVehicle::m_indexForwardAxis
private

Definition at line 70 of file btRaycastVehicle.h.

int btRaycastVehicle::m_indexRightAxis
private

Definition at line 68 of file btRaycastVehicle.h.

int btRaycastVehicle::m_indexUpAxis
private

Definition at line 69 of file btRaycastVehicle.h.

btScalar btRaycastVehicle::m_pitchControl
private

Definition at line 62 of file btRaycastVehicle.h.

btAlignedObjectArray<btScalar> btRaycastVehicle::m_sideImpulse
private

Definition at line 31 of file btRaycastVehicle.h.

btScalar btRaycastVehicle::m_steeringValue
private

Definition at line 63 of file btRaycastVehicle.h.

int btRaycastVehicle::m_userConstraintId
private

Definition at line 35 of file btRaycastVehicle.h.

int btRaycastVehicle::m_userConstraintType
private

backwards compatibility

Definition at line 34 of file btRaycastVehicle.h.

btVehicleRaycaster* btRaycastVehicle::m_vehicleRaycaster
private

Definition at line 61 of file btRaycastVehicle.h.

btAlignedObjectArray<btWheelInfo> btRaycastVehicle::m_wheelInfo

Definition at line 121 of file btRaycastVehicle.h.


The documentation for this class was generated from the following files: