mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
262 lines
13 KiB
C#
262 lines
13 KiB
C#
// <auto-generated/>
|
|
// 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
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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!
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L13">Jolt/Physics/Vehicle/MotorcycleController.h:13</see>
|
|
/// <br/>
|
|
/// <c>class MotorcycleControllerSettings : public WheeledVehicleControllerSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct MotorcycleControllerSettings : IDisposable
|
|
{
|
|
public static MotorcycleControllerSettings Create() => Jolt.PInvoke.MotorcycleControllerSettings_Create();
|
|
|
|
/// <inheritdoc cref="VehicleControllerSettings.GetRTTI()"/>
|
|
public RTTI GetRTTI() => ((VehicleControllerSettings)this).GetRTTI();
|
|
|
|
/// <inheritdoc cref="VehicleControllerSettings.CastTo(RTTI)"/>
|
|
public unsafe Ptr CastTo(RTTI rtti) => ((VehicleControllerSettings)this).CastTo(rtti);
|
|
|
|
/// <inheritdoc cref="VehicleControllerSettings.SaveBinaryState(StreamOut)"/>
|
|
public void SaveBinaryState(StreamOut stream) => ((VehicleControllerSettings)this).SaveBinaryState(stream);
|
|
|
|
/// <inheritdoc cref="VehicleControllerSettings.RestoreBinaryState(StreamIn)"/>
|
|
public void RestoreBinaryState(StreamIn stream) => ((VehicleControllerSettings)this).RestoreBinaryState(stream);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// How far we're willing to make the bike lean over in turns (in radians)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L24">Jolt/Physics/Vehicle/MotorcycleController.h:24</see>
|
|
/// <br/>
|
|
/// <c>float mMaxLeanAngle = DegreesToRadians(45.0f)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMaxLeanAngle() => Jolt.PInvoke.MotorcycleControllerSettings_GetMaxLeanAngle(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// How far we're willing to make the bike lean over in turns (in radians)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L24">Jolt/Physics/Vehicle/MotorcycleController.h:24</see>
|
|
/// <br/>
|
|
/// <c>float mMaxLeanAngle = DegreesToRadians(45.0f)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMaxLeanAngle(float value) =>
|
|
Jolt.PInvoke.MotorcycleControllerSettings_SetMaxLeanAngle(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Spring constant for the lean spring
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L27">Jolt/Physics/Vehicle/MotorcycleController.h:27</see>
|
|
/// <br/>
|
|
/// <c>float mLeanSpringConstant = 5000.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLeanSpringConstant() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringConstant(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Spring constant for the lean spring
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L27">Jolt/Physics/Vehicle/MotorcycleController.h:27</see>
|
|
/// <br/>
|
|
/// <c>float mLeanSpringConstant = 5000.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLeanSpringConstant(float value) =>
|
|
Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringConstant(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Spring damping constant for the lean spring
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L30">Jolt/Physics/Vehicle/MotorcycleController.h:30</see>
|
|
/// <br/>
|
|
/// <c>float mLeanSpringDamping = 1000.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLeanSpringDamping() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringDamping(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Spring damping constant for the lean spring
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L30">Jolt/Physics/Vehicle/MotorcycleController.h:30</see>
|
|
/// <br/>
|
|
/// <c>float mLeanSpringDamping = 1000.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLeanSpringDamping(float value) =>
|
|
Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringDamping(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L33">Jolt/Physics/Vehicle/MotorcycleController.h:33</see>
|
|
/// <br/>
|
|
/// <c>float mLeanSpringIntegrationCoefficient = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLeanSpringIntegrationCoefficient() =>
|
|
Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficient(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L33">Jolt/Physics/Vehicle/MotorcycleController.h:33</see>
|
|
/// <br/>
|
|
/// <c>float mLeanSpringIntegrationCoefficient = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLeanSpringIntegrationCoefficient(float value) =>
|
|
Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficient(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// How much to decay the angle integral when the wheels are not touching the floor: new_value = e^(-decay *
|
|
/// t) * initial_value
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L36">Jolt/Physics/Vehicle/MotorcycleController.h:36</see>
|
|
/// <br/>
|
|
/// <c>float mLeanSpringIntegrationCoefficientDecay = 4.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLeanSpringIntegrationCoefficientDecay() =>
|
|
Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficientDecay(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// How much to decay the angle integral when the wheels are not touching the floor: new_value = e^(-decay *
|
|
/// t) * initial_value
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L36">Jolt/Physics/Vehicle/MotorcycleController.h:36</see>
|
|
/// <br/>
|
|
/// <c>float mLeanSpringIntegrationCoefficientDecay = 4.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLeanSpringIntegrationCoefficientDecay(float value) =>
|
|
Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficientDecay(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L40">Jolt/Physics/Vehicle/MotorcycleController.h:40</see>
|
|
/// <br/>
|
|
/// <c>float mLeanSmoothingFactor = 0.8f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLeanSmoothingFactor() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSmoothingFactor(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L40">Jolt/Physics/Vehicle/MotorcycleController.h:40</see>
|
|
/// <br/>
|
|
/// <c>float mLeanSmoothingFactor = 0.8f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
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<MotorcycleControllerSettings, WheeledVehicleControllerSettings>(value);
|
|
|
|
public static implicit operator VehicleControllerSettings(MotorcycleControllerSettings value) =>
|
|
Unsafe.BitCast<MotorcycleControllerSettings, VehicleControllerSettings>(value);
|
|
|
|
public void Dispose()
|
|
{
|
|
if (IsNull())
|
|
return;
|
|
Release();
|
|
}
|
|
|
|
/// <inheritdoc cref="WheeledVehicleControllerSettings.GetEngine()"/>
|
|
public VehicleEngineSettings GetEngine() => ((WheeledVehicleControllerSettings)this).GetEngine();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleControllerSettings.SetEngine(VehicleEngineSettings)"/>
|
|
public void SetEngine(VehicleEngineSettings value) => ((WheeledVehicleControllerSettings)this).SetEngine(value);
|
|
|
|
/// <inheritdoc cref="WheeledVehicleControllerSettings.GetTransmission()"/>
|
|
public VehicleTransmissionSettings GetTransmission() =>
|
|
((WheeledVehicleControllerSettings)this).GetTransmission();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleControllerSettings.SetTransmission(VehicleTransmissionSettings)"/>
|
|
public void SetTransmission(VehicleTransmissionSettings value) =>
|
|
((WheeledVehicleControllerSettings)this).SetTransmission(value);
|
|
|
|
/// <inheritdoc cref="WheeledVehicleControllerSettings.GetDifferentials()"/>
|
|
[return: Brutal.Attributes.Fixed]
|
|
public unsafe Span<VehicleDifferentialSettings> GetDifferentials() =>
|
|
((WheeledVehicleControllerSettings)this).GetDifferentials();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleControllerSettings.SetDifferentials(ReadOnlySpan{VehicleDifferentialSettings})"/>
|
|
public unsafe void SetDifferentials(ReadOnlySpan<VehicleDifferentialSettings> value) =>
|
|
((WheeledVehicleControllerSettings)this).SetDifferentials(value);
|
|
|
|
/// <inheritdoc cref="WheeledVehicleControllerSettings.GetDifferentialLimitedSlipRatio()"/>
|
|
public float GetDifferentialLimitedSlipRatio() =>
|
|
((WheeledVehicleControllerSettings)this).GetDifferentialLimitedSlipRatio();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleControllerSettings.SetDifferentialLimitedSlipRatio(float)"/>
|
|
public void SetDifferentialLimitedSlipRatio(float value) =>
|
|
((WheeledVehicleControllerSettings)this).SetDifferentialLimitedSlipRatio(value);
|
|
}
|
|
}
|