mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
339 lines
17 KiB
C#
339 lines
17 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 controller class
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L44">Jolt/Physics/Vehicle/MotorcycleController.h:44</see>
|
|
/// <br/>
|
|
/// <c>class MotorcycleController : public WheeledVehicleController</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct MotorcycleController : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L50">Jolt/Physics/Vehicle/MotorcycleController.h:50</see>
|
|
/// <br/>
|
|
/// <c>MotorcycleController(const MotorcycleControllerSettings &inSettings, VehicleConstraint &inConstraint)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static MotorcycleController Create(
|
|
MotorcycleControllerSettings settings,
|
|
VehicleConstraint constraint
|
|
) => Jolt.PInvoke.MotorcycleController_Create(settings, constraint);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Get the distance between the front and back wheels
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L53">Jolt/Physics/Vehicle/MotorcycleController.h:53</see>
|
|
/// <br/>
|
|
/// <c>float GetWheelBase() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetWheelBase() => Jolt.PInvoke.MotorcycleController_GetWheelBase(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Enable or disable the lean spring. This allows you to temporarily disable the lean spring to allow the
|
|
/// motorcycle to fall over.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L56">Jolt/Physics/Vehicle/MotorcycleController.h:56</see>
|
|
/// <br/>
|
|
/// <c>void EnableLeanController(bool inEnable)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void EnableLeanController(bool enable) =>
|
|
Jolt.PInvoke.MotorcycleController_EnableLeanController(this, enable);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Check if the lean spring is enabled.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L59">Jolt/Physics/Vehicle/MotorcycleController.h:59</see>
|
|
/// <br/>
|
|
/// <c>bool IsLeanControllerEnabled() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsLeanControllerEnabled() => Jolt.PInvoke.MotorcycleController_IsLeanControllerEnabled(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Enable or disable the lean steering limit. When enabled (default) the steering angle is limited based on
|
|
/// the vehicle speed to prevent steering that would cause an inertial force that causes the motorcycle to
|
|
/// topple over.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L62">Jolt/Physics/Vehicle/MotorcycleController.h:62</see>
|
|
/// <br/>
|
|
/// <c>void EnableLeanSteeringLimit(bool inEnable)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void EnableLeanSteeringLimit(bool enable) =>
|
|
Jolt.PInvoke.MotorcycleController_EnableLeanSteeringLimit(this, enable);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L63">Jolt/Physics/Vehicle/MotorcycleController.h:63</see>
|
|
/// <br/>
|
|
/// <c>bool IsLeanSteeringLimitEnabled() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsLeanSteeringLimitEnabled() => Jolt.PInvoke.MotorcycleController_IsLeanSteeringLimitEnabled(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#L66">Jolt/Physics/Vehicle/MotorcycleController.h:66</see>
|
|
/// <br/>
|
|
/// <c>void SetLeanSpringConstant(float inConstant)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLeanSpringConstant(float constant) =>
|
|
Jolt.PInvoke.MotorcycleController_SetLeanSpringConstant(this, constant);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L67">Jolt/Physics/Vehicle/MotorcycleController.h:67</see>
|
|
/// <br/>
|
|
/// <c>float GetLeanSpringConstant() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLeanSpringConstant() => Jolt.PInvoke.MotorcycleController_GetLeanSpringConstant(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#L70">Jolt/Physics/Vehicle/MotorcycleController.h:70</see>
|
|
/// <br/>
|
|
/// <c>void SetLeanSpringDamping(float inDamping)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLeanSpringDamping(float damping) =>
|
|
Jolt.PInvoke.MotorcycleController_SetLeanSpringDamping(this, damping);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L71">Jolt/Physics/Vehicle/MotorcycleController.h:71</see>
|
|
/// <br/>
|
|
/// <c>float GetLeanSpringDamping() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLeanSpringDamping() => Jolt.PInvoke.MotorcycleController_GetLeanSpringDamping(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#L74">Jolt/Physics/Vehicle/MotorcycleController.h:74</see>
|
|
/// <br/>
|
|
/// <c>void SetLeanSpringIntegrationCoefficient(float inCoefficient)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLeanSpringIntegrationCoefficient(float coefficient) =>
|
|
Jolt.PInvoke.MotorcycleController_SetLeanSpringIntegrationCoefficient(this, coefficient);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L75">Jolt/Physics/Vehicle/MotorcycleController.h:75</see>
|
|
/// <br/>
|
|
/// <c>float GetLeanSpringIntegrationCoefficient() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLeanSpringIntegrationCoefficient() =>
|
|
Jolt.PInvoke.MotorcycleController_GetLeanSpringIntegrationCoefficient(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#L78">Jolt/Physics/Vehicle/MotorcycleController.h:78</see>
|
|
/// <br/>
|
|
/// <c>void SetLeanSpringIntegrationCoefficientDecay(float inDecay)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLeanSpringIntegrationCoefficientDecay(float decay) =>
|
|
Jolt.PInvoke.MotorcycleController_SetLeanSpringIntegrationCoefficientDecay(this, decay);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L79">Jolt/Physics/Vehicle/MotorcycleController.h:79</see>
|
|
/// <br/>
|
|
/// <c>float GetLeanSpringIntegrationCoefficientDecay() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLeanSpringIntegrationCoefficientDecay() =>
|
|
Jolt.PInvoke.MotorcycleController_GetLeanSpringIntegrationCoefficientDecay(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#L83">Jolt/Physics/Vehicle/MotorcycleController.h:83</see>
|
|
/// <br/>
|
|
/// <c>void SetLeanSmoothingFactor(float inFactor)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLeanSmoothingFactor(float factor) =>
|
|
Jolt.PInvoke.MotorcycleController_SetLeanSmoothingFactor(this, factor);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/MotorcycleController.h#L84">Jolt/Physics/Vehicle/MotorcycleController.h:84</see>
|
|
/// <br/>
|
|
/// <c>float GetLeanSmoothingFactor() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLeanSmoothingFactor() => Jolt.PInvoke.MotorcycleController_GetLeanSmoothingFactor(this);
|
|
|
|
/// <inheritdoc cref="VehicleController.GetSettings()"/>
|
|
public VehicleControllerSettings GetSettings() => ((VehicleController)this).GetSettings();
|
|
|
|
public static implicit operator WheeledVehicleController(MotorcycleController value) =>
|
|
Unsafe.BitCast<MotorcycleController, WheeledVehicleController>(value);
|
|
|
|
public static implicit operator VehicleController(MotorcycleController value) =>
|
|
Unsafe.BitCast<MotorcycleController, VehicleController>(value);
|
|
|
|
public void Dispose() => Jolt.PInvoke.MotorcycleController_Destroy(this);
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.SetDriverInput(float, float, float, float)"/>
|
|
public void SetDriverInput(float forward, float right, float brake, float handBrake) =>
|
|
((WheeledVehicleController)this).SetDriverInput(forward, right, brake, handBrake);
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.SetForwardInput(float)"/>
|
|
public void SetForwardInput(float forward) => ((WheeledVehicleController)this).SetForwardInput(forward);
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.GetForwardInput()"/>
|
|
public float GetForwardInput() => ((WheeledVehicleController)this).GetForwardInput();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.SetRightInput(float)"/>
|
|
public void SetRightInput(float right) => ((WheeledVehicleController)this).SetRightInput(right);
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.GetRightInput()"/>
|
|
public float GetRightInput() => ((WheeledVehicleController)this).GetRightInput();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.SetBrakeInput(float)"/>
|
|
public void SetBrakeInput(float brake) => ((WheeledVehicleController)this).SetBrakeInput(brake);
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.GetBrakeInput()"/>
|
|
public float GetBrakeInput() => ((WheeledVehicleController)this).GetBrakeInput();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.SetHandBrakeInput(float)"/>
|
|
public void SetHandBrakeInput(float handBrake) => ((WheeledVehicleController)this).SetHandBrakeInput(handBrake);
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.GetHandBrakeInput()"/>
|
|
public float GetHandBrakeInput() => ((WheeledVehicleController)this).GetHandBrakeInput();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.GetEngine()"/>
|
|
public VehicleEngine GetEngine() => ((WheeledVehicleController)this).GetEngine();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.GetTransmission()"/>
|
|
public VehicleTransmission GetTransmission() => ((WheeledVehicleController)this).GetTransmission();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.GetDifferentials()"/>
|
|
[return: Brutal.Attributes.Fixed]
|
|
public unsafe Span<VehicleDifferentialSettings> GetDifferentials() =>
|
|
((WheeledVehicleController)this).GetDifferentials();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.GetDifferentialLimitedSlipRatio()"/>
|
|
public float GetDifferentialLimitedSlipRatio() =>
|
|
((WheeledVehicleController)this).GetDifferentialLimitedSlipRatio();
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.SetDifferentialLimitedSlipRatio(float)"/>
|
|
public void SetDifferentialLimitedSlipRatio(float v) =>
|
|
((WheeledVehicleController)this).SetDifferentialLimitedSlipRatio(v);
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.GetWheelSpeedAtClutch()"/>
|
|
public float GetWheelSpeedAtClutch() => ((WheeledVehicleController)this).GetWheelSpeedAtClutch();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/WheeledVehicleController.h#L151">Jolt/Physics/Vehicle/WheeledVehicleController.h:151</see>
|
|
/// <br/>
|
|
/// <c>void SetTireMaxImpulseCallback(const TireMaxImpulseCallback &inTireMaxImpulseCallback)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// tireMaxImpulseCallback: The callback is invoked from native code: it must be a static method marked
|
|
/// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim.
|
|
/// Jolt calls it without a null check, so null is rejected. The callback and userData are retained by the
|
|
/// native object until they are replaced or the owner is destroyed - keep whatever userData points at (a
|
|
/// GCHandle, an allocation) alive for at least that long, and don't free it at the end of the call.
|
|
/// </para>
|
|
/// </remarks>
|
|
public unsafe void SetTireMaxImpulseCallback(
|
|
delegate* unmanaged[Cdecl]<
|
|
uint,
|
|
float*,
|
|
float*,
|
|
float,
|
|
float,
|
|
float,
|
|
float,
|
|
float,
|
|
float,
|
|
nint,
|
|
void> tireMaxImpulseCallback,
|
|
nint tireMaxImpulseCallbackUserData
|
|
) =>
|
|
((WheeledVehicleController)this).SetTireMaxImpulseCallback(
|
|
tireMaxImpulseCallback,
|
|
tireMaxImpulseCallbackUserData
|
|
);
|
|
|
|
/// <inheritdoc cref="WheeledVehicleController.SetRPMMeter(float3, float)"/>
|
|
public void SetRPMMeter(float3 position, float size) =>
|
|
((WheeledVehicleController)this).SetRPMMeter(position, size);
|
|
|
|
/// <inheritdoc cref="VehicleController.GetConstraint()"/>
|
|
public VehicleConstraint GetConstraint() => ((VehicleController)this).GetConstraint();
|
|
}
|
|
}
|