brutal/Brutal.Jolt/Generated/Classes/VehicleTransmissionSettings.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

333 lines
15 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>
/// Configuration for the transmission of a vehicle (gear box)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L22">Jolt/Physics/Vehicle/VehicleTransmission.h:22</see>
/// <br/>
/// <c>class VehicleTransmissionSettings</c>
/// </para>
/// </summary>
[InteropHandle]
public readonly partial struct VehicleTransmissionSettings : IDisposable
{
public static VehicleTransmissionSettings Create() => Jolt.PInvoke.VehicleTransmissionSettings_Create();
/// <summary>
/// <para>
/// Saves the contents in binary form to inStream.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L28">Jolt/Physics/Vehicle/VehicleTransmission.h:28</see>
/// <br/>
/// <c>void SaveBinaryState(StreamOut &amp;inStream) const</c>
/// </para>
/// </summary>
public void SaveBinaryState(StreamOut stream) =>
Jolt.PInvoke.VehicleTransmissionSettings_SaveBinaryState(this, stream);
/// <summary>
/// <para>
/// Restores the contents in binary form to inStream.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L31">Jolt/Physics/Vehicle/VehicleTransmission.h:31</see>
/// <br/>
/// <c>void RestoreBinaryState(StreamIn &amp;inStream)</c>
/// </para>
/// </summary>
public void RestoreBinaryState(StreamIn stream) =>
Jolt.PInvoke.VehicleTransmissionSettings_RestoreBinaryState(this, stream);
/// <summary>
/// <para>
/// How to switch gears
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L33">Jolt/Physics/Vehicle/VehicleTransmission.h:33</see>
/// <br/>
/// <c>ETransmissionMode mMode = ETransmissionMode::Auto</c>
/// </para>
/// </summary>
public TransmissionMode GetMode() => Jolt.PInvoke.VehicleTransmissionSettings_GetMode(this);
/// <summary>
/// <para>
/// How to switch gears
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L33">Jolt/Physics/Vehicle/VehicleTransmission.h:33</see>
/// <br/>
/// <c>ETransmissionMode mMode = ETransmissionMode::Auto</c>
/// </para>
/// </summary>
public void SetMode(TransmissionMode value) => Jolt.PInvoke.VehicleTransmissionSettings_SetMode(this, value);
/// <summary>
/// <para>
/// Ratio in rotation rate between engine and gear box, first element is 1st gear, 2nd element 2nd gear etc.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L34">Jolt/Physics/Vehicle/VehicleTransmission.h:34</see>
/// <br/>
/// <c>Array&lt;float&gt; mGearRatios { 2.66f, 1.78f, 1.3f, 1.0f, 0.74f }</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy: edits land in the object that owns it.
/// It's only valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe Span<float> GetGearRatios()
{
Jolt.PInvoke.VehicleTransmissionSettings_GetGearRatios(this, out var _outResult);
return new Span<float>((void*)_outResult.Data, checked((int)_outResult.Count));
}
/// <summary>
/// <para>
/// Ratio in rotation rate between engine and gear box, first element is 1st gear, 2nd element 2nd gear etc.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L34">Jolt/Physics/Vehicle/VehicleTransmission.h:34</see>
/// <br/>
/// <c>Array&lt;float&gt; mGearRatios { 2.66f, 1.78f, 1.3f, 1.0f, 0.74f }</c>
/// </para>
/// </summary>
public unsafe void SetGearRatios(ReadOnlySpan<float> value)
{
fixed (float* value_fixed = value)
{
Jolt.PInvoke.VehicleTransmissionSettings_SetGearRatios(this, value_fixed, (nuint)value.Length);
}
}
/// <summary>
/// <para>
/// Ratio in rotation rate between engine and gear box when driving in reverse
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L35">Jolt/Physics/Vehicle/VehicleTransmission.h:35</see>
/// <br/>
/// <c>Array&lt;float&gt; mReverseGearRatios { -2.90f }</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy: edits land in the object that owns it.
/// It's only valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe Span<float> GetReverseGearRatios()
{
Jolt.PInvoke.VehicleTransmissionSettings_GetReverseGearRatios(this, out var _outResult);
return new Span<float>((void*)_outResult.Data, checked((int)_outResult.Count));
}
/// <summary>
/// <para>
/// Ratio in rotation rate between engine and gear box when driving in reverse
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L35">Jolt/Physics/Vehicle/VehicleTransmission.h:35</see>
/// <br/>
/// <c>Array&lt;float&gt; mReverseGearRatios { -2.90f }</c>
/// </para>
/// </summary>
public unsafe void SetReverseGearRatios(ReadOnlySpan<float> value)
{
fixed (float* value_fixed = value)
{
Jolt.PInvoke.VehicleTransmissionSettings_SetReverseGearRatios(this, value_fixed, (nuint)value.Length);
}
}
/// <summary>
/// <para>
/// How long it takes to switch gears (s), only used in auto mode
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L36">Jolt/Physics/Vehicle/VehicleTransmission.h:36</see>
/// <br/>
/// <c>float mSwitchTime = 0.5f</c>
/// </para>
/// </summary>
public float GetSwitchTime() => Jolt.PInvoke.VehicleTransmissionSettings_GetSwitchTime(this);
/// <summary>
/// <para>
/// How long it takes to switch gears (s), only used in auto mode
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L36">Jolt/Physics/Vehicle/VehicleTransmission.h:36</see>
/// <br/>
/// <c>float mSwitchTime = 0.5f</c>
/// </para>
/// </summary>
public void SetSwitchTime(float value) => Jolt.PInvoke.VehicleTransmissionSettings_SetSwitchTime(this, value);
/// <summary>
/// <para>
/// How long it takes to release the clutch (go to full friction), only used in auto mode
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L37">Jolt/Physics/Vehicle/VehicleTransmission.h:37</see>
/// <br/>
/// <c>float mClutchReleaseTime = 0.3f</c>
/// </para>
/// </summary>
public float GetClutchReleaseTime() => Jolt.PInvoke.VehicleTransmissionSettings_GetClutchReleaseTime(this);
/// <summary>
/// <para>
/// How long it takes to release the clutch (go to full friction), only used in auto mode
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L37">Jolt/Physics/Vehicle/VehicleTransmission.h:37</see>
/// <br/>
/// <c>float mClutchReleaseTime = 0.3f</c>
/// </para>
/// </summary>
public void SetClutchReleaseTime(float value) =>
Jolt.PInvoke.VehicleTransmissionSettings_SetClutchReleaseTime(this, value);
/// <summary>
/// <para>
/// How long to wait after releasing the clutch before another switch is attempted (s), only used in auto
/// mode
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L38">Jolt/Physics/Vehicle/VehicleTransmission.h:38</see>
/// <br/>
/// <c>float mSwitchLatency = 0.5f</c>
/// </para>
/// </summary>
public float GetSwitchLatency() => Jolt.PInvoke.VehicleTransmissionSettings_GetSwitchLatency(this);
/// <summary>
/// <para>
/// How long to wait after releasing the clutch before another switch is attempted (s), only used in auto
/// mode
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L38">Jolt/Physics/Vehicle/VehicleTransmission.h:38</see>
/// <br/>
/// <c>float mSwitchLatency = 0.5f</c>
/// </para>
/// </summary>
public void SetSwitchLatency(float value) =>
Jolt.PInvoke.VehicleTransmissionSettings_SetSwitchLatency(this, value);
/// <summary>
/// <para>
/// If RPM of engine is bigger then this we will shift a gear up, only used in auto mode
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L39">Jolt/Physics/Vehicle/VehicleTransmission.h:39</see>
/// <br/>
/// <c>float mShiftUpRPM = 4000.0f</c>
/// </para>
/// </summary>
public float GetShiftUpRPM() => Jolt.PInvoke.VehicleTransmissionSettings_GetShiftUpRPM(this);
/// <summary>
/// <para>
/// If RPM of engine is bigger then this we will shift a gear up, only used in auto mode
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L39">Jolt/Physics/Vehicle/VehicleTransmission.h:39</see>
/// <br/>
/// <c>float mShiftUpRPM = 4000.0f</c>
/// </para>
/// </summary>
public void SetShiftUpRPM(float value) => Jolt.PInvoke.VehicleTransmissionSettings_SetShiftUpRPM(this, value);
/// <summary>
/// <para>
/// If RPM of engine is smaller then this we will shift a gear down, only used in auto mode
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L40">Jolt/Physics/Vehicle/VehicleTransmission.h:40</see>
/// <br/>
/// <c>float mShiftDownRPM = 2000.0f</c>
/// </para>
/// </summary>
public float GetShiftDownRPM() => Jolt.PInvoke.VehicleTransmissionSettings_GetShiftDownRPM(this);
/// <summary>
/// <para>
/// If RPM of engine is smaller then this we will shift a gear down, only used in auto mode
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L40">Jolt/Physics/Vehicle/VehicleTransmission.h:40</see>
/// <br/>
/// <c>float mShiftDownRPM = 2000.0f</c>
/// </para>
/// </summary>
public void SetShiftDownRPM(float value) =>
Jolt.PInvoke.VehicleTransmissionSettings_SetShiftDownRPM(this, value);
/// <summary>
/// <para>
/// Strength of the clutch when fully engaged. Total torque a clutch applies is Torque = ClutchStrength *
/// (Velocity Engine - Avg Velocity Wheels At Clutch) (units: k m^2 s^-1)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L41">Jolt/Physics/Vehicle/VehicleTransmission.h:41</see>
/// <br/>
/// <c>float mClutchStrength = 10.0f</c>
/// </para>
/// </summary>
public float GetClutchStrength() => Jolt.PInvoke.VehicleTransmissionSettings_GetClutchStrength(this);
/// <summary>
/// <para>
/// Strength of the clutch when fully engaged. Total torque a clutch applies is Torque = ClutchStrength *
/// (Velocity Engine - Avg Velocity Wheels At Clutch) (units: k m^2 s^-1)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L41">Jolt/Physics/Vehicle/VehicleTransmission.h:41</see>
/// <br/>
/// <c>float mClutchStrength = 10.0f</c>
/// </para>
/// </summary>
public void SetClutchStrength(float value) =>
Jolt.PInvoke.VehicleTransmissionSettings_SetClutchStrength(this, value);
public void Dispose() => Jolt.PInvoke.VehicleTransmissionSettings_Destroy(this);
}
}