initial commit, 4.5 stable
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
This commit is contained in:
33
thirdparty/jolt_physics/Jolt/Physics/Vehicle/VehicleAntiRollBar.h
vendored
Normal file
33
thirdparty/jolt_physics/Jolt/Physics/Vehicle/VehicleAntiRollBar.h
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
|
||||
// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Jolt/ObjectStream/SerializableObject.h>
|
||||
#include <Jolt/Core/StreamIn.h>
|
||||
#include <Jolt/Core/StreamOut.h>
|
||||
|
||||
JPH_NAMESPACE_BEGIN
|
||||
|
||||
/// An anti rollbar is a stiff spring that connects two wheels to reduce the amount of roll the vehicle makes in sharp corners
|
||||
/// See: https://en.wikipedia.org/wiki/Anti-roll_bar
|
||||
class JPH_EXPORT VehicleAntiRollBar
|
||||
{
|
||||
JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(JPH_EXPORT, VehicleAntiRollBar)
|
||||
|
||||
public:
|
||||
/// Saves the contents in binary form to inStream.
|
||||
void SaveBinaryState(StreamOut &inStream) const;
|
||||
|
||||
/// Restores the contents in binary form to inStream.
|
||||
void RestoreBinaryState(StreamIn &inStream);
|
||||
|
||||
int mLeftWheel = 0; ///< Index (in mWheels) that represents the left wheel of this anti-rollbar
|
||||
int mRightWheel = 1; ///< Index (in mWheels) that represents the right wheel of this anti-rollbar
|
||||
float mStiffness = 1000.0f; ///< Stiffness (spring constant in N/m) of anti rollbar, can be 0 to disable the anti-rollbar
|
||||
};
|
||||
|
||||
using VehicleAntiRollBars = Array<VehicleAntiRollBar>;
|
||||
|
||||
JPH_NAMESPACE_END
|
Reference in New Issue
Block a user