Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
VehicleDifferential.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
10
12
14{
15public:
17
18
19 void SaveBinaryState(StreamOut &inStream) const;
20
22 void RestoreBinaryState(StreamIn &inStream);
23
29 void CalculateTorqueRatio(float inLeftAngularVelocity, float inRightAngularVelocity, float &outLeftTorqueFraction, float &outRightTorqueFraction) const;
30
31 int mLeftWheel = -1;
32 int mRightWheel = -1;
33 float mDifferentialRatio = 3.42f;
34 float mLeftRightSplit = 0.5f;
35 float mLimitedSlipRatio = 1.4f;
36 float mEngineTorqueRatio = 1.0f;
37};
38
#define JPH_EXPORT
Definition: Core.h:227
#define JPH_NAMESPACE_END
Definition: Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:361
#define JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(linkage, class_name)
Definition: SerializableObject.h:71
Simple binary input stream.
Definition: StreamIn.h:13
Simple binary output stream.
Definition: StreamOut.h:13
Definition: VehicleDifferential.h:14