//
// 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
{
///
///
/// Settings of a vehicle with tank tracks
///
///
/// C++:
/// Jolt/Physics/Vehicle/TrackedVehicleController.h:59
///
/// class TrackedVehicleControllerSettings : public VehicleControllerSettings
///
///
///
///
/// Settings of a vehicle with tank tracks
///
/// Default settings are based around what I could find about the M1 Abrams tank.
/// Note to avoid issues with very heavy objects vs very light objects the mass of the tank should be a lot lower (say 10x) than that of a real tank. That means that the engine/brake torque is also 10x less.
///
///
[InteropHandle]
public readonly partial struct TrackedVehicleControllerSettings : IDisposable
{
///
///
/// Constructor
///
///
/// C++:
/// Jolt/Physics/Vehicle/TrackedVehicleController.h:65
///
/// TrackedVehicleControllerSettings()
///
///
public static TrackedVehicleControllerSettings Create() =>
Jolt.PInvoke.TrackedVehicleControllerSettings_Create();
///
public RTTI GetRTTI() => ((VehicleControllerSettings)this).GetRTTI();
///
public unsafe Ptr CastTo(RTTI rtti) => ((VehicleControllerSettings)this).CastTo(rtti);
///
public void SaveBinaryState(StreamOut stream) => ((VehicleControllerSettings)this).SaveBinaryState(stream);
///
public void RestoreBinaryState(StreamIn stream) => ((VehicleControllerSettings)this).RestoreBinaryState(stream);
///
///
/// The properties of the engine
///
///
/// C++:
/// Jolt/Physics/Vehicle/TrackedVehicleController.h:72
///
/// VehicleEngineSettings mEngine
///
///
///
///
/// The returned handle is an owned copy; Dispose it when you're done with it.
///
///
public VehicleEngineSettings GetEngine() => Jolt.PInvoke.TrackedVehicleControllerSettings_GetEngine(this);
///
///
/// The properties of the engine
///
///
/// C++:
/// Jolt/Physics/Vehicle/TrackedVehicleController.h:72
///
/// VehicleEngineSettings mEngine
///
///
///
///
/// The value is copied into the field; the handle you pass stays yours to Dispose.
///
///
public void SetEngine(VehicleEngineSettings value) =>
Jolt.PInvoke.TrackedVehicleControllerSettings_SetEngine(this, value);
///
///
/// The properties of the transmission (aka gear box)
///
///
/// C++:
/// Jolt/Physics/Vehicle/TrackedVehicleController.h:73
///
/// VehicleTransmissionSettings mTransmission
///
///
///
///
/// The returned handle is an owned copy; Dispose it when you're done with it.
///
///
public VehicleTransmissionSettings GetTransmission() =>
Jolt.PInvoke.TrackedVehicleControllerSettings_GetTransmission(this);
///
///
/// The properties of the transmission (aka gear box)
///
///
/// C++:
/// Jolt/Physics/Vehicle/TrackedVehicleController.h:73
///
/// VehicleTransmissionSettings mTransmission
///
///
///
///
/// The value is copied into the field; the handle you pass stays yours to Dispose.
///
///
public void SetTransmission(VehicleTransmissionSettings value) =>
Jolt.PInvoke.TrackedVehicleControllerSettings_SetTransmission(this, value);
///
///
/// List of tracks and their properties
///
///
/// C++:
/// Jolt/Physics/Vehicle/TrackedVehicleController.h:74
///
/// VehicleTrackSettings mTracks[(int)ETrackSide::Num]
///
///
///
///
/// One of the 2 elements, by index. The returned handle is borrowed from its owner; don't Dispose it.
///
///
public VehicleTrackSettings GetTracks(uint index)
{
if (index >= 2)
throw new ArgumentOutOfRangeException(nameof(index), index, "Expected an index below 2.");
return Jolt.PInvoke.TrackedVehicleControllerSettings_GetTracks(this, index);
}
public void AddRef() => ((VehicleControllerSettings)this).AddRef();
public void Release() => ((VehicleControllerSettings)this).Release();
public uint GetRefCount() => ((VehicleControllerSettings)this).GetRefCount();
public static implicit operator VehicleControllerSettings(TrackedVehicleControllerSettings value) =>
Unsafe.BitCast(value);
public void Dispose()
{
if (IsNull())
return;
Release();
}
}
}