mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
216 lines
9.8 KiB
C#
216 lines
9.8 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>
|
|
/// Settings of a vehicle with regular wheels
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/WheeledVehicleController.h#L72">Jolt/Physics/Vehicle/WheeledVehicleController.h:72</see>
|
|
/// <br/>
|
|
/// <c>class WheeledVehicleControllerSettings : public VehicleControllerSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Settings of a vehicle with regular wheels
|
|
///
|
|
/// The properties in this controller are largely based on "Car Physics for Games" by Marco Monster.
|
|
/// See: https://www.asawicki.info/Mirror/Car%20Physics%20for%20Games/Car%20Physics%20for%20Games.html
|
|
/// </code>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct WheeledVehicleControllerSettings : IDisposable
|
|
{
|
|
public static WheeledVehicleControllerSettings Create() =>
|
|
Jolt.PInvoke.WheeledVehicleControllerSettings_Create();
|
|
|
|
/// <inheritdoc cref="VehicleControllerSettings.GetRTTI()"/>
|
|
public RTTI GetRTTI() => ((VehicleControllerSettings)this).GetRTTI();
|
|
|
|
/// <inheritdoc cref="VehicleControllerSettings.CastTo(RTTI)"/>
|
|
public unsafe Ptr CastTo(RTTI rtti) => ((VehicleControllerSettings)this).CastTo(rtti);
|
|
|
|
/// <inheritdoc cref="VehicleControllerSettings.SaveBinaryState(StreamOut)"/>
|
|
public void SaveBinaryState(StreamOut stream) => ((VehicleControllerSettings)this).SaveBinaryState(stream);
|
|
|
|
/// <inheritdoc cref="VehicleControllerSettings.RestoreBinaryState(StreamIn)"/>
|
|
public void RestoreBinaryState(StreamIn stream) => ((VehicleControllerSettings)this).RestoreBinaryState(stream);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// The properties of the engine
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/WheeledVehicleController.h#L82">Jolt/Physics/Vehicle/WheeledVehicleController.h:82</see>
|
|
/// <br/>
|
|
/// <c>VehicleEngineSettings mEngine</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is an owned copy; Dispose it when you're done with it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public VehicleEngineSettings GetEngine() => Jolt.PInvoke.WheeledVehicleControllerSettings_GetEngine(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// The properties of the engine
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/WheeledVehicleController.h#L82">Jolt/Physics/Vehicle/WheeledVehicleController.h:82</see>
|
|
/// <br/>
|
|
/// <c>VehicleEngineSettings mEngine</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The value is copied into the field; the handle you pass stays yours to Dispose.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetEngine(VehicleEngineSettings value) =>
|
|
Jolt.PInvoke.WheeledVehicleControllerSettings_SetEngine(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// The properties of the transmission (aka gear box)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/WheeledVehicleController.h#L83">Jolt/Physics/Vehicle/WheeledVehicleController.h:83</see>
|
|
/// <br/>
|
|
/// <c>VehicleTransmissionSettings mTransmission</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is an owned copy; Dispose it when you're done with it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public VehicleTransmissionSettings GetTransmission() =>
|
|
Jolt.PInvoke.WheeledVehicleControllerSettings_GetTransmission(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// The properties of the transmission (aka gear box)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/WheeledVehicleController.h#L83">Jolt/Physics/Vehicle/WheeledVehicleController.h:83</see>
|
|
/// <br/>
|
|
/// <c>VehicleTransmissionSettings mTransmission</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The value is copied into the field; the handle you pass stays yours to Dispose.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetTransmission(VehicleTransmissionSettings value) =>
|
|
Jolt.PInvoke.WheeledVehicleControllerSettings_SetTransmission(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// List of differentials and their properties
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/WheeledVehicleController.h#L84">Jolt/Physics/Vehicle/WheeledVehicleController.h:84</see>
|
|
/// <br/>
|
|
/// <c>Array<VehicleDifferentialSettings> mDifferentials</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<VehicleDifferentialSettings> GetDifferentials()
|
|
{
|
|
Jolt.PInvoke.WheeledVehicleControllerSettings_GetDifferentials(this, out var _outResult);
|
|
return new Span<VehicleDifferentialSettings>((void*)_outResult.Data, checked((int)_outResult.Count));
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// List of differentials and their properties
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/WheeledVehicleController.h#L84">Jolt/Physics/Vehicle/WheeledVehicleController.h:84</see>
|
|
/// <br/>
|
|
/// <c>Array<VehicleDifferentialSettings> mDifferentials</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public unsafe void SetDifferentials(ReadOnlySpan<VehicleDifferentialSettings> value)
|
|
{
|
|
fixed (VehicleDifferentialSettings* value_fixed = value)
|
|
{
|
|
Jolt.PInvoke.WheeledVehicleControllerSettings_SetDifferentials(this, value_fixed, (nuint)value.Length);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Ratio max / min average wheel speed of each differential (measured at the clutch). When the ratio is
|
|
/// exceeded all torque gets distributed to the differential with the minimal average velocity. This allows
|
|
/// implementing a limited slip differential between differentials. Set to FLT_MAX for an open differential.
|
|
/// Value should be > 1.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/WheeledVehicleController.h#L85">Jolt/Physics/Vehicle/WheeledVehicleController.h:85</see>
|
|
/// <br/>
|
|
/// <c>float mDifferentialLimitedSlipRatio = 1.4f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetDifferentialLimitedSlipRatio() =>
|
|
Jolt.PInvoke.WheeledVehicleControllerSettings_GetDifferentialLimitedSlipRatio(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Ratio max / min average wheel speed of each differential (measured at the clutch). When the ratio is
|
|
/// exceeded all torque gets distributed to the differential with the minimal average velocity. This allows
|
|
/// implementing a limited slip differential between differentials. Set to FLT_MAX for an open differential.
|
|
/// Value should be > 1.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/WheeledVehicleController.h#L85">Jolt/Physics/Vehicle/WheeledVehicleController.h:85</see>
|
|
/// <br/>
|
|
/// <c>float mDifferentialLimitedSlipRatio = 1.4f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetDifferentialLimitedSlipRatio(float value) =>
|
|
Jolt.PInvoke.WheeledVehicleControllerSettings_SetDifferentialLimitedSlipRatio(this, value);
|
|
|
|
public void AddRef() => ((VehicleControllerSettings)this).AddRef();
|
|
|
|
public void Release() => ((VehicleControllerSettings)this).Release();
|
|
|
|
public uint GetRefCount() => ((VehicleControllerSettings)this).GetRefCount();
|
|
|
|
public static implicit operator VehicleControllerSettings(WheeledVehicleControllerSettings value) =>
|
|
Unsafe.BitCast<WheeledVehicleControllerSettings, VehicleControllerSettings>(value);
|
|
|
|
public void Dispose()
|
|
{
|
|
if (IsNull())
|
|
return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|