merged most of the changes from the branch into trunk, except for COLLADA, libxml and glut glitches.
Still need to verify to make sure no unwanted renaming is introduced.
This commit is contained in:
@@ -11,19 +11,19 @@
|
||||
#ifndef WHEEL_INFO_H
|
||||
#define WHEEL_INFO_H
|
||||
|
||||
#include "LinearMath/SimdVector3.h"
|
||||
#include "LinearMath/SimdTransform.h"
|
||||
#include "LinearMath/btVector3.h"
|
||||
#include "LinearMath/btTransform.h"
|
||||
|
||||
class RigidBody;
|
||||
class btRigidBody;
|
||||
|
||||
struct WheelInfoConstructionInfo
|
||||
struct btWheelInfoConstructionInfo
|
||||
{
|
||||
SimdVector3 m_chassisConnectionCS;
|
||||
SimdVector3 m_wheelDirectionCS;
|
||||
SimdVector3 m_wheelAxleCS;
|
||||
SimdScalar m_suspensionRestLength;
|
||||
SimdScalar m_maxSuspensionTravelCm;
|
||||
SimdScalar m_wheelRadius;
|
||||
btVector3 m_chassisConnectionCS;
|
||||
btVector3 m_wheelDirectionCS;
|
||||
btVector3 m_wheelAxleCS;
|
||||
btScalar m_suspensionRestLength;
|
||||
btScalar m_maxSuspensionTravelCm;
|
||||
btScalar m_wheelRadius;
|
||||
|
||||
float m_suspensionStiffness;
|
||||
float m_wheelsDampingCompression;
|
||||
@@ -33,51 +33,51 @@ struct WheelInfoConstructionInfo
|
||||
|
||||
};
|
||||
|
||||
/// WheelInfo contains information per wheel about friction and suspension.
|
||||
struct WheelInfo
|
||||
/// btWheelInfo contains information per wheel about friction and suspension.
|
||||
struct btWheelInfo
|
||||
{
|
||||
struct RaycastInfo
|
||||
{
|
||||
//set by raycaster
|
||||
SimdVector3 m_contactNormalWS;//contactnormal
|
||||
SimdVector3 m_contactPointWS;//raycast hitpoint
|
||||
SimdScalar m_suspensionLength;
|
||||
SimdVector3 m_hardPointWS;//raycast starting point
|
||||
SimdVector3 m_wheelDirectionWS; //direction in worldspace
|
||||
SimdVector3 m_wheelAxleWS; // axle in worldspace
|
||||
btVector3 m_contactNormalWS;//contactnormal
|
||||
btVector3 m_contactPointWS;//raycast hitpoint
|
||||
btScalar m_suspensionLength;
|
||||
btVector3 m_hardPointWS;//raycast starting point
|
||||
btVector3 m_wheelDirectionWS; //direction in worldspace
|
||||
btVector3 m_wheelAxleWS; // axle in worldspace
|
||||
bool m_isInContact;
|
||||
void* m_groundObject; //could be general void* ptr
|
||||
};
|
||||
|
||||
RaycastInfo m_raycastInfo;
|
||||
|
||||
SimdTransform m_worldTransform;
|
||||
btTransform m_worldTransform;
|
||||
|
||||
SimdVector3 m_chassisConnectionPointCS; //const
|
||||
SimdVector3 m_wheelDirectionCS;//const
|
||||
SimdVector3 m_wheelAxleCS; // const or modified by steering
|
||||
SimdScalar m_suspensionRestLength1;//const
|
||||
SimdScalar m_maxSuspensionTravelCm;
|
||||
SimdScalar GetSuspensionRestLength() const;
|
||||
SimdScalar m_wheelsRadius;//const
|
||||
SimdScalar m_suspensionStiffness;//const
|
||||
SimdScalar m_wheelsDampingCompression;//const
|
||||
SimdScalar m_wheelsDampingRelaxation;//const
|
||||
SimdScalar m_frictionSlip;
|
||||
SimdScalar m_steering;
|
||||
SimdScalar m_rotation;
|
||||
SimdScalar m_deltaRotation;
|
||||
SimdScalar m_rollInfluence;
|
||||
btVector3 m_chassisConnectionPointCS; //const
|
||||
btVector3 m_wheelDirectionCS;//const
|
||||
btVector3 m_wheelAxleCS; // const or modified by steering
|
||||
btScalar m_suspensionRestLength1;//const
|
||||
btScalar m_maxSuspensionTravelCm;
|
||||
btScalar GetSuspensionRestLength() const;
|
||||
btScalar m_wheelsRadius;//const
|
||||
btScalar m_suspensionStiffness;//const
|
||||
btScalar m_wheelsDampingCompression;//const
|
||||
btScalar m_wheelsDampingRelaxation;//const
|
||||
btScalar m_frictionSlip;
|
||||
btScalar m_steering;
|
||||
btScalar m_rotation;
|
||||
btScalar m_deltaRotation;
|
||||
btScalar m_rollInfluence;
|
||||
|
||||
SimdScalar m_engineForce;
|
||||
btScalar m_engineForce;
|
||||
|
||||
SimdScalar m_brake;
|
||||
btScalar m_brake;
|
||||
|
||||
bool m_bIsFrontWheel;
|
||||
|
||||
void* m_clientInfo;//can be used to store pointer to sync transforms...
|
||||
|
||||
WheelInfo(WheelInfoConstructionInfo& ci)
|
||||
btWheelInfo(btWheelInfoConstructionInfo& ci)
|
||||
|
||||
{
|
||||
|
||||
@@ -102,13 +102,13 @@ struct WheelInfo
|
||||
|
||||
}
|
||||
|
||||
void UpdateWheel(const RigidBody& chassis,RaycastInfo& raycastInfo);
|
||||
void UpdateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo);
|
||||
|
||||
SimdScalar m_clippedInvContactDotSuspension;
|
||||
SimdScalar m_suspensionRelativeVelocity;
|
||||
btScalar m_clippedInvContactDotSuspension;
|
||||
btScalar m_suspensionRelativeVelocity;
|
||||
//calculated by suspension
|
||||
SimdScalar m_wheelsSuspensionForce;
|
||||
SimdScalar m_skidInfo;
|
||||
btScalar m_wheelsSuspensionForce;
|
||||
btScalar m_skidInfo;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user