//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:23
///
/// class VehicleConstraintSettings : public ConstraintSettings
///
///
///
///
/// Configuration for constraint that simulates a wheeled vehicle.
///
/// The properties in this constraint 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
///
///
[InteropHandle]
public readonly partial struct VehicleConstraintSettings : IDisposable
{
public static VehicleConstraintSettings Create() => Jolt.PInvoke.VehicleConstraintSettings_Create();
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:25
///
///
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public RTTI GetRTTI() => Jolt.PInvoke.VehicleConstraintSettings_GetRTTI(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:25
///
///
///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.VehicleConstraintSettings_CastTo(this, rTTI);
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:29
///
/// virtual void SaveBinaryState(StreamOut &inStream) const override
///
///
///
///
/// Saves the contents of the constraint settings in binary form to inStream.
///
///
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.VehicleConstraintSettings_SaveBinaryState(this, stream);
///
///
/// Vector indicating the up direction of the vehicle (in local space to the body)
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:31
///
/// Vec3 mUp { 0, 1, 0 }
///
///
public float3 GetUp() => Jolt.PInvoke.VehicleConstraintSettings_GetUp(this);
///
///
/// Vector indicating the up direction of the vehicle (in local space to the body)
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:31
///
/// Vec3 mUp { 0, 1, 0 }
///
///
public void SetUp(float3 value) => Jolt.PInvoke.VehicleConstraintSettings_SetUp(this, value);
///
///
/// Vector indicating forward direction of the vehicle (in local space to the body)
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:32
///
/// Vec3 mForward { 0, 0, 1 }
///
///
public float3 GetForward() => Jolt.PInvoke.VehicleConstraintSettings_GetForward(this);
///
///
/// Vector indicating forward direction of the vehicle (in local space to the body)
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:32
///
/// Vec3 mForward { 0, 0, 1 }
///
///
public void SetForward(float3 value) => Jolt.PInvoke.VehicleConstraintSettings_SetForward(this, value);
///
///
/// Defines the maximum pitch/roll angle (rad), can be used to avoid the car from getting upside down. The
/// vehicle up direction will stay within a cone centered around the up axis with half top angle
/// mMaxPitchRollAngle, set to pi to turn off.
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:33
///
/// float mMaxPitchRollAngle = JPH_PI
///
///
public float GetMaxPitchRollAngle() => Jolt.PInvoke.VehicleConstraintSettings_GetMaxPitchRollAngle(this);
///
///
/// Defines the maximum pitch/roll angle (rad), can be used to avoid the car from getting upside down. The
/// vehicle up direction will stay within a cone centered around the up axis with half top angle
/// mMaxPitchRollAngle, set to pi to turn off.
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:33
///
/// float mMaxPitchRollAngle = JPH_PI
///
///
public void SetMaxPitchRollAngle(float value) => Jolt.PInvoke.VehicleConstraintSettings_SetMaxPitchRollAngle(this, value);
///
///
/// Defines how the vehicle can accelerate / decelerate
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:36
///
/// Ref<VehicleControllerSettings> mController
///
///
public VehicleControllerSettings GetController() => Jolt.PInvoke.VehicleConstraintSettings_GetController(this);
///
///
/// Defines how the vehicle can accelerate / decelerate
///
///
/// C++:
/// Jolt/Physics/Vehicle/VehicleConstraint.h:36
///
/// Ref<VehicleControllerSettings> mController
///
///
public void SetController(VehicleControllerSettings value) => Jolt.PInvoke.VehicleConstraintSettings_SetController(this, value);
public void AddRef() => Jolt.PInvoke.VehicleConstraintSettings_AddRef(this);
public void Release() => Jolt.PInvoke.VehicleConstraintSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.VehicleConstraintSettings_GetRefCount(this);
public static implicit operator ConstraintSettings(VehicleConstraintSettings value) => Jolt.PInvoke.VehicleConstraintSettings_AsConstraintSettings(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}