mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
231 lines
10 KiB
C#
231 lines
10 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>
|
|
/// Generic properties for tank tracks
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L24">Jolt/Physics/Vehicle/VehicleTrack.h:24</see>
|
|
/// <br/>
|
|
/// <c>class VehicleTrackSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct VehicleTrackSettings : IDisposable
|
|
{
|
|
public static VehicleTrackSettings Create() => Jolt.PInvoke.VehicleTrackSettings_Create();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Saves the contents in binary form to inStream.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L30">Jolt/Physics/Vehicle/VehicleTrack.h:30</see>
|
|
/// <br/>
|
|
/// <c>void SaveBinaryState(StreamOut &inStream) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SaveBinaryState(StreamOut stream) =>
|
|
Jolt.PInvoke.VehicleTrackSettings_SaveBinaryState(this, stream);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Restores the contents in binary form to inStream.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L33">Jolt/Physics/Vehicle/VehicleTrack.h:33</see>
|
|
/// <br/>
|
|
/// <c>void RestoreBinaryState(StreamIn &inStream)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void RestoreBinaryState(StreamIn stream) =>
|
|
Jolt.PInvoke.VehicleTrackSettings_RestoreBinaryState(this, stream);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Which wheel on the track is connected to the engine
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L35">Jolt/Physics/Vehicle/VehicleTrack.h:35</see>
|
|
/// <br/>
|
|
/// <c>uint mDrivenWheel</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public uint GetDrivenWheel() => Jolt.PInvoke.VehicleTrackSettings_GetDrivenWheel(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Which wheel on the track is connected to the engine
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L35">Jolt/Physics/Vehicle/VehicleTrack.h:35</see>
|
|
/// <br/>
|
|
/// <c>uint mDrivenWheel</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetDrivenWheel(uint value) => Jolt.PInvoke.VehicleTrackSettings_SetDrivenWheel(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Indices of wheels that are inside this track, should include the driven wheel too
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L36">Jolt/Physics/Vehicle/VehicleTrack.h:36</see>
|
|
/// <br/>
|
|
/// <c>Array<uint> mWheels</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<uint> GetWheels()
|
|
{
|
|
Jolt.PInvoke.VehicleTrackSettings_GetWheels(this, out var _outResult);
|
|
return new Span<uint>((void*)_outResult.Data, checked((int)_outResult.Count));
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Indices of wheels that are inside this track, should include the driven wheel too
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L36">Jolt/Physics/Vehicle/VehicleTrack.h:36</see>
|
|
/// <br/>
|
|
/// <c>Array<uint> mWheels</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public unsafe void SetWheels(ReadOnlySpan<uint> value)
|
|
{
|
|
fixed (uint* value_fixed = value)
|
|
{
|
|
Jolt.PInvoke.VehicleTrackSettings_SetWheels(this, value_fixed, (nuint)value.Length);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Moment of inertia (kg m^2) of the track and its wheels as seen on the driven wheel
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L37">Jolt/Physics/Vehicle/VehicleTrack.h:37</see>
|
|
/// <br/>
|
|
/// <c>float mInertia = 10.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetInertia() => Jolt.PInvoke.VehicleTrackSettings_GetInertia(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Moment of inertia (kg m^2) of the track and its wheels as seen on the driven wheel
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L37">Jolt/Physics/Vehicle/VehicleTrack.h:37</see>
|
|
/// <br/>
|
|
/// <c>float mInertia = 10.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetInertia(float value) => Jolt.PInvoke.VehicleTrackSettings_SetInertia(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Damping factor of track and its wheels: dw/dt = -c * w as seen on the driven wheel
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L38">Jolt/Physics/Vehicle/VehicleTrack.h:38</see>
|
|
/// <br/>
|
|
/// <c>float mAngularDamping = 0.5f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetAngularDamping() => Jolt.PInvoke.VehicleTrackSettings_GetAngularDamping(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Damping factor of track and its wheels: dw/dt = -c * w as seen on the driven wheel
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L38">Jolt/Physics/Vehicle/VehicleTrack.h:38</see>
|
|
/// <br/>
|
|
/// <c>float mAngularDamping = 0.5f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetAngularDamping(float value) => Jolt.PInvoke.VehicleTrackSettings_SetAngularDamping(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// How much torque (Nm) the brakes can apply on the driven wheel
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L39">Jolt/Physics/Vehicle/VehicleTrack.h:39</see>
|
|
/// <br/>
|
|
/// <c>float mMaxBrakeTorque = 15000.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMaxBrakeTorque() => Jolt.PInvoke.VehicleTrackSettings_GetMaxBrakeTorque(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// How much torque (Nm) the brakes can apply on the driven wheel
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L39">Jolt/Physics/Vehicle/VehicleTrack.h:39</see>
|
|
/// <br/>
|
|
/// <c>float mMaxBrakeTorque = 15000.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMaxBrakeTorque(float value) => Jolt.PInvoke.VehicleTrackSettings_SetMaxBrakeTorque(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Ratio between rotation speed of gear box and driven wheel of track
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L40">Jolt/Physics/Vehicle/VehicleTrack.h:40</see>
|
|
/// <br/>
|
|
/// <c>float mDifferentialRatio = 6.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetDifferentialRatio() => Jolt.PInvoke.VehicleTrackSettings_GetDifferentialRatio(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Ratio between rotation speed of gear box and driven wheel of track
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleTrack.h#L40">Jolt/Physics/Vehicle/VehicleTrack.h:40</see>
|
|
/// <br/>
|
|
/// <c>float mDifferentialRatio = 6.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetDifferentialRatio(float value) =>
|
|
Jolt.PInvoke.VehicleTrackSettings_SetDifferentialRatio(this, value);
|
|
|
|
public void Dispose() => Jolt.PInvoke.VehicleTrackSettings_Destroy(this);
|
|
}
|
|
}
|