Runtime controller class for vehicle with tank tracks.
More...
#include <TrackedVehicleController.h>
|
float | mForwardInput = 0.0f |
| Value between -1 and 1 for auto transmission and value between 0 and 1 indicating desired driving direction and amount the gas pedal is pressed.
|
|
float | mLeftRatio = 1.0f |
| Value between -1 and 1 indicating an extra multiplier to the rotation rate of the left track (used for steering)
|
|
float | mRightRatio = 1.0f |
| Value between -1 and 1 indicating an extra multiplier to the rotation rate of the right track (used for steering)
|
|
float | mBrakeInput = 0.0f |
| Value between 0 and 1 indicating how strong the brake pedal is pressed.
|
|
VehicleEngine | mEngine |
| Engine state of the vehicle.
|
|
VehicleTransmission | mTransmission |
| Transmission state of the vehicle.
|
|
VehicleTracks | mTracks |
| Tracks of the vehicle.
|
|
Vec3 | mRPMMeterPosition { 0, 1, 0 } |
| Position (in local space of the body) of the RPM meter when drawing the constraint.
|
|
float | mRPMMeterSize = 0.5f |
| Size of the RPM meter when drawing the constraint.
|
|
VehicleConstraint & | mConstraint |
| The vehicle constraint we belong to.
|
|
atomic< uint32 > | mRefCount |
| Current reference count.
|
|
Runtime controller class for vehicle with tank tracks.
◆ TrackedVehicleController()
◆ AllowSleep()
bool TrackedVehicleController::AllowSleep |
( |
| ) |
const |
|
overrideprotectedvirtual |
◆ ConstructWheel()
virtual Wheel * TrackedVehicleController::ConstructWheel |
( |
const WheelSettings & |
inWheel | ) |
const |
|
inlineoverrideprotectedvirtual |
◆ Draw()
void TrackedVehicleController::Draw |
( |
DebugRenderer * |
inRenderer | ) |
const |
|
overrideprotectedvirtual |
◆ GetBrakeInput()
float TrackedVehicleController::GetBrakeInput |
( |
| ) |
const |
|
inline |
◆ GetEngine() [1/2]
Get current engine state (writable interface, allows you to make changes to the configuration which will take effect the next time step)
◆ GetEngine() [2/2]
const VehicleEngine & TrackedVehicleController::GetEngine |
( |
| ) |
const |
|
inline |
Get current engine state.
◆ GetForwardInput()
float TrackedVehicleController::GetForwardInput |
( |
| ) |
const |
|
inline |
◆ GetLeftRatio()
float TrackedVehicleController::GetLeftRatio |
( |
| ) |
const |
|
inline |
◆ GetRightRatio()
float TrackedVehicleController::GetRightRatio |
( |
| ) |
const |
|
inline |
◆ GetTracks() [1/2]
Get the tracks this vehicle has (writable interface, allows you to make changes to the configuration which will take effect the next time step)
◆ GetTracks() [2/2]
const VehicleTracks & TrackedVehicleController::GetTracks |
( |
| ) |
const |
|
inline |
Get the tracks this vehicle has.
◆ GetTransmission() [1/2]
Get current transmission state (writable interface, allows you to make changes to the configuration which will take effect the next time step)
◆ GetTransmission() [2/2]
Get current transmission state.
◆ PostCollide()
void TrackedVehicleController::PostCollide |
( |
float |
inDeltaTime, |
|
|
PhysicsSystem & |
inPhysicsSystem |
|
) |
| |
|
overrideprotectedvirtual |
◆ PreCollide()
void TrackedVehicleController::PreCollide |
( |
float |
inDeltaTime, |
|
|
PhysicsSystem & |
inPhysicsSystem |
|
) |
| |
|
overrideprotectedvirtual |
◆ RestoreState()
void TrackedVehicleController::RestoreState |
( |
StateRecorder & |
inStream | ) |
|
|
overrideprotectedvirtual |
◆ SaveState()
void TrackedVehicleController::SaveState |
( |
StateRecorder & |
inStream | ) |
const |
|
overrideprotectedvirtual |
◆ SetBrakeInput()
void TrackedVehicleController::SetBrakeInput |
( |
float |
inBrake | ) |
|
|
inline |
Value between 0 and 1 indicating how strong the brake pedal is pressed.
◆ SetDriverInput()
void TrackedVehicleController::SetDriverInput |
( |
float |
inForward, |
|
|
float |
inLeftRatio, |
|
|
float |
inRightRatio, |
|
|
float |
inBrake |
|
) |
| |
|
inline |
Set input from driver
- Parameters
-
inForward | Value between -1 and 1 for auto transmission and value between 0 and 1 indicating desired driving direction and amount the gas pedal is pressed |
inLeftRatio | Value between -1 and 1 indicating an extra multiplier to the rotation rate of the left track (used for steering) |
inRightRatio | Value between -1 and 1 indicating an extra multiplier to the rotation rate of the right track (used for steering) |
inBrake | Value between 0 and 1 indicating how strong the brake pedal is pressed |
◆ SetForwardInput()
void TrackedVehicleController::SetForwardInput |
( |
float |
inForward | ) |
|
|
inline |
Value between -1 and 1 for auto transmission and value between 0 and 1 indicating desired driving direction and amount the gas pedal is pressed.
◆ SetLeftRatio()
void TrackedVehicleController::SetLeftRatio |
( |
float |
inLeftRatio | ) |
|
|
inline |
Value between -1 and 1 indicating an extra multiplier to the rotation rate of the left track (used for steering)
◆ SetRightRatio()
void TrackedVehicleController::SetRightRatio |
( |
float |
inRightRatio | ) |
|
|
inline |
Value between -1 and 1 indicating an extra multiplier to the rotation rate of the right track (used for steering)
◆ SetRPMMeter()
void TrackedVehicleController::SetRPMMeter |
( |
Vec3Arg |
inPosition, |
|
|
float |
inSize |
|
) |
| |
|
inline |
Debug drawing of RPM meter.
◆ SolveLongitudinalAndLateralConstraints()
bool TrackedVehicleController::SolveLongitudinalAndLateralConstraints |
( |
float |
inDeltaTime | ) |
|
|
overrideprotectedvirtual |
◆ SyncLeftRightTracks()
void TrackedVehicleController::SyncLeftRightTracks |
( |
| ) |
|
|
protected |
Synchronize angular velocities of left and right tracks according to their ratios.
◆ mBrakeInput
float TrackedVehicleController::mBrakeInput = 0.0f |
|
protected |
Value between 0 and 1 indicating how strong the brake pedal is pressed.
◆ mEngine
Engine state of the vehicle.
◆ mForwardInput
float TrackedVehicleController::mForwardInput = 0.0f |
|
protected |
Value between -1 and 1 for auto transmission and value between 0 and 1 indicating desired driving direction and amount the gas pedal is pressed.
◆ mLeftRatio
float TrackedVehicleController::mLeftRatio = 1.0f |
|
protected |
Value between -1 and 1 indicating an extra multiplier to the rotation rate of the left track (used for steering)
◆ mRightRatio
float TrackedVehicleController::mRightRatio = 1.0f |
|
protected |
Value between -1 and 1 indicating an extra multiplier to the rotation rate of the right track (used for steering)
◆ mRPMMeterPosition
Vec3 TrackedVehicleController::mRPMMeterPosition { 0, 1, 0 } |
|
protected |
Position (in local space of the body) of the RPM meter when drawing the constraint.
◆ mRPMMeterSize
float TrackedVehicleController::mRPMMeterSize = 0.5f |
|
protected |
Size of the RPM meter when drawing the constraint.
◆ mTracks
◆ mTransmission
Transmission state of the vehicle.
The documentation for this class was generated from the following files: