11#ifndef BT_RAYCASTVEHICLE_H
12#define BT_RAYCASTVEHICLE_H
33 int m_userConstraintType;
34 int m_userConstraintId;
61 btScalar m_currentVehicleSpeedKmHour;
67 int m_indexForwardAxis;
107 btWheelInfo&
addWheel(
const btVector3& connectionPointCS0,
const btVector3& wheelDirectionCS0,
const btVector3& wheelAxleCS,
btScalar suspensionRestLength,
btScalar wheelRadius,
const btVehicleTuning& tuning,
bool isFrontWheel);
126 m_pitchControl = pitch;
135 return m_chassisBody;
140 return m_chassisBody;
145 return m_indexRightAxis;
149 return m_indexUpAxis;
154 return m_indexForwardAxis;
163 chassisTrans.getBasis()[0][m_indexForwardAxis],
164 chassisTrans.getBasis()[1][m_indexForwardAxis],
165 chassisTrans.getBasis()[2][m_indexForwardAxis]);
173 return m_currentVehicleSpeedKmHour;
178 m_indexRightAxis = rightIndex;
179 m_indexUpAxis = upIndex;
180 m_indexForwardAxis = forwardIndex;
186 return m_userConstraintType;
191 m_userConstraintType = userConstraintType;
211 : m_dynamicsWorld(world)
215 virtual void*
castRay(
const btVector3& from,
const btVector3& to, btVehicleRaycasterResult& result);
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Basic interface to allow actions such as vehicles and characters to be updated inside a btDynamicsWor...
SIMD_FORCE_INLINE int size() const
return the number of elements in the array
CollisionWorld is interface and container for the collision detection.
virtual void * castRay(const btVector3 &from, const btVector3 &to, btVehicleRaycasterResult &result)
btDefaultVehicleRaycaster(btDynamicsWorld *world)
The btDynamicsWorld is the interface class for several dynamics implementation, basic,...
btScalar m_maxSuspensionTravelCm
btScalar m_suspensionStiffness
btScalar m_maxSuspensionForce
btScalar m_suspensionDamping
btScalar m_suspensionCompression
rayCast vehicle, very special constraint that turn a rigidbody into a vehicle.
virtual void updateFriction(btScalar timeStep)
void updateWheelTransformsWS(btWheelInfo &wheel, bool interpolatedTransform=true)
int getUserConstraintType() const
backwards compatibility
virtual void updateAction(btCollisionWorld *collisionWorld, btScalar step)
btActionInterface interface
btVector3 getForwardVector() const
Worldspace forward vector.
btRigidBody * getRigidBody()
const btTransform & getWheelTransformWS(int wheelIndex) const
int getUserConstraintId() const
virtual void setCoordinateSystem(int rightIndex, int upIndex, int forwardIndex)
btScalar rayCast(btWheelInfo &wheel)
void setUserConstraintType(int userConstraintType)
btScalar getSteeringValue(int wheel) const
const btRigidBody * getRigidBody() const
void setBrake(btScalar brake, int wheelIndex)
void updateSuspension(btScalar deltaTime)
virtual ~btRaycastVehicle()
btRaycastVehicle(const btVehicleTuning &tuning, btRigidBody *chassis, btVehicleRaycaster *raycaster)
virtual void updateVehicle(btScalar step)
btAlignedObjectArray< btWheelInfo > m_wheelInfo
void applyEngineForce(btScalar force, int wheel)
void setPitchControl(btScalar pitch)
btWheelInfo & addWheel(const btVector3 &connectionPointCS0, const btVector3 &wheelDirectionCS0, const btVector3 &wheelAxleCS, btScalar suspensionRestLength, btScalar wheelRadius, const btVehicleTuning &tuning, bool isFrontWheel)
void debugDraw(btIDebugDraw *debugDrawer)
btActionInterface interface
int getForwardAxis() const
void setUserConstraintId(int uid)
const btTransform & getChassisWorldTransform() const
void updateWheelTransform(int wheelIndex, bool interpolatedTransform=true)
const btWheelInfo & getWheelInfo(int index) const
btScalar getCurrentSpeedKmHour() const
Velocity of vehicle (positive if velocity vector has same direction as foward vector)
void setSteeringValue(btScalar steering, int wheel)
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
btVehicleRaycaster is provides interface for between vehicle simulation and raycasting
btWheelInfo contains information per wheel about friction and suspension.