111#ifdef JPH_DEBUG_RENDERER
128#ifdef JPH_DEBUG_RENDERER
143#ifdef JPH_DEBUG_RENDERER
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:29
bool IsKindOf(const Type *inObject, const RTTI *inRTTI)
Check if inObject is or is derived from DstType.
Definition RTTI.h:365
#define JPH_RTTI(class_name)
Definition RTTI.h:315
#define JPH_DECLARE_SERIALIZABLE_VIRTUAL(class_name)
Definition SerializableObject.h:100
VehicleTrack[(int) ETrackSide::Num] VehicleTracks
Definition VehicleTrack.h:54
Simple triangle renderer for debugging purposes.
Definition DebugRenderer.h:25
Definition PhysicsSystem.h:28
const T * GetPtr() const
Get pointer.
Definition Reference.h:188
Definition StateRecorder.h:15
Simple binary input stream.
Definition StreamIn.h:11
Simple binary output stream.
Definition StreamOut.h:11
Runtime controller class for vehicle with tank tracks.
Definition TrackedVehicleController.h:79
VehicleEngine mEngine
Engine state of the vehicle.
Definition TrackedVehicleController.h:139
float mLeftRatio
Value between -1 and 1 indicating an extra multiplier to the rotation rate of the left track (used fo...
Definition TrackedVehicleController.h:134
VehicleTracks mTracks
Tracks of the vehicle.
Definition TrackedVehicleController.h:141
const VehicleTransmission & GetTransmission() const
Get current transmission state.
Definition TrackedVehicleController.h:100
const VehicleTracks & GetTracks() const
Get the tracks this vehicle has.
Definition TrackedVehicleController.h:106
Vec3 mRPMMeterPosition
Position (in local space of the body) of the RPM meter when drawing the constraint.
Definition TrackedVehicleController.h:145
float mRPMMeterSize
Size of the RPM meter when drawing the constraint.
Definition TrackedVehicleController.h:146
virtual void PreCollide(float inDeltaTime, PhysicsSystem &inPhysicsSystem) override
Definition TrackedVehicleController.cpp:155
VehicleTransmission mTransmission
Transmission state of the vehicle.
Definition TrackedVehicleController.h:140
virtual Wheel * ConstructWheel(const WheelSettings &inWheel) const override
Definition TrackedVehicleController.h:121
void SetRPMMeter(Vec3Arg inPosition, float inSize)
Debug drawing of RPM meter.
Definition TrackedVehicleController.h:113
JPH_OVERRIDE_NEW_DELETE TrackedVehicleController(const TrackedVehicleControllerSettings &inSettings, VehicleConstraint &inConstraint)
Constructor.
Definition TrackedVehicleController.cpp:122
virtual void PostCollide(float inDeltaTime, PhysicsSystem &inPhysicsSystem) override
Definition TrackedVehicleController.cpp:194
VehicleTracks & GetTracks()
Get the tracks this vehicle has (writable interface, allows you to make changes to the configuration ...
Definition TrackedVehicleController.h:109
const VehicleEngine & GetEngine() const
Get current engine state.
Definition TrackedVehicleController.h:94
virtual bool SolveLongitudinalAndLateralConstraints(float inDeltaTime) override
Definition TrackedVehicleController.cpp:335
virtual void Draw(DebugRenderer *inRenderer) const override
Definition TrackedVehicleController.cpp:412
virtual bool AllowSleep() const override
Definition TrackedVehicleController.h:122
void SyncLeftRightTracks()
Synchronize angular velocities of left and right tracks according to their ratios.
Definition TrackedVehicleController.cpp:172
virtual void RestoreState(StateRecorder &inStream) override
Definition TrackedVehicleController.cpp:502
VehicleEngine & GetEngine()
Get current engine state (writable interface, allows you to make changes to the configuration which w...
Definition TrackedVehicleController.h:97
virtual void SaveState(StateRecorder &inStream) const override
Definition TrackedVehicleController.cpp:488
float mForwardInput
Value between -1 and 1 for auto transmission and value between 0 and 1 indicating desired driving dir...
Definition TrackedVehicleController.h:133
float mRightRatio
Value between -1 and 1 indicating an extra multiplier to the rotation rate of the right track (used f...
Definition TrackedVehicleController.h:135
float mBrakeInput
Value between 0 and 1 indicating how strong the brake pedal is pressed.
Definition TrackedVehicleController.h:136
void SetDriverInput(float inForward, float inLeftRatio, float inRightRatio, float inBrake)
Definition TrackedVehicleController.h:91
VehicleTransmission & GetTransmission()
Get current transmission state (writable interface, allows you to make changes to the configuration w...
Definition TrackedVehicleController.h:103
Definition TrackedVehicleController.h:60
TrackedVehicleControllerSettings()
Definition TrackedVehicleController.cpp:89
virtual VehicleController * ConstructController(VehicleConstraint &inConstraint) const override
Create an instance of the vehicle controller class.
Definition TrackedVehicleController.cpp:84
virtual void SaveBinaryState(StreamOut &inStream) const override
Saves the contents of the controller settings in binary form to inStream.
Definition TrackedVehicleController.cpp:102
virtual void RestoreBinaryState(StreamIn &inStream) override
Restore the contents of the controller settings in binary form from inStream.
Definition TrackedVehicleController.cpp:112
VehicleTrackSettings mTracks[(int) ETrackSide::Num]
List of tracks and their properties.
Definition TrackedVehicleController.h:74
VehicleEngineSettings mEngine
The properties of the engine.
Definition TrackedVehicleController.h:72
VehicleTransmissionSettings mTransmission
The properties of the transmission (aka gear box)
Definition TrackedVehicleController.h:73
Definition VehicleConstraint.h:67
Runtime data for interface that controls acceleration / decelleration of the vehicle.
Definition VehicleController.h:34
Basic settings object for interface that controls acceleration / decelleration of the vehicle.
Definition VehicleController.h:18
Runtime data for engine.
Definition VehicleEngine.h:44
Generic properties for a vehicle engine.
Definition VehicleEngine.h:21
Generic properties for tank tracks.
Definition VehicleTrack.h:25
Runtime data for transmission.
Definition VehicleTransmission.h:46
Configuration for the transmission of a vehicle (gear box)
Definition VehicleTransmission.h:23
Base class for runtime data for a wheel, each VehicleController can implement a derived class of this...
Definition Wheel.h:45
RefConst< WheelSettings > mSettings
Configuration settings for this wheel.
Definition Wheel.h:122
Base class for wheel settings, each VehicleController can implement a derived class of this.
Definition Wheel.h:19
WheelSettings object specifically for TrackedVehicleController.
Definition TrackedVehicleController.h:19
virtual void RestoreBinaryState(StreamIn &inStream) override
Restores the contents in binary form to inStream.
Definition TrackedVehicleController.cpp:39
float mLateralFriction
Friction in sideway direction of tire.
Definition TrackedVehicleController.h:28
virtual void SaveBinaryState(StreamOut &inStream) const override
Saves the contents in binary form to inStream.
Definition TrackedVehicleController.cpp:33
float mLongitudinalFriction
Friction in forward direction of tire.
Definition TrackedVehicleController.h:27
Wheel object specifically for TrackedVehicleController.
Definition TrackedVehicleController.h:33
float mBrakeImpulse
Amount of impulse that the brakes can apply to the floor (excluding friction), spread out from brake ...
Definition TrackedVehicleController.h:52
float mCombinedLongitudinalFriction
Combined friction coefficient in longitudinal direction (combines terrain and track)
Definition TrackedVehicleController.h:50
float mCombinedLateralFriction
Combined friction coefficient in lateral direction (combines terrain and track)
Definition TrackedVehicleController.h:51
const WheelSettingsTV * GetSettings() const
Override GetSettings and cast to the correct class.
Definition TrackedVehicleController.h:41
int mTrackIndex
Index in mTracks to which this wheel is attached (calculated on initialization)
Definition TrackedVehicleController.h:49
JPH_OVERRIDE_NEW_DELETE WheelTV(const WheelSettingsTV &inWheel)
Constructor.
Definition TrackedVehicleController.cpp:45
void CalculateAngularVelocity(const VehicleConstraint &inConstraint)
Update the angular velocity of the wheel based on the angular velocity of the track.
Definition TrackedVehicleController.cpp:50
void Update(float inDeltaTime, const VehicleConstraint &inConstraint)
Update the wheel rotation based on the current angular velocity.
Definition TrackedVehicleController.cpp:60