mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
269 lines
13 KiB
C#
269 lines
13 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>
|
|
/// Wheel object specifically for TrackedVehicleController
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L32">Jolt/Physics/Vehicle/TrackedVehicleController.h:32</see>
|
|
/// <br/>
|
|
/// <c>class WheelTV : public Wheel</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct WheelTV : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L38">Jolt/Physics/Vehicle/TrackedVehicleController.h:38</see>
|
|
/// <br/>
|
|
/// <c>explicit WheelTV(const WheelSettingsTV &inWheel)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static WheelTV Create(WheelSettingsTV wheel) => Jolt.PInvoke.WheelTV_Create(wheel);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Override GetSettings and cast to the correct class
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L41">Jolt/Physics/Vehicle/TrackedVehicleController.h:41</see>
|
|
/// <br/>
|
|
/// <c>const WheelSettingsTV * GetSettings() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle carries its own reference; Dispose it once when you're done.
|
|
/// </para>
|
|
/// </remarks>
|
|
public WheelSettingsTV GetSettings() => Jolt.PInvoke.WheelTV_GetSettings(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Update the angular velocity of the wheel based on the angular velocity of the track
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L44">Jolt/Physics/Vehicle/TrackedVehicleController.h:44</see>
|
|
/// <br/>
|
|
/// <c>void CalculateAngularVelocity(const VehicleConstraint &inConstraint)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void CalculateAngularVelocity(VehicleConstraint constraint) =>
|
|
Jolt.PInvoke.WheelTV_CalculateAngularVelocity(this, constraint);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Update the wheel rotation based on the current angular velocity
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L47">Jolt/Physics/Vehicle/TrackedVehicleController.h:47</see>
|
|
/// <br/>
|
|
/// <c>void Update(uint inWheelIndex, float inDeltaTime, const VehicleConstraint &inConstraint)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void Update(uint wheelIndex, float deltaTime, VehicleConstraint constraint)
|
|
{
|
|
Jolt.PInvoke.WheelTV_Update(this, wheelIndex, deltaTime, constraint, out var _inRange);
|
|
if (_inRange == 0)
|
|
throw new ArgumentOutOfRangeException(
|
|
nameof(wheelIndex),
|
|
wheelIndex,
|
|
"Expected an index below the number of wheels."
|
|
);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Index in mTracks to which this wheel is attached (calculated on initialization)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L49">Jolt/Physics/Vehicle/TrackedVehicleController.h:49</see>
|
|
/// <br/>
|
|
/// <c>int mTrackIndex = -1</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public int GetTrackIndex() => Jolt.PInvoke.WheelTV_GetTrackIndex(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Index in mTracks to which this wheel is attached (calculated on initialization)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L49">Jolt/Physics/Vehicle/TrackedVehicleController.h:49</see>
|
|
/// <br/>
|
|
/// <c>int mTrackIndex = -1</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetTrackIndex(int value) => Jolt.PInvoke.WheelTV_SetTrackIndex(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Combined friction coefficient in longitudinal direction (combines terrain and track)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L50">Jolt/Physics/Vehicle/TrackedVehicleController.h:50</see>
|
|
/// <br/>
|
|
/// <c>float mCombinedLongitudinalFriction = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetCombinedLongitudinalFriction() => Jolt.PInvoke.WheelTV_GetCombinedLongitudinalFriction(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Combined friction coefficient in longitudinal direction (combines terrain and track)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L50">Jolt/Physics/Vehicle/TrackedVehicleController.h:50</see>
|
|
/// <br/>
|
|
/// <c>float mCombinedLongitudinalFriction = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetCombinedLongitudinalFriction(float value) =>
|
|
Jolt.PInvoke.WheelTV_SetCombinedLongitudinalFriction(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Combined friction coefficient in lateral direction (combines terrain and track)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L51">Jolt/Physics/Vehicle/TrackedVehicleController.h:51</see>
|
|
/// <br/>
|
|
/// <c>float mCombinedLateralFriction = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetCombinedLateralFriction() => Jolt.PInvoke.WheelTV_GetCombinedLateralFriction(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Combined friction coefficient in lateral direction (combines terrain and track)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L51">Jolt/Physics/Vehicle/TrackedVehicleController.h:51</see>
|
|
/// <br/>
|
|
/// <c>float mCombinedLateralFriction = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetCombinedLateralFriction(float value) =>
|
|
Jolt.PInvoke.WheelTV_SetCombinedLateralFriction(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Amount of impulse that the brakes can apply to the floor (excluding friction), spread out from brake
|
|
/// impulse applied on track
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L52">Jolt/Physics/Vehicle/TrackedVehicleController.h:52</see>
|
|
/// <br/>
|
|
/// <c>float mBrakeImpulse = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetBrakeImpulse() => Jolt.PInvoke.WheelTV_GetBrakeImpulse(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Amount of impulse that the brakes can apply to the floor (excluding friction), spread out from brake
|
|
/// impulse applied on track
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/TrackedVehicleController.h#L52">Jolt/Physics/Vehicle/TrackedVehicleController.h:52</see>
|
|
/// <br/>
|
|
/// <c>float mBrakeImpulse = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetBrakeImpulse(float value) => Jolt.PInvoke.WheelTV_SetBrakeImpulse(this, value);
|
|
|
|
public static implicit operator Wheel(WheelTV value) => Unsafe.BitCast<WheelTV, Wheel>(value);
|
|
|
|
public void Dispose() => Jolt.PInvoke.WheelTV_Destroy(this);
|
|
|
|
/// <inheritdoc cref="Wheel.GetAngularVelocity()"/>
|
|
public float GetAngularVelocity() => ((Wheel)this).GetAngularVelocity();
|
|
|
|
/// <inheritdoc cref="Wheel.SetAngularVelocity(float)"/>
|
|
public void SetAngularVelocity(float vel) => ((Wheel)this).SetAngularVelocity(vel);
|
|
|
|
/// <inheritdoc cref="Wheel.GetRotationAngle()"/>
|
|
public float GetRotationAngle() => ((Wheel)this).GetRotationAngle();
|
|
|
|
/// <inheritdoc cref="Wheel.SetRotationAngle(float)"/>
|
|
public void SetRotationAngle(float angle) => ((Wheel)this).SetRotationAngle(angle);
|
|
|
|
/// <inheritdoc cref="Wheel.GetSteerAngle()"/>
|
|
public float GetSteerAngle() => ((Wheel)this).GetSteerAngle();
|
|
|
|
/// <inheritdoc cref="Wheel.SetSteerAngle(float)"/>
|
|
public void SetSteerAngle(float angle) => ((Wheel)this).SetSteerAngle(angle);
|
|
|
|
/// <inheritdoc cref="Wheel.HasContact()"/>
|
|
public bool HasContact() => ((Wheel)this).HasContact();
|
|
|
|
/// <inheritdoc cref="Wheel.GetContactBodyID()"/>
|
|
public uint GetContactBodyID() => ((Wheel)this).GetContactBodyID();
|
|
|
|
/// <inheritdoc cref="Wheel.GetContactSubShapeID()"/>
|
|
public uint GetContactSubShapeID() => ((Wheel)this).GetContactSubShapeID();
|
|
|
|
/// <inheritdoc cref="Wheel.GetContactPosition()"/>
|
|
public float3 GetContactPosition() => ((Wheel)this).GetContactPosition();
|
|
|
|
/// <inheritdoc cref="Wheel.GetContactPointVelocity()"/>
|
|
public float3 GetContactPointVelocity() => ((Wheel)this).GetContactPointVelocity();
|
|
|
|
/// <inheritdoc cref="Wheel.GetContactNormal()"/>
|
|
public float3 GetContactNormal() => ((Wheel)this).GetContactNormal();
|
|
|
|
/// <inheritdoc cref="Wheel.GetContactLongitudinal()"/>
|
|
public float3 GetContactLongitudinal() => ((Wheel)this).GetContactLongitudinal();
|
|
|
|
/// <inheritdoc cref="Wheel.GetContactLateral()"/>
|
|
public float3 GetContactLateral() => ((Wheel)this).GetContactLateral();
|
|
|
|
/// <inheritdoc cref="Wheel.GetSuspensionLength()"/>
|
|
public float GetSuspensionLength() => ((Wheel)this).GetSuspensionLength();
|
|
|
|
/// <inheritdoc cref="Wheel.HasHitHardPoint()"/>
|
|
public bool HasHitHardPoint() => ((Wheel)this).HasHitHardPoint();
|
|
|
|
/// <inheritdoc cref="Wheel.GetSuspensionLambda()"/>
|
|
public float GetSuspensionLambda() => ((Wheel)this).GetSuspensionLambda();
|
|
|
|
/// <inheritdoc cref="Wheel.GetLongitudinalLambda()"/>
|
|
public float GetLongitudinalLambda() => ((Wheel)this).GetLongitudinalLambda();
|
|
|
|
/// <inheritdoc cref="Wheel.GetLateralLambda()"/>
|
|
public float GetLateralLambda() => ((Wheel)this).GetLateralLambda();
|
|
|
|
/// <inheritdoc cref="Wheel.SolveLongitudinalConstraintPart(VehicleConstraint, float, float)"/>
|
|
public bool SolveLongitudinalConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) =>
|
|
((Wheel)this).SolveLongitudinalConstraintPart(constraint, minImpulse, maxImpulse);
|
|
|
|
/// <inheritdoc cref="Wheel.SolveLateralConstraintPart(VehicleConstraint, float, float)"/>
|
|
public bool SolveLateralConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) =>
|
|
((Wheel)this).SolveLateralConstraintPart(constraint, minImpulse, maxImpulse);
|
|
}
|
|
}
|