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 ()
 
virtual void updateAction (btCollisionWorld *collisionWorld, btScalar deltaTimeStep)=0
 
virtual void debugDraw (btIDebugDraw *debugDrawer)=0
 

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::btRaycastVehicle ( const btVehicleTuning tuning,
btRigidBody chassis,
btVehicleRaycaster raycaster 
)

Definition at line 34 of file btRaycastVehicle.cpp.

◆ ~btRaycastVehicle()

btRaycastVehicle::~btRaycastVehicle ( )
virtual

Definition at line 52 of file btRaycastVehicle.cpp.

Member Function Documentation

◆ addWheel()

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

Definition at line 59 of file btRaycastVehicle.cpp.

◆ applyEngineForce()

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

Definition at line 357 of file btRaycastVehicle.cpp.

◆ debugDraw()

void btRaycastVehicle::debugDraw ( btIDebugDraw debugDrawer)
virtual

btActionInterface interface

Implements btActionInterface.

Definition at line 660 of file btRaycastVehicle.cpp.

◆ defaultInit()

void btRaycastVehicle::defaultInit ( const btVehicleTuning tuning)
private

Definition at line 45 of file btRaycastVehicle.cpp.

◆ getChassisWorldTransform()

const btTransform & btRaycastVehicle::getChassisWorldTransform ( ) const

Definition at line 243 of file btRaycastVehicle.cpp.

◆ getCurrentSpeedKmHour()

btScalar btRaycastVehicle::getCurrentSpeedKmHour ( ) const
inline

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

Definition at line 171 of file btRaycastVehicle.h.

◆ getForwardAxis()

int btRaycastVehicle::getForwardAxis ( ) const
inline

Definition at line 152 of file btRaycastVehicle.h.

◆ getForwardVector()

btVector3 btRaycastVehicle::getForwardVector ( ) const
inline

Worldspace forward vector.

Definition at line 158 of file btRaycastVehicle.h.

◆ getNumWheels()

int btRaycastVehicle::getNumWheels ( ) const
inline

Definition at line 109 of file btRaycastVehicle.h.

◆ getRightAxis()

int btRaycastVehicle::getRightAxis ( ) const
inline

Definition at line 143 of file btRaycastVehicle.h.

◆ getRigidBody() [1/2]

btRigidBody * btRaycastVehicle::getRigidBody ( )
inline

Definition at line 133 of file btRaycastVehicle.h.

◆ getRigidBody() [2/2]

const btRigidBody * btRaycastVehicle::getRigidBody ( ) const
inline

Definition at line 138 of file btRaycastVehicle.h.

◆ getSteeringValue()

btScalar btRaycastVehicle::getSteeringValue ( int  wheel) const

Definition at line 352 of file btRaycastVehicle.cpp.

◆ getUpAxis()

int btRaycastVehicle::getUpAxis ( ) const
inline

Definition at line 147 of file btRaycastVehicle.h.

◆ getUserConstraintId()

int btRaycastVehicle::getUserConstraintId ( ) const
inline

Definition at line 199 of file btRaycastVehicle.h.

◆ getUserConstraintType()

int btRaycastVehicle::getUserConstraintType ( ) const
inline

backwards compatibility

Definition at line 184 of file btRaycastVehicle.h.

◆ getWheelInfo() [1/2]

btWheelInfo & btRaycastVehicle::getWheelInfo ( int  index)

Definition at line 371 of file btRaycastVehicle.cpp.

◆ getWheelInfo() [2/2]

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

Definition at line 364 of file btRaycastVehicle.cpp.

◆ getWheelTransformWS()

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

Definition at line 85 of file btRaycastVehicle.cpp.

◆ rayCast()

btScalar btRaycastVehicle::rayCast ( btWheelInfo wheel)

Definition at line 160 of file btRaycastVehicle.cpp.

◆ resetSuspension()

void btRaycastVehicle::resetSuspension ( )

Definition at line 130 of file btRaycastVehicle.cpp.

◆ setBrake()

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

Definition at line 378 of file btRaycastVehicle.cpp.

