Blender V4.3
btRaycastVehicle Class Reference

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

#include <btRaycastVehicle.h>

Inherits btActionInterface.

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
 
void debugDraw (btIDebugDraw *debugDrawer)
 btActionInterface interface
 
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.
 
btScalar getCurrentSpeedKmHour () const
 Velocity of vehicle (positive if velocity vector has same direction as foward vector)
 
virtual void setCoordinateSystem (int rightIndex, int upIndex, int forwardIndex)
 
int getUserConstraintType () const
 backwards compatibility
 
void setUserConstraintType (int userConstraintType)
 
void setUserConstraintId (int uid)
 
int getUserConstraintId () const
 
- Public Member Functions inherited from btActionInterface
virtual ~btActionInterface ()
 

Public Attributes

btAlignedObjectArray< btWheelInfom_wheelInfo
 

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()

◆ applyEngineForce()

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

◆ debugDraw()

void btRaycastVehicle::debugDraw ( btIDebugDraw * debugDrawer)
virtual

◆ getChassisWorldTransform()

const btTransform & btRaycastVehicle::getChassisWorldTransform ( ) const

◆ 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.

References btTransform, and getChassisWorldTransform().

◆ getNumWheels()

◆ getRightAxis()

int btRaycastVehicle::getRightAxis ( ) const
inline

Definition at line 143 of file btRaycastVehicle.h.

Referenced by debugDraw().

◆ getRigidBody() [1/2]

btRigidBody * btRaycastVehicle::getRigidBody ( )
inline

◆ 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.

References getWheelInfo(), and btWheelInfo::m_steering.

◆ 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.

References m_userConstraintId.

◆ 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.

References btAssert, getNumWheels(), and m_wheelInfo.

◆ getWheelInfo() [2/2]

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

◆ getWheelTransformWS()

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

Definition at line 85 of file btRaycastVehicle.cpp.

References btAssert, getNumWheels(), m_wheelInfo, and btWheelInfo::m_worldTransform.

Referenced by updateFriction().

◆ rayCast()

◆ resetSuspension()

◆ setBrake()

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

Definition at line 378 of file btRaycastVehicle.cpp.

References btAssert, getNumWheels(), getWheelInfo(), and btWheelInfo::m_brake.

◆ 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 )

◆ setUserConstraintId()

void btRaycastVehicle::setUserConstraintId ( int uid)
inline

Definition at line 194 of file btRaycastVehicle.h.

References m_userConstraintId.

◆ 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.

References updateVehicle().

◆ updateFriction()

◆ updateSuspension()

◆ updateVehicle()

◆ updateWheelTransform()

◆ updateWheelTransformsWS()

Member Data Documentation

◆ m_wheelInfo


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