// // 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 { /// /// /// Wheel object specifically for WheeledVehicleController /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:41 ///
/// class WheelWV : public Wheel ///
///
[InteropHandle] public readonly partial struct WheelWV : IDisposable { /// /// /// Constructor /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:47 ///
/// explicit WheelWV(const WheelSettingsWV &inWheel) ///
///
public static WheelWV Create(WheelSettingsWV wheel) => Jolt.PInvoke.WheelWV_Create(wheel); /// /// /// Override GetSettings and cast to the correct class /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:50 ///
/// const WheelSettingsWV * GetSettings() const ///
///
/// /// /// The returned handle carries its own reference; Dispose it once when you're done. /// /// public WheelSettingsWV GetSettings() => Jolt.PInvoke.WheelWV_GetSettings(this); /// /// /// Apply a torque (N m) to the wheel for a particular delta time /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:53 ///
/// void ApplyTorque(float inTorque, float inDeltaTime) ///
///
public void ApplyTorque(float torque, float deltaTime) => Jolt.PInvoke.WheelWV_ApplyTorque(this, torque, deltaTime); /// /// /// Update the wheel rotation based on the current angular velocity /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:59 ///
/// void Update(uint inWheelIndex, float inDeltaTime, const VehicleConstraint &inConstraint) ///
///
public void Update(uint wheelIndex, float deltaTime, VehicleConstraint constraint) { Jolt.PInvoke.WheelWV_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." ); } /// /// /// Velocity difference between ground and wheel relative to ground velocity /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:61 ///
/// float mLongitudinalSlip = 0.0f ///
///
public float GetLongitudinalSlip() => Jolt.PInvoke.WheelWV_GetLongitudinalSlip(this); /// /// /// Velocity difference between ground and wheel relative to ground velocity /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:61 ///
/// float mLongitudinalSlip = 0.0f ///
///
public void SetLongitudinalSlip(float value) => Jolt.PInvoke.WheelWV_SetLongitudinalSlip(this, value); /// /// /// Angular difference (in radians) between ground and wheel relative to ground velocity /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:62 ///
/// float mLateralSlip = 0.0f ///
///
public float GetLateralSlip() => Jolt.PInvoke.WheelWV_GetLateralSlip(this); /// /// /// Angular difference (in radians) between ground and wheel relative to ground velocity /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:62 ///
/// float mLateralSlip = 0.0f ///
///
public void SetLateralSlip(float value) => Jolt.PInvoke.WheelWV_SetLateralSlip(this, value); /// /// /// Combined friction coefficient in longitudinal direction (combines terrain and tires) /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:63 ///
/// float mCombinedLongitudinalFriction = 0.0f ///
///
public float GetCombinedLongitudinalFriction() => Jolt.PInvoke.WheelWV_GetCombinedLongitudinalFriction(this); /// /// /// Combined friction coefficient in longitudinal direction (combines terrain and tires) /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:63 ///
/// float mCombinedLongitudinalFriction = 0.0f ///
///
public void SetCombinedLongitudinalFriction(float value) => Jolt.PInvoke.WheelWV_SetCombinedLongitudinalFriction(this, value); /// /// /// Combined friction coefficient in lateral direction (combines terrain and tires) /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:64 ///
/// float mCombinedLateralFriction = 0.0f ///
///
public float GetCombinedLateralFriction() => Jolt.PInvoke.WheelWV_GetCombinedLateralFriction(this); /// /// /// Combined friction coefficient in lateral direction (combines terrain and tires) /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:64 ///
/// float mCombinedLateralFriction = 0.0f ///
///
public void SetCombinedLateralFriction(float value) => Jolt.PInvoke.WheelWV_SetCombinedLateralFriction(this, value); /// /// /// Amount of impulse that the brakes can apply to the floor (excluding friction) /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:65 ///
/// float mBrakeImpulse = 0.0f ///
///
public float GetBrakeImpulse() => Jolt.PInvoke.WheelWV_GetBrakeImpulse(this); /// /// /// Amount of impulse that the brakes can apply to the floor (excluding friction) /// /// /// C++: /// Jolt/Physics/Vehicle/WheeledVehicleController.h:65 ///
/// float mBrakeImpulse = 0.0f ///
///
public void SetBrakeImpulse(float value) => Jolt.PInvoke.WheelWV_SetBrakeImpulse(this, value); public static implicit operator Wheel(WheelWV value) => Unsafe.BitCast(value); public void Dispose() => Jolt.PInvoke.WheelWV_Destroy(this); /// public float GetAngularVelocity() => ((Wheel)this).GetAngularVelocity(); /// public void SetAngularVelocity(float vel) => ((Wheel)this).SetAngularVelocity(vel); /// public float GetRotationAngle() => ((Wheel)this).GetRotationAngle(); /// public void SetRotationAngle(float angle) => ((Wheel)this).SetRotationAngle(angle); /// public float GetSteerAngle() => ((Wheel)this).GetSteerAngle(); /// public void SetSteerAngle(float angle) => ((Wheel)this).SetSteerAngle(angle); /// public bool HasContact() => ((Wheel)this).HasContact(); /// public uint GetContactBodyID() => ((Wheel)this).GetContactBodyID(); /// public uint GetContactSubShapeID() => ((Wheel)this).GetContactSubShapeID(); /// public float3 GetContactPosition() => ((Wheel)this).GetContactPosition(); /// public float3 GetContactPointVelocity() => ((Wheel)this).GetContactPointVelocity(); /// public float3 GetContactNormal() => ((Wheel)this).GetContactNormal(); /// public float3 GetContactLongitudinal() => ((Wheel)this).GetContactLongitudinal(); /// public float3 GetContactLateral() => ((Wheel)this).GetContactLateral(); /// public float GetSuspensionLength() => ((Wheel)this).GetSuspensionLength(); /// public bool HasHitHardPoint() => ((Wheel)this).HasHitHardPoint(); /// public float GetSuspensionLambda() => ((Wheel)this).GetSuspensionLambda(); /// public float GetLongitudinalLambda() => ((Wheel)this).GetLongitudinalLambda(); /// public float GetLateralLambda() => ((Wheel)this).GetLateralLambda(); /// public bool SolveLongitudinalConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) => ((Wheel)this).SolveLongitudinalConstraintPart(constraint, minImpulse, maxImpulse); /// public bool SolveLateralConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) => ((Wheel)this).SolveLateralConstraintPart(constraint, minImpulse, maxImpulse); } }