Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Properties | List of all members
VehiclePhysics.VehicleBase Class Reference
Inheritance diagram for VehiclePhysics.VehicleBase:
KSPWheelController VehiclePhysics.VPVehicleController

Classes

struct  BlockState
 
struct  SolverState
 
struct  VehicleStateVars
 
class  WheelState
 
struct  WheelStateVars
 

Public Types

enum  VehicleSleepCriteria { VehicleSleepCriteria.Strict, VehicleSleepCriteria.Relaxed }
 
enum  WheelPos { WheelPos.Default = 0, WheelPos.Left = 0, WheelPos.Right = 99 }
 

Public Member Functions

void AddWheelBrakeTorque (int wheelIndex, float torque)
 
void DebugLogError (string message)
 
void DebugLogWarning (string message)
 
virtual int GetAxleCount ()
 
virtual object GetInternalObject (Type type)
 
Type[] GetSolverBlockTypes ()
 
SolverState GetSolverState ()
 
VehicleStateVars GetVehicleStateVars ()
 
Vector2 GetWheelAdherentSlip (int wheelIndex)
 
float GetWheelAngularVelocityForSlip (int wheelIndex, float slip)
 
virtual int GetWheelIndex (int axle, WheelPos position=WheelPos.Default)
 
Vector3 GetWheelLocalPosition (VPWheelCollider wheelCol)
 
Vector2 GetWheelPeakSlip (int wheelIndex)
 
float GetWheelRadius (int wheelIndex)
 
virtual int GetWheelsInAxle (int axle)
 
WheelStateVars[] GetWheelStateVars ()
 
TireFriction GetWheelTireFriction (int wheelIndex)
 
void NotifyCollidersChanged ()
 
void OnCollision (Collision collision, bool isCollisionEnter)
 
void RegisterVehicleBehaviour (VehicleBehaviour vb)
 
void Reposition (Vector3 position, Quaternion rotation)
 
void SetVehicleStateVars (VehicleStateVars stateVars)
 
void SetWheelRadius (int wheelIndex, float radius)
 
void SetWheelStateVars (WheelStateVars[] stateVars)
 
void SetWheelTireFriction (int wheelIndex, TireFriction friction)
 
void SetWheelTireFrictionMultiplier (int wheelIndex, float frictionMultiplier)
 
void SingleStep ()
 
void UnregisterVehicleBehaviour (VehicleBehaviour vb)
 

Public Attributes

bool accurateSuspensionForces = true
 
bool advancedSuspensionDamper = false
 
Transform centerOfMass
 
bool contactAngleAffectsTireForce = true
 
DataBus data = new DataBus()
 
bool disableContactProcessing = false
 
KSPWheelGravity gravity = new KSPWheelGravity()
 
float impactInterval = 0.2f
 
float impactIntervalRandom = 0.4f
 
float impactMinSpeed = 2.0f
 
float impactThreeshold = 0.6f
 
bool inhibitWheelSleep = false
 
int integrationSteps = 4
 
bool integrationUseRK4 = false
 
bool invertVisualWheelSpinDirection = false
 
float minimumdownForce
 
Action onBeforeIntegrationStep
 
Action onBeforeUpdateBlocks
 
Action onImpact
 
Action onPreDynamicsStep
 
Action onPreVisualUpdate
 
Action onRawCollision
 
float scaleFactor = 1.0f
 
bool showContactGizmos = true
 
float suspensionDamperLimitFactor = 2.0f
 
float suspensionForceSharpness = 5f
 
bool suspensionForceSmoothing = true
 
float tireForceSharpness = 5f
 
bool tireForceSmoothing = true
 
float tireImpulseRatio = 0.5f
 
bool tireSideDeflection = false
 
float tireSideDeflectionRate = 10.0f
 
VehicleSleepCriteria vehicleSleepCriteria = VehicleSleepCriteria.Strict
 
float wheelSleepVelocity = 0.2f
 

Static Public Attributes

static Collision currentCollision = null
 
static bool isCollisionEnter = false
 
static VehicleBase vehicle = null
 

Protected Member Functions

virtual void DoUpdateBlocks ()
 
virtual void DoUpdateData ()
 
virtual void OnFinalize ()
 
virtual void OnInitialize ()
 
virtual void OnUpdate ()
 
void SetNumberOfWheels (int numberOfWheels)
 

Properties

Rigidbody cachedRigidbody [get]
 
Transform cachedTransform [get]
 
GroundMaterialManagerBase groundMaterialManager [get, set]
 
bool initialized [get, set]
 
bool isHardDrag [get]
 
bool isHardImpact [get]
 
Collider lastContactedCollider [get, set]
 
Vector3 localAcceleration [get]
 
Vector3 localDragPosition [get]
 
Vector3 localDragVelocity [get]
 
Vector3 localImpactPosition [get]
 
Vector3 localImpactVelocity [get]
 
bool paused [get, set]
 
float speed [get]
 
float speedAngle [get]
 
float time [get]
 
int wheelCount [get]
 
Wheel[] wheels [get]
 
WheelState[] wheelState [get]
 

Member Enumeration Documentation

Enumerator
Strict 
Relaxed 
Enumerator
Default 
Left 
Right 

Member Function Documentation

void VehiclePhysics.VehicleBase.AddWheelBrakeTorque ( int  wheelIndex,
float  torque 
)
inline
void VehiclePhysics.VehicleBase.DebugLogError ( string  message)
inline
void VehiclePhysics.VehicleBase.DebugLogWarning ( string  message)
inline
virtual void VehiclePhysics.VehicleBase.DoUpdateBlocks ( )
inlineprotectedvirtual
virtual void VehiclePhysics.VehicleBase.DoUpdateData ( )
inlineprotectedvirtual
virtual int VehiclePhysics.VehicleBase.GetAxleCount ( )
inlinevirtual
virtual object VehiclePhysics.VehicleBase.GetInternalObject ( Type  type)
inlinevirtual
Type [] VehiclePhysics.VehicleBase.GetSolverBlockTypes ( )
inline
SolverState VehiclePhysics.VehicleBase.GetSolverState ( )
inline
VehicleStateVars VehiclePhysics.VehicleBase.GetVehicleStateVars ( )
inline
Vector2 VehiclePhysics.VehicleBase.GetWheelAdherentSlip ( int  wheelIndex)
inline
float VehiclePhysics.VehicleBase.GetWheelAngularVelocityForSlip ( int  wheelIndex,
float  slip 
)
inline
virtual int VehiclePhysics.VehicleBase.GetWheelIndex ( int  axle,
WheelPos  position = WheelPos.Default 
)
inlinevirtual
Vector3 VehiclePhysics.VehicleBase.GetWheelLocalPosition ( VPWheelCollider  wheelCol)
inline
Vector2 VehiclePhysics.VehicleBase.GetWheelPeakSlip ( int  wheelIndex)
inline
float VehiclePhysics.VehicleBase.GetWheelRadius ( int  wheelIndex)
inline
virtual int VehiclePhysics.VehicleBase.GetWheelsInAxle ( int  axle)
inlinevirtual
WheelStateVars [] VehiclePhysics.VehicleBase.GetWheelStateVars ( )
inline
TireFriction VehiclePhysics.VehicleBase.GetWheelTireFriction ( int  wheelIndex)
inline
void VehiclePhysics.VehicleBase.NotifyCollidersChanged ( )
inline
void VehiclePhysics.VehicleBase.OnCollision ( Collision  collision,
bool  isCollisionEnter 
)
inline
virtual void VehiclePhysics.VehicleBase.OnFinalize ( )
inlineprotectedvirtual
virtual void VehiclePhysics.VehicleBase.OnInitialize ( )
inlineprotectedvirtual
virtual void VehiclePhysics.VehicleBase.OnUpdate ( )
inlineprotectedvirtual

Reimplemented in KSPWheelController.

void VehiclePhysics.VehicleBase.RegisterVehicleBehaviour ( VehicleBehaviour  vb)
inline
void VehiclePhysics.VehicleBase.Reposition ( Vector3  position,
Quaternion  rotation 
)
inline
void VehiclePhysics.VehicleBase.SetNumberOfWheels ( int  numberOfWheels)
inlineprotected
void VehiclePhysics.VehicleBase.SetVehicleStateVars ( VehicleStateVars  stateVars)
inline
void VehiclePhysics.VehicleBase.SetWheelRadius ( int  wheelIndex,
float  radius 
)
inline
void VehiclePhysics.VehicleBase.SetWheelStateVars ( WheelStateVars[]  stateVars)
inline
void VehiclePhysics.VehicleBase.SetWheelTireFriction ( int  wheelIndex,
TireFriction  friction 
)
inline
void VehiclePhysics.VehicleBase.SetWheelTireFrictionMultiplier ( int  wheelIndex,
float  frictionMultiplier 
)
inline
void VehiclePhysics.VehicleBase.SingleStep ( )
inline
void VehiclePhysics.VehicleBase.UnregisterVehicleBehaviour ( VehicleBehaviour  vb)
inline

Member Data Documentation

bool VehiclePhysics.VehicleBase.accurateSuspensionForces = true
bool VehiclePhysics.VehicleBase.advancedSuspensionDamper = false
Transform VehiclePhysics.VehicleBase.centerOfMass
bool VehiclePhysics.VehicleBase.contactAngleAffectsTireForce = true
Collision VehiclePhysics.VehicleBase.currentCollision = null
static
DataBus VehiclePhysics.VehicleBase.data = new DataBus()
bool VehiclePhysics.VehicleBase.disableContactProcessing = false
KSPWheelGravity VehiclePhysics.VehicleBase.gravity = new KSPWheelGravity()
float VehiclePhysics.VehicleBase.impactInterval = 0.2f
float VehiclePhysics.VehicleBase.impactIntervalRandom = 0.4f
float VehiclePhysics.VehicleBase.impactMinSpeed = 2.0f
float VehiclePhysics.VehicleBase.impactThreeshold = 0.6f
bool VehiclePhysics.VehicleBase.inhibitWheelSleep = false
int VehiclePhysics.VehicleBase.integrationSteps = 4
bool VehiclePhysics.VehicleBase.integrationUseRK4 = false
bool VehiclePhysics.VehicleBase.invertVisualWheelSpinDirection = false
bool VehiclePhysics.VehicleBase.isCollisionEnter = false
static
float VehiclePhysics.VehicleBase.minimumdownForce
Action VehiclePhysics.VehicleBase.onBeforeIntegrationStep
Action VehiclePhysics.VehicleBase.onBeforeUpdateBlocks
Action VehiclePhysics.VehicleBase.onImpact
Action VehiclePhysics.VehicleBase.onPreDynamicsStep
Action VehiclePhysics.VehicleBase.onPreVisualUpdate
Action VehiclePhysics.VehicleBase.onRawCollision
float VehiclePhysics.VehicleBase.scaleFactor = 1.0f
bool VehiclePhysics.VehicleBase.showContactGizmos = true
float VehiclePhysics.VehicleBase.suspensionDamperLimitFactor = 2.0f
float VehiclePhysics.VehicleBase.suspensionForceSharpness = 5f
bool VehiclePhysics.VehicleBase.suspensionForceSmoothing = true
float VehiclePhysics.VehicleBase.tireForceSharpness = 5f
bool VehiclePhysics.VehicleBase.tireForceSmoothing = true
float VehiclePhysics.VehicleBase.tireImpulseRatio = 0.5f
bool VehiclePhysics.VehicleBase.tireSideDeflection = false
float VehiclePhysics.VehicleBase.tireSideDeflectionRate = 10.0f
VehicleBase VehiclePhysics.VehicleBase.vehicle = null
static
VehicleSleepCriteria VehiclePhysics.VehicleBase.vehicleSleepCriteria = VehicleSleepCriteria.Strict
float VehiclePhysics.VehicleBase.wheelSleepVelocity = 0.2f

Property Documentation

Rigidbody VehiclePhysics.VehicleBase.cachedRigidbody
get
Transform VehiclePhysics.VehicleBase.cachedTransform
get
GroundMaterialManagerBase VehiclePhysics.VehicleBase.groundMaterialManager
getset
bool VehiclePhysics.VehicleBase.initialized
getset
bool VehiclePhysics.VehicleBase.isHardDrag
get
bool VehiclePhysics.VehicleBase.isHardImpact
get
Collider VehiclePhysics.VehicleBase.lastContactedCollider
getset
Vector3 VehiclePhysics.VehicleBase.localAcceleration
get
Vector3 VehiclePhysics.VehicleBase.localDragPosition
get
Vector3 VehiclePhysics.VehicleBase.localDragVelocity
get
Vector3 VehiclePhysics.VehicleBase.localImpactPosition
get
Vector3 VehiclePhysics.VehicleBase.localImpactVelocity
get
bool VehiclePhysics.VehicleBase.paused
getset
float VehiclePhysics.VehicleBase.speed
get
float VehiclePhysics.VehicleBase.speedAngle
get
float VehiclePhysics.VehicleBase.time
get
int VehiclePhysics.VehicleBase.wheelCount
get
Wheel [] VehiclePhysics.VehicleBase.wheels
getprotected
WheelState [] VehiclePhysics.VehicleBase.wheelState
get

The documentation for this class was generated from the following file: