//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:13
///
/// class MotorcycleControllerSettings : public WheeledVehicleControllerSettings
///
///
///
///
/// Settings of a two wheeled motorcycle (adds a spring to balance the motorcycle)
/// Note: The motor cycle controller is still in development and may need a lot of tweaks/hacks to work properly!
///
///
[InteropHandle]
public readonly partial struct MotorcycleControllerSettings : IDisposable
{
public static MotorcycleControllerSettings Create() => Jolt.PInvoke.MotorcycleControllerSettings_Create();
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:15
///
///
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public RTTI GetRTTI() => Jolt.PInvoke.MotorcycleControllerSettings_GetRTTI(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:15
///
///
///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.MotorcycleControllerSettings_CastTo(this, rTTI);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:20
///
/// virtual void SaveBinaryState(StreamOut &inStream) const override
///
///
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.MotorcycleControllerSettings_SaveBinaryState(this, stream);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:21
///
/// virtual void RestoreBinaryState(StreamIn &inStream) override
///
///
public void RestoreBinaryState(StreamIn stream) => Jolt.PInvoke.MotorcycleControllerSettings_RestoreBinaryState(this, stream);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:24
///
/// float mMaxLeanAngle = DegreesToRadians(45.0f)
///
///
///
///
/// How far we're willing to make the bike lean over in turns (in radians)
///
///
public float GetMaxLeanAngle() => Jolt.PInvoke.MotorcycleControllerSettings_GetMaxLeanAngle(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:24
///
/// float mMaxLeanAngle = DegreesToRadians(45.0f)
///
///
///
///
/// How far we're willing to make the bike lean over in turns (in radians)
///
///
public void SetMaxLeanAngle(float value) => Jolt.PInvoke.MotorcycleControllerSettings_SetMaxLeanAngle(this, value);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:27
///
/// float mLeanSpringConstant = 5000.0f
///
///
///
///
/// Spring constant for the lean spring
///
///
public float GetLeanSpringConstant() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringConstant(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:27
///
/// float mLeanSpringConstant = 5000.0f
///
///
///
///
/// Spring constant for the lean spring
///
///
public void SetLeanSpringConstant(float value) => Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringConstant(this, value);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:30
///
/// float mLeanSpringDamping = 1000.0f
///
///
///
///
/// Spring damping constant for the lean spring
///
///
public float GetLeanSpringDamping() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringDamping(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:30
///
/// float mLeanSpringDamping = 1000.0f
///
///
///
///
/// Spring damping constant for the lean spring
///
///
public void SetLeanSpringDamping(float value) => Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringDamping(this, value);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:33
///
/// float mLeanSpringIntegrationCoefficient = 0.0f
///
///
///
///
/// The lean spring applies an additional force equal to this coefficient * Integral(delta angle, 0, t),
/// this effectively makes the lean spring a PID controller
///
///
public float GetLeanSpringIntegrationCoefficient() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficient(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:33
///
/// float mLeanSpringIntegrationCoefficient = 0.0f
///
///
///
///
/// The lean spring applies an additional force equal to this coefficient * Integral(delta angle, 0, t),
/// this effectively makes the lean spring a PID controller
///
///
public void SetLeanSpringIntegrationCoefficient(float value) => Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficient(this, value);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:36
///
/// float mLeanSpringIntegrationCoefficientDecay = 4.0f
///
///
///
///
/// How much to decay the angle integral when the wheels are not touching the floor: new_value = e^(-decay *
/// t) * initial_value
///
///
public float GetLeanSpringIntegrationCoefficientDecay() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficientDecay(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:36
///
/// float mLeanSpringIntegrationCoefficientDecay = 4.0f
///
///
///
///
/// How much to decay the angle integral when the wheels are not touching the floor: new_value = e^(-decay *
/// t) * initial_value
///
///
public void SetLeanSpringIntegrationCoefficientDecay(float value) => Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficientDecay(this, value);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:40
///
/// float mLeanSmoothingFactor = 0.8f
///
///
///
///
/// How much to smooth the lean angle (0 = no smoothing, 1 = lean angle never changes)
/// Note that this is frame rate dependent because the formula is: smoothing_factor * previous + (1 - smoothing_factor) * current
///
///
public float GetLeanSmoothingFactor() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSmoothingFactor(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:40
///
/// float mLeanSmoothingFactor = 0.8f
///
///
///
///
/// How much to smooth the lean angle (0 = no smoothing, 1 = lean angle never changes)
/// Note that this is frame rate dependent because the formula is: smoothing_factor * previous + (1 - smoothing_factor) * current
///
///
public void SetLeanSmoothingFactor(float value) => Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSmoothingFactor(this, value);
public void AddRef() => Jolt.PInvoke.MotorcycleControllerSettings_AddRef(this);
public void Release() => Jolt.PInvoke.MotorcycleControllerSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.MotorcycleControllerSettings_GetRefCount(this);
public static implicit operator WheeledVehicleControllerSettings(MotorcycleControllerSettings value) => Jolt.PInvoke.MotorcycleControllerSettings_AsWheeledVehicleControllerSettings(value);
public static implicit operator VehicleControllerSettings(MotorcycleControllerSettings value) => Jolt.PInvoke.MotorcycleControllerSettings_AsVehicleControllerSettings(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}