mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
173 lines
7.8 KiB
C#
173 lines
7.8 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/VehicleEngine.h#L43">Jolt/Physics/Vehicle/VehicleEngine.h:43</see>
|
|
/// <br/>
|
|
/// <c>class VehicleEngine : public VehicleEngineSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Runtime data for engine
|
|
/// </para>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct VehicleEngine : IDisposable
|
|
{
|
|
public static VehicleEngine Create() => Jolt.PInvoke.VehicleEngine_Create();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleEngine.h#L50">Jolt/Physics/Vehicle/VehicleEngine.h:50</see>
|
|
/// <br/>
|
|
/// <c>inline void ClampRPM()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Clamp the RPM between min and max RPM
|
|
/// </para>
|
|
/// </remarks>
|
|
public void ClampRPM() => Jolt.PInvoke.VehicleEngine_ClampRPM(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleEngine.h#L53">Jolt/Physics/Vehicle/VehicleEngine.h:53</see>
|
|
/// <br/>
|
|
/// <c>float GetCurrentRPM() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Current rotation speed of engine in rounds per minute
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetCurrentRPM() => Jolt.PInvoke.VehicleEngine_GetCurrentRPM(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleEngine.h#L56">Jolt/Physics/Vehicle/VehicleEngine.h:56</see>
|
|
/// <br/>
|
|
/// <c>void SetCurrentRPM(float inRPM)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Update rotation speed of engine in rounds per minute
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetCurrentRPM(float rPM) => Jolt.PInvoke.VehicleEngine_SetCurrentRPM(this, rPM);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleEngine.h#L59">Jolt/Physics/Vehicle/VehicleEngine.h:59</see>
|
|
/// <br/>
|
|
/// <c>inline float GetAngularVelocity() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get current angular velocity of the engine in radians / second
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetAngularVelocity() => Jolt.PInvoke.VehicleEngine_GetAngularVelocity(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleEngine.h#L63">Jolt/Physics/Vehicle/VehicleEngine.h:63</see>
|
|
/// <br/>
|
|
/// <c>float GetTorque(float inAcceleration) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Get the amount of torque (N m) that the engine can supply
|
|
/// @param inAcceleration How much the gas pedal is pressed [0, 1]
|
|
/// </code>
|
|
/// </remarks>
|
|
public float GetTorque(float acceleration) => Jolt.PInvoke.VehicleEngine_GetTorque(this, acceleration);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleEngine.h#L68">Jolt/Physics/Vehicle/VehicleEngine.h:68</see>
|
|
/// <br/>
|
|
/// <c>void ApplyTorque(float inTorque, float inDeltaTime)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Apply a torque to the engine rotation speed
|
|
/// @param inTorque Torque in N m
|
|
/// @param inDeltaTime Delta time in seconds
|
|
/// </code>
|
|
/// </remarks>
|
|
public void ApplyTorque(float torque, float deltaTime) => Jolt.PInvoke.VehicleEngine_ApplyTorque(this, torque, deltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleEngine.h#L72">Jolt/Physics/Vehicle/VehicleEngine.h:72</see>
|
|
/// <br/>
|
|
/// <c>void ApplyDamping(float inDeltaTime)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Update the engine RPM for damping
|
|
/// @param inDeltaTime Delta time in seconds
|
|
/// </code>
|
|
/// </remarks>
|
|
public void ApplyDamping(float deltaTime) => Jolt.PInvoke.VehicleEngine_ApplyDamping(this, deltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleEngine.h#L76">Jolt/Physics/Vehicle/VehicleEngine.h:76</see>
|
|
/// <br/>
|
|
/// <c>float ConvertRPMToAngle(float inRPM) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Function that converts RPM to an angle in radians for debugging purposes
|
|
/// </para>
|
|
/// </remarks>
|
|
public float ConvertRPMToAngle(float rPM) => Jolt.PInvoke.VehicleEngine_ConvertRPMToAngle(this, rPM);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleEngine.h#L79">Jolt/Physics/Vehicle/VehicleEngine.h:79</see>
|
|
/// <br/>
|
|
/// <c>void DrawRPM(DebugRenderer *inRenderer, RVec3Arg inPosition, Vec3Arg inForward, Vec3Arg inUp, float inSize, float inShiftDownRPM, float inShiftUpRPM) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Debug draw a RPM meter
|
|
/// </para>
|
|
/// </remarks>
|
|
public void DrawRPM(DebugRenderer renderer, float3 position, float3 forward, float3 up, float size, float shiftDownRPM, float shiftUpRPM) => Jolt.PInvoke.VehicleEngine_DrawRPM(this, renderer, position, forward, up, size, shiftDownRPM, shiftUpRPM);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleEngine.h#L83">Jolt/Physics/Vehicle/VehicleEngine.h:83</see>
|
|
/// <br/>
|
|
/// <c>bool AllowSleep() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// If the engine is idle we allow the vehicle to sleep
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool AllowSleep() => Jolt.PInvoke.VehicleEngine_AllowSleep(this);
|
|
public static implicit operator VehicleEngineSettings(VehicleEngine value) => Jolt.PInvoke.VehicleEngine_AsVehicleEngineSettings(value);
|
|
public void Dispose() => Jolt.PInvoke.VehicleEngine_Destroy(this);
|
|
}
|
|
}
|