mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
207 lines
11 KiB
C#
207 lines
11 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>
|
|
/// Runtime data for transmission
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L45">Jolt/Physics/Vehicle/VehicleTransmission.h:45</see>
|
|
/// <br/>
|
|
/// <c>class VehicleTransmission : public VehicleTransmissionSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct VehicleTransmission : IDisposable
|
|
{
|
|
public static VehicleTransmission Create() => Jolt.PInvoke.VehicleTransmission_Create();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set input from driver regarding the transmission (only relevant when transmission is set to manual mode)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L51">Jolt/Physics/Vehicle/VehicleTransmission.h:51</see>
|
|
/// <br/>
|
|
/// <c>void Set(int inCurrentGear, float inClutchFriction)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Set input from driver regarding the transmission (only relevant when transmission is set to manual mode)
|
|
/// @param inCurrentGear Current gear, -1 = reverse, 0 = neutral, 1 = 1st gear etc.
|
|
/// @param inClutchFriction Value between 0 and 1 indicating how much friction the clutch gives (0 = no friction, 1 = full friction)
|
|
/// </code>
|
|
/// </remarks>
|
|
public void Set(int currentGear, float clutchFriction) =>
|
|
Jolt.PInvoke.VehicleTransmission_Set(this, currentGear, clutchFriction);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Update the current gear and clutch friction if the transmission is in auto mode
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L58">Jolt/Physics/Vehicle/VehicleTransmission.h:58</see>
|
|
/// <br/>
|
|
/// <c>void Update(float inDeltaTime, float inCurrentRPM, float inForwardInput, bool inCanShiftUp)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Update the current gear and clutch friction if the transmission is in auto mode
|
|
/// @param inDeltaTime Time step delta time in s
|
|
/// @param inCurrentRPM Current RPM for engine
|
|
/// @param inForwardInput Hint if the user wants to drive forward (> 0) or backwards (< 0)
|
|
/// @param inCanShiftUp Indicates if we want to allow the transmission to shift up (e.g. pass false if wheels are slipping)
|
|
/// </code>
|
|
/// </remarks>
|
|
public void Update(float deltaTime, float currentRPM, float forwardInput, bool canShiftUp) =>
|
|
Jolt.PInvoke.VehicleTransmission_Update(this, deltaTime, currentRPM, forwardInput, canShiftUp);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Current gear, -1 = reverse, 0 = neutral, 1 = 1st gear etc.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L61">Jolt/Physics/Vehicle/VehicleTransmission.h:61</see>
|
|
/// <br/>
|
|
/// <c>int GetCurrentGear() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public int GetCurrentGear() => Jolt.PInvoke.VehicleTransmission_GetCurrentGear(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Value between 0 and 1 indicating how much friction the clutch gives (0 = no friction, 1 = full friction)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L64">Jolt/Physics/Vehicle/VehicleTransmission.h:64</see>
|
|
/// <br/>
|
|
/// <c>float GetClutchFriction() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetClutchFriction() => Jolt.PInvoke.VehicleTransmission_GetClutchFriction(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// If the auto box is currently switching gears
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L67">Jolt/Physics/Vehicle/VehicleTransmission.h:67</see>
|
|
/// <br/>
|
|
/// <c>bool IsSwitchingGear() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsSwitchingGear() => Jolt.PInvoke.VehicleTransmission_IsSwitchingGear(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Return the transmission ratio based on the current gear (ratio between engine and differential)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L70">Jolt/Physics/Vehicle/VehicleTransmission.h:70</see>
|
|
/// <br/>
|
|
/// <c>float GetCurrentRatio() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetCurrentRatio() => Jolt.PInvoke.VehicleTransmission_GetCurrentRatio(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Only allow sleeping when the transmission is idle
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTransmission.h#L73">Jolt/Physics/Vehicle/VehicleTransmission.h:73</see>
|
|
/// <br/>
|
|
/// <c>bool AllowSleep() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool AllowSleep() => Jolt.PInvoke.VehicleTransmission_AllowSleep(this);
|
|
|
|
public static implicit operator VehicleTransmissionSettings(VehicleTransmission value) =>
|
|
Unsafe.BitCast<VehicleTransmission, VehicleTransmissionSettings>(value);
|
|
|
|
public void Dispose() => Jolt.PInvoke.VehicleTransmission_Destroy(this);
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.SaveBinaryState(StreamOut)"/>
|
|
public void SaveBinaryState(StreamOut stream) => ((VehicleTransmissionSettings)this).SaveBinaryState(stream);
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.RestoreBinaryState(StreamIn)"/>
|
|
public void RestoreBinaryState(StreamIn stream) =>
|
|
((VehicleTransmissionSettings)this).RestoreBinaryState(stream);
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.GetMode()"/>
|
|
public TransmissionMode GetMode() => ((VehicleTransmissionSettings)this).GetMode();
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.SetMode(TransmissionMode)"/>
|
|
public void SetMode(TransmissionMode value) => ((VehicleTransmissionSettings)this).SetMode(value);
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.GetGearRatios()"/>
|
|
[return: Brutal.Attributes.Fixed]
|
|
public unsafe Span<float> GetGearRatios() => ((VehicleTransmissionSettings)this).GetGearRatios();
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.SetGearRatios(ReadOnlySpan{float})"/>
|
|
public unsafe void SetGearRatios(ReadOnlySpan<float> value) =>
|
|
((VehicleTransmissionSettings)this).SetGearRatios(value);
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.GetReverseGearRatios()"/>
|
|
[return: Brutal.Attributes.Fixed]
|
|
public unsafe Span<float> GetReverseGearRatios() => ((VehicleTransmissionSettings)this).GetReverseGearRatios();
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.SetReverseGearRatios(ReadOnlySpan{float})"/>
|
|
public unsafe void SetReverseGearRatios(ReadOnlySpan<float> value) =>
|
|
((VehicleTransmissionSettings)this).SetReverseGearRatios(value);
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.GetSwitchTime()"/>
|
|
public float GetSwitchTime() => ((VehicleTransmissionSettings)this).GetSwitchTime();
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.SetSwitchTime(float)"/>
|
|
public void SetSwitchTime(float value) => ((VehicleTransmissionSettings)this).SetSwitchTime(value);
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.GetClutchReleaseTime()"/>
|
|
public float GetClutchReleaseTime() => ((VehicleTransmissionSettings)this).GetClutchReleaseTime();
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.SetClutchReleaseTime(float)"/>
|
|
public void SetClutchReleaseTime(float value) =>
|
|
((VehicleTransmissionSettings)this).SetClutchReleaseTime(value);
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.GetSwitchLatency()"/>
|
|
public float GetSwitchLatency() => ((VehicleTransmissionSettings)this).GetSwitchLatency();
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.SetSwitchLatency(float)"/>
|
|
public void SetSwitchLatency(float value) => ((VehicleTransmissionSettings)this).SetSwitchLatency(value);
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.GetShiftUpRPM()"/>
|
|
public float GetShiftUpRPM() => ((VehicleTransmissionSettings)this).GetShiftUpRPM();
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.SetShiftUpRPM(float)"/>
|
|
public void SetShiftUpRPM(float value) => ((VehicleTransmissionSettings)this).SetShiftUpRPM(value);
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.GetShiftDownRPM()"/>
|
|
public float GetShiftDownRPM() => ((VehicleTransmissionSettings)this).GetShiftDownRPM();
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.SetShiftDownRPM(float)"/>
|
|
public void SetShiftDownRPM(float value) => ((VehicleTransmissionSettings)this).SetShiftDownRPM(value);
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.GetClutchStrength()"/>
|
|
public float GetClutchStrength() => ((VehicleTransmissionSettings)this).GetClutchStrength();
|
|
|
|
/// <inheritdoc cref="VehicleTransmissionSettings.SetClutchStrength(float)"/>
|
|
public void SetClutchStrength(float value) => ((VehicleTransmissionSettings)this).SetClutchStrength(value);
|
|
}
|
|
}
|