◆ setCoordinateSystem()

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

Definition at line 176 of file btRaycastVehicle.h.

◆ setPitchControl()

void btRaycastVehicle::setPitchControl ( btScalar  pitch)
inline

Definition at line 124 of file btRaycastVehicle.h.

◆ setSteeringValue()

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

Definition at line 344 of file btRaycastVehicle.cpp.

◆ setUserConstraintId()

void btRaycastVehicle::setUserConstraintId ( int  uid)
inline

Definition at line 194 of file btRaycastVehicle.h.

◆ setUserConstraintType()

void btRaycastVehicle::setUserConstraintType ( int  userConstraintType)
inline

Definition at line 189 of file btRaycastVehicle.h.

◆ updateAction()

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

btActionInterface interface

Implements btActionInterface.

Definition at line 78 of file btRaycastVehicle.h.

◆ updateFriction()

void btRaycastVehicle::updateFriction ( btScalar  timeStep)
virtual

Definition at line 488 of file btRaycastVehicle.cpp.

◆ updateSuspension()

void btRaycastVehicle::updateSuspension ( btScalar  deltaTime)

Definition at line 384 of file btRaycastVehicle.cpp.

◆ updateVehicle()

void btRaycastVehicle::updateVehicle ( btScalar  step)
virtual

Definition at line 256 of file btRaycastVehicle.cpp.

◆ updateWheelTransform()

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

Definition at line 92 of file btRaycastVehicle.cpp.

◆ updateWheelTransformsWS()

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

Definition at line 145 of file btRaycastVehicle.cpp.

Member Data Documentation

◆ m_axle

btAlignedObjectArray<btVector3> btRaycastVehicle::m_axle
private

Definition at line 28 of file btRaycastVehicle.h.

◆ m_chassisBody

btRigidBody* btRaycastVehicle::m_chassisBody
private

Definition at line 63 of file btRaycastVehicle.h.

◆ m_currentVehicleSpeedKmHour

btScalar btRaycastVehicle::m_currentVehicleSpeedKmHour
private

Definition at line 61 of file btRaycastVehicle.h.

◆ m_forwardImpulse

btAlignedObjectArray<btScalar> btRaycastVehicle::m_forwardImpulse
private

Definition at line 29 of file btRaycastVehicle.h.

◆ m_forwardWS

btAlignedObjectArray<btVector3> btRaycastVehicle::m_forwardWS
private

Definition at line 27 of file btRaycastVehicle.h.

◆ m_indexForwardAxis

int btRaycastVehicle::m_indexForwardAxis
private

Definition at line 67 of file btRaycastVehicle.h.

◆ m_indexRightAxis

int btRaycastVehicle::m_indexRightAxis
private

Definition at line 65 of file btRaycastVehicle.h.

◆ m_indexUpAxis

int btRaycastVehicle::m_indexUpAxis
private

Definition at line 66 of file btRaycastVehicle.h.

◆ m_pitchControl

btScalar btRaycastVehicle::m_pitchControl
private

Definition at line 59 of file btRaycastVehicle.h.

◆ m_sideImpulse

btAlignedObjectArray<btScalar> btRaycastVehicle::m_sideImpulse
private

Definition at line 30 of file btRaycastVehicle.h.

◆ m_steeringValue

btScalar btRaycastVehicle::m_steeringValue
private

Definition at line 60 of file btRaycastVehicle.h.

◆ m_userConstraintId

int btRaycastVehicle::m_userConstraintId
private

Definition at line 34 of file btRaycastVehicle.h.

◆ m_userConstraintType

int btRaycastVehicle::m_userConstraintType
private

backwards compatibility

Definition at line 33 of file btRaycastVehicle.h.

◆ m_vehicleRaycaster

btVehicleRaycaster* btRaycastVehicle::m_vehicleRaycaster
private

Definition at line 58 of file btRaycastVehicle.h.

◆ m_wheelInfo

btAlignedObjectArray<btWheelInfo> btRaycastVehicle::m_wheelInfo

Definition at line 114 of file btRaycastVehicle.h.


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