Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
WheeledVehicleControllerSettings Class Reference

#include <WheeledVehicleController.h>

Inheritance diagram for WheeledVehicleControllerSettings:
VehicleControllerSettings SerializableObject RefTarget< VehicleControllerSettings > NonCopyable MotorcycleControllerSettings

Public Member Functions

virtual VehicleControllerConstructController (VehicleConstraint &inConstraint) const override
 Create an instance of the vehicle controller class.
 
virtual void SaveBinaryState (StreamOut &inStream) const override
 Saves the contents of the controller settings in binary form to inStream.
 
virtual void RestoreBinaryState (StreamIn &inStream) override
 Restore the contents of the controller settings in binary form from inStream.
 
- Public Member Functions inherited from SerializableObject
virtual ~SerializableObject ()=default
 Constructor.
 
- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 
- Public Member Functions inherited from RefTarget< VehicleControllerSettings >
 RefTarget ()=default
 Constructor.
 
 RefTarget (const RefTarget &)
 
 ~RefTarget ()
 assert no one is referencing us
 
void SetEmbedded () const
 
RefTargetoperator= (const RefTarget &)
 Assignment operator.
 
uint32 GetRefCount () const
 Get current refcount of this object.
 
void AddRef () const
 Add or release a reference to this object.
 
void Release () const
 

Public Attributes

VehicleEngineSettings mEngine
 The properties of the engine.
 
VehicleTransmissionSettings mTransmission
 The properties of the transmission (aka gear box)
 
Array< VehicleDifferentialSettingsmDifferentials
 List of differentials and their properties.
 
float mDifferentialLimitedSlipRatio = 1.4f
 Ratio max / min average wheel speed of each differential (measured at the clutch). When the ratio is exceeded all torque gets distributed to the differential with the minimal average velocity. This allows implementing a limited slip differential between differentials. Set to FLT_MAX for an open differential. Value should be > 1.
 

Additional Inherited Members

- Static Public Member Functions inherited from RefTarget< VehicleControllerSettings >
static int sInternalGetRefCountOffset ()
 INTERNAL HELPER FUNCTION USED BY SERIALIZATION.
 
- Protected Attributes inherited from RefTarget< VehicleControllerSettings >
atomic< uint32mRefCount
 Current reference count.
 
- Static Protected Attributes inherited from RefTarget< VehicleControllerSettings >
static constexpr uint32 cEmbedded
 A large value that gets added to the refcount to mark the object as embedded.
 

Detailed Description

Settings of a vehicle with regular wheels

The properties in this controller are largely based on "Car Physics for Games" by Marco Monster. See: https://www.asawicki.info/Mirror/Car%20Physics%20for%20Games/Car%20Physics%20for%20Games.html

Member Function Documentation

◆ ConstructController()

VehicleController * WheeledVehicleControllerSettings::ConstructController ( VehicleConstraint inConstraint) const
overridevirtual

Create an instance of the vehicle controller class.

Implements VehicleControllerSettings.

Reimplemented in MotorcycleControllerSettings.

◆ RestoreBinaryState()

void WheeledVehicleControllerSettings::RestoreBinaryState ( StreamIn inStream)
overridevirtual

Restore the contents of the controller settings in binary form from inStream.

Implements VehicleControllerSettings.

Reimplemented in MotorcycleControllerSettings.

◆ SaveBinaryState()

void WheeledVehicleControllerSettings::SaveBinaryState ( StreamOut inStream) const
overridevirtual

Saves the contents of the controller settings in binary form to inStream.

Implements VehicleControllerSettings.

Reimplemented in MotorcycleControllerSettings.

Member Data Documentation

◆ mDifferentialLimitedSlipRatio

float WheeledVehicleControllerSettings::mDifferentialLimitedSlipRatio = 1.4f

Ratio max / min average wheel speed of each differential (measured at the clutch). When the ratio is exceeded all torque gets distributed to the differential with the minimal average velocity. This allows implementing a limited slip differential between differentials. Set to FLT_MAX for an open differential. Value should be > 1.

◆ mDifferentials

Array<VehicleDifferentialSettings> WheeledVehicleControllerSettings::mDifferentials

List of differentials and their properties.

◆ mEngine

VehicleEngineSettings WheeledVehicleControllerSettings::mEngine

The properties of the engine.

◆ mTransmission

VehicleTransmissionSettings WheeledVehicleControllerSettings::mTransmission

The properties of the transmission (aka gear box)


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