Back to index

supertuxkart  0.5+dfsg1
Classes | Public Member Functions | Public Attributes
btWheelInfo Struct Reference

btWheelInfo contains information per wheel about friction and suspension. More...

#include <btWheelInfo.h>

Collaboration diagram for btWheelInfo:
Collaboration graph
[legend]

List of all members.

Classes

struct  RaycastInfo

Public Member Functions

btScalar getSuspensionRestLength () const
 btWheelInfo (btWheelInfoConstructionInfo &ci)
void updateWheel (const btRigidBody &chassis, RaycastInfo &raycastInfo)

Public Attributes

RaycastInfo m_raycastInfo
btTransform m_worldTransform
btVector3 m_chassisConnectionPointCS
btVector3 m_wheelDirectionCS
btVector3 m_wheelAxleCS
btScalar m_suspensionRestLength1
btScalar m_maxSuspensionTravelCm
btScalar m_wheelsRadius
btScalar m_suspensionStiffness
btScalar m_wheelsDampingCompression
btScalar m_wheelsDampingRelaxation
btScalar m_frictionSlip
btScalar m_steering
btScalar m_rotation
btScalar m_deltaRotation
btScalar m_rollInfluence
btScalar m_engineForce
btScalar m_brake
bool m_bIsFrontWheel
void * m_clientInfo
btScalar m_clippedInvContactDotSuspension
btScalar m_suspensionRelativeVelocity
btScalar m_wheelsSuspensionForce
btScalar m_skidInfo

Detailed Description

btWheelInfo contains information per wheel about friction and suspension.

Definition at line 37 of file btWheelInfo.h.


Class Documentation

struct btWheelInfo::RaycastInfo

Definition at line 39 of file btWheelInfo.h.

Collaboration diagram for btWheelInfo::RaycastInfo:
Class Members
btVector3 m_contactNormalWS
btVector3 m_contactPointWS
void * m_groundObject
btVector3 m_hardPointWS
bool m_isInContact
btScalar m_suspensionLength
btVector3 m_wheelAxleWS
btVector3 m_wheelDirectionWS

Constructor & Destructor Documentation


Member Function Documentation

Definition at line 15 of file btWheelInfo.cpp.

Here is the caller graph for this function:

void btWheelInfo::updateWheel ( const btRigidBody chassis,
RaycastInfo raycastInfo 
)

Definition at line 22 of file btWheelInfo.cpp.

{
       (void)raycastInfo;

       
       if (m_raycastInfo.m_isInContact)

       {
              btScalar      project= m_raycastInfo.m_contactNormalWS.dot( m_raycastInfo.m_wheelDirectionWS );
              btVector3      chassis_velocity_at_contactPoint;
              btVector3 relpos = m_raycastInfo.m_contactPointWS - chassis.getCenterOfMassPosition();
              chassis_velocity_at_contactPoint = chassis.getVelocityInLocalPoint( relpos );
              btScalar projVel = m_raycastInfo.m_contactNormalWS.dot( chassis_velocity_at_contactPoint );
              if ( project >= btScalar(-0.1))
              {
                     m_suspensionRelativeVelocity = btScalar(0.0);
                     m_clippedInvContactDotSuspension = btScalar(1.0) / btScalar(0.1);
              }
              else
              {
                     btScalar inv = btScalar(-1.) / project;
                     m_suspensionRelativeVelocity = projVel * inv;
                     m_clippedInvContactDotSuspension = inv;
              }
              
       }

       else   // Not in contact : position wheel in a nice (rest length) position
       {
              m_raycastInfo.m_suspensionLength = this->getSuspensionRestLength();
              m_suspensionRelativeVelocity = btScalar(0.0);
              m_raycastInfo.m_contactNormalWS = -m_raycastInfo.m_wheelDirectionWS;
              m_clippedInvContactDotSuspension = btScalar(1.0);
       }
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 76 of file btWheelInfo.h.

Definition at line 74 of file btWheelInfo.h.

Definition at line 56 of file btWheelInfo.h.

Definition at line 78 of file btWheelInfo.h.

Definition at line 107 of file btWheelInfo.h.

Definition at line 69 of file btWheelInfo.h.

Definition at line 72 of file btWheelInfo.h.

Definition at line 66 of file btWheelInfo.h.

Definition at line 60 of file btWheelInfo.h.

Definition at line 52 of file btWheelInfo.h.

Definition at line 70 of file btWheelInfo.h.

Definition at line 68 of file btWheelInfo.h.

Definition at line 111 of file btWheelInfo.h.

Definition at line 67 of file btWheelInfo.h.

Definition at line 108 of file btWheelInfo.h.

Definition at line 59 of file btWheelInfo.h.

Definition at line 63 of file btWheelInfo.h.

Definition at line 58 of file btWheelInfo.h.

Definition at line 57 of file btWheelInfo.h.

Definition at line 64 of file btWheelInfo.h.

Definition at line 65 of file btWheelInfo.h.

Definition at line 62 of file btWheelInfo.h.

Definition at line 110 of file btWheelInfo.h.

Definition at line 54 of file btWheelInfo.h.


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