Bullet Collision Detection & Physics Library
btWheelInfo.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/
3  *
4  * Permission to use, copy, modify, distribute and sell this software
5  * and its documentation for any purpose is hereby granted without fee,
6  * provided that the above copyright notice appear in all copies.
7  * Erwin Coumans makes no representations about the suitability
8  * of this software for any purpose.
9  * It is provided "as is" without express or implied warranty.
10 */
11 #ifndef BT_WHEEL_INFO_H
12 #define BT_WHEEL_INFO_H
13 
14 #include "LinearMath/btVector3.h"
15 #include "LinearMath/btTransform.h"
16 
17 class btRigidBody;
18 
20 {
27 
34 
35 };
36 
39 {
40  struct RaycastInfo
41  {
42  //set by raycaster
43  btVector3 m_contactNormalWS;//contactnormal
44  btVector3 m_contactPointWS;//raycast hitpoint
46  btVector3 m_hardPointWS;//raycast starting point
47  btVector3 m_wheelDirectionWS; //direction in worldspace
48  btVector3 m_wheelAxleWS; // axle in worldspace
50  void* m_groundObject; //could be general void* ptr
51  };
52 
54 
56 
59  btVector3 m_wheelAxleCS; // const or modified by steering
73 
75 
77 
79 
80  void* m_clientInfo;//can be used to store pointer to sync transforms...
81 
83 
84  {
85 
88 
97  m_steering = btScalar(0.);
98  m_engineForce = btScalar(0.);
99  m_rotation = btScalar(0.);
101  m_brake = btScalar(0.);
102  m_rollInfluence = btScalar(0.1);
105 
106  }
107 
108  void updateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo);
109 
112  //calculated by suspension
115 
116 };
117 
118 #endif //BT_WHEEL_INFO_H
119 
btTransform m_worldTransform
Definition: btWheelInfo.h:55
btVector3 m_wheelDirectionWS
Definition: btWheelInfo.h:47
btScalar getSuspensionRestLength() const
Definition: btWheelInfo.cpp:15
btScalar m_suspensionRelativeVelocity
Definition: btWheelInfo.h:111
btScalar m_wheelsSuspensionForce
Definition: btWheelInfo.h:113
btScalar m_rotation
Definition: btWheelInfo.h:69
btVector3 m_chassisConnectionPointCS
Definition: btWheelInfo.h:57
btScalar m_maxSuspensionTravelCm
Definition: btWheelInfo.h:61
btScalar m_frictionSlip
Definition: btWheelInfo.h:67
btWheelInfo contains information per wheel about friction and suspension.
Definition: btWheelInfo.h:38
btScalar m_suspensionStiffness
Definition: btWheelInfo.h:64
btVector3 m_wheelDirectionCS
Definition: btWheelInfo.h:58
btScalar m_wheelsRadius
Definition: btWheelInfo.h:63
btScalar m_steering
Definition: btWheelInfo.h:68
btScalar m_maxSuspensionForce
Definition: btWheelInfo.h:72
The btRigidBody is the main class for rigid body objects.
Definition: btRigidBody.h:59
btScalar m_wheelsDampingCompression
Definition: btWheelInfo.h:65
void * m_clientInfo
Definition: btWheelInfo.h:80
btScalar m_deltaRotation
Definition: btWheelInfo.h:70
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:83
btVector3 m_wheelAxleCS
Definition: btWheelInfo.h:59
btScalar m_rollInfluence
Definition: btWheelInfo.h:71
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:34
btScalar m_wheelsDampingRelaxation
Definition: btWheelInfo.h:66
RaycastInfo m_raycastInfo
Definition: btWheelInfo.h:53
btScalar m_clippedInvContactDotSuspension
Definition: btWheelInfo.h:110
btScalar m_brake
Definition: btWheelInfo.h:76
btScalar m_skidInfo
Definition: btWheelInfo.h:114
bool m_bIsFrontWheel
Definition: btWheelInfo.h:78
void updateWheel(const btRigidBody &chassis, RaycastInfo &raycastInfo)
Definition: btWheelInfo.cpp:22
btScalar m_suspensionRestLength1
Definition: btWheelInfo.h:60
btScalar m_engineForce
Definition: btWheelInfo.h:74
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:266
btWheelInfo(btWheelInfoConstructionInfo &ci)
Definition: btWheelInfo.h:82