brutal/brutal.jolt/Brutal.Jolt/Generated/Classes/VehicleTransmission.gen.cs
2026-10-15 14:12:02 +13:00

133 lines
6.5 KiB
C#

// <auto-generated/>
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleTransmission.h#L45">Jolt/Physics/Vehicle/VehicleTransmission.h:45</see>
/// <br/>
/// <c>class VehicleTransmission : public VehicleTransmissionSettings</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Runtime data for transmission
/// </para>
/// </remarks>
[InteropHandle]
public readonly partial struct VehicleTransmission : IDisposable
{
public static VehicleTransmission Create() => Jolt.PInvoke.VehicleTransmission_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/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>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/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 (&amp;gt; 0) or backwards (&amp;lt; 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>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleTransmission.h#L61">Jolt/Physics/Vehicle/VehicleTransmission.h:61</see>
/// <br/>
/// <c>int GetCurrentGear() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Current gear, -1 = reverse, 0 = neutral, 1 = 1st gear etc.
/// </para>
/// </remarks>
public int GetCurrentGear() => Jolt.PInvoke.VehicleTransmission_GetCurrentGear(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleTransmission.h#L64">Jolt/Physics/Vehicle/VehicleTransmission.h:64</see>
/// <br/>
/// <c>float GetClutchFriction() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Value between 0 and 1 indicating how much friction the clutch gives (0 = no friction, 1 = full friction)
/// </para>
/// </remarks>
public float GetClutchFriction() => Jolt.PInvoke.VehicleTransmission_GetClutchFriction(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleTransmission.h#L67">Jolt/Physics/Vehicle/VehicleTransmission.h:67</see>
/// <br/>
/// <c>bool IsSwitchingGear() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// If the auto box is currently switching gears
/// </para>
/// </remarks>
public bool IsSwitchingGear() => Jolt.PInvoke.VehicleTransmission_IsSwitchingGear(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleTransmission.h#L70">Jolt/Physics/Vehicle/VehicleTransmission.h:70</see>
/// <br/>
/// <c>float GetCurrentRatio() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Return the transmission ratio based on the current gear (ratio between engine and differential)
/// </para>
/// </remarks>
public float GetCurrentRatio() => Jolt.PInvoke.VehicleTransmission_GetCurrentRatio(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleTransmission.h#L73">Jolt/Physics/Vehicle/VehicleTransmission.h:73</see>
/// <br/>
/// <c>bool AllowSleep() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Only allow sleeping when the transmission is idle
/// </para>
/// </remarks>
public bool AllowSleep() => Jolt.PInvoke.VehicleTransmission_AllowSleep(this);
public static implicit operator VehicleTransmissionSettings(VehicleTransmission value) => Jolt.PInvoke.VehicleTransmission_AsVehicleTransmissionSettings(value);
public void Dispose() => Jolt.PInvoke.VehicleTransmission_Destroy(this);
}
}