//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// 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!
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:13
///
/// class MotorcycleControllerSettings : public WheeledVehicleControllerSettings
///
///
[InteropHandle]
public readonly partial struct MotorcycleControllerSettings : IDisposable
{
public static MotorcycleControllerSettings Create() => Jolt.PInvoke.MotorcycleControllerSettings_Create();
///
public RTTI GetRTTI() => ((VehicleControllerSettings)this).GetRTTI();
///
public unsafe Ptr CastTo(RTTI rtti) => ((VehicleControllerSettings)this).CastTo(rtti);
///
public void SaveBinaryState(StreamOut stream) => ((VehicleControllerSettings)this).SaveBinaryState(stream);
///
public void RestoreBinaryState(StreamIn stream) => ((VehicleControllerSettings)this).RestoreBinaryState(stream);
///
///
/// How far we're willing to make the bike lean over in turns (in radians)
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:24
///
/// float mMaxLeanAngle = DegreesToRadians(45.0f)
///
///
public float GetMaxLeanAngle() => Jolt.PInvoke.MotorcycleControllerSettings_GetMaxLeanAngle(this);
///
///
/// How far we're willing to make the bike lean over in turns (in radians)
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:24
///
/// float mMaxLeanAngle = DegreesToRadians(45.0f)
///
///
public void SetMaxLeanAngle(float value) =>
Jolt.PInvoke.MotorcycleControllerSettings_SetMaxLeanAngle(this, value);
///
///
/// Spring constant for the lean spring
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:27
///
/// float mLeanSpringConstant = 5000.0f
///
///
public float GetLeanSpringConstant() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringConstant(this);
///
///
/// Spring constant for the lean spring
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:27
///
/// float mLeanSpringConstant = 5000.0f
///
///
public void SetLeanSpringConstant(float value) =>
Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringConstant(this, value);
///
///
/// Spring damping constant for the lean spring
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:30
///
/// float mLeanSpringDamping = 1000.0f
///
///
public float GetLeanSpringDamping() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringDamping(this);
///
///
/// Spring damping constant for the lean spring
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:30
///
/// float mLeanSpringDamping = 1000.0f
///
///
public void SetLeanSpringDamping(float value) =>
Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringDamping(this, value);
///
///
/// 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
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:33
///
/// float mLeanSpringIntegrationCoefficient = 0.0f
///
///
public float GetLeanSpringIntegrationCoefficient() =>
Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficient(this);
///
///
/// 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
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:33
///
/// float mLeanSpringIntegrationCoefficient = 0.0f
///
///
public void SetLeanSpringIntegrationCoefficient(float value) =>
Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficient(this, value);
///
///
/// How much to decay the angle integral when the wheels are not touching the floor: new_value = e^(-decay *
/// t) * initial_value
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:36
///
/// float mLeanSpringIntegrationCoefficientDecay = 4.0f
///
///
public float GetLeanSpringIntegrationCoefficientDecay() =>
Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficientDecay(this);
///
///
/// How much to decay the angle integral when the wheels are not touching the floor: new_value = e^(-decay *
/// t) * initial_value
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:36
///
/// float mLeanSpringIntegrationCoefficientDecay = 4.0f
///
///
public void SetLeanSpringIntegrationCoefficientDecay(float value) =>
Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficientDecay(this, value);
///
///
/// 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
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:40
///
/// float mLeanSmoothingFactor = 0.8f
///
///
public float GetLeanSmoothingFactor() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSmoothingFactor(this);
///
///
/// 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
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:40
///
/// float mLeanSmoothingFactor = 0.8f
///
///
public void SetLeanSmoothingFactor(float value) =>
Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSmoothingFactor(this, value);
public void AddRef() => ((VehicleControllerSettings)this).AddRef();
public void Release() => ((VehicleControllerSettings)this).Release();
public uint GetRefCount() => ((VehicleControllerSettings)this).GetRefCount();
public static implicit operator WheeledVehicleControllerSettings(MotorcycleControllerSettings value) =>
Unsafe.BitCast(value);
public static implicit operator VehicleControllerSettings(MotorcycleControllerSettings value) =>
Unsafe.BitCast(value);
public void Dispose()
{
if (IsNull())
return;
Release();
}
///
public VehicleEngineSettings GetEngine() => ((WheeledVehicleControllerSettings)this).GetEngine();
///
public void SetEngine(VehicleEngineSettings value) => ((WheeledVehicleControllerSettings)this).SetEngine(value);
///
public VehicleTransmissionSettings GetTransmission() =>
((WheeledVehicleControllerSettings)this).GetTransmission();
///
public void SetTransmission(VehicleTransmissionSettings value) =>
((WheeledVehicleControllerSettings)this).SetTransmission(value);
///
[return: Brutal.Attributes.Fixed]
public unsafe Span GetDifferentials() =>
((WheeledVehicleControllerSettings)this).GetDifferentials();
///
public unsafe void SetDifferentials(ReadOnlySpan value) =>
((WheeledVehicleControllerSettings)this).SetDifferentials(value);
///
public float GetDifferentialLimitedSlipRatio() =>
((WheeledVehicleControllerSettings)this).GetDifferentialLimitedSlipRatio();
///
public void SetDifferentialLimitedSlipRatio(float value) =>
((WheeledVehicleControllerSettings)this).SetDifferentialLimitedSlipRatio(value);
}
}