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