//
// 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
{
///
///
/// Base class for runtime data for a wheel, each VehicleController can implement a derived class of this
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:45
///
/// class Wheel : public NonCopyable
///
///
[InteropHandle]
public readonly partial struct Wheel
{
///
///
/// Get settings for the wheel
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:55
///
/// const WheelSettings * GetSettings() const
///
///
///
///
/// The returned handle carries its own reference; Dispose it once when you're done.
///
///
public WheelSettings GetSettings() => Jolt.PInvoke.Wheel_GetSettings(this);
///
///
/// Get the angular velocity (rad/s) for this wheel, note that positive means the wheel is rotating such
/// that the car moves forward
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:58
///
/// float GetAngularVelocity() const
///
///
public float GetAngularVelocity() => Jolt.PInvoke.Wheel_GetAngularVelocity(this);
///
///
/// Update the angular velocity (rad/s)
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:61
///
/// void SetAngularVelocity(float inVel)
///
///
public void SetAngularVelocity(float vel) => Jolt.PInvoke.Wheel_SetAngularVelocity(this, vel);
///
///
/// Get the current rotation angle of the wheel in radians [0, 2 pi]
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:64
///
/// float GetRotationAngle() const
///
///
public float GetRotationAngle() => Jolt.PInvoke.Wheel_GetRotationAngle(this);
///
///
/// Set the current rotation angle of the wheel in radians [0, 2 pi]
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:67
///
/// void SetRotationAngle(float inAngle)
///
///
public void SetRotationAngle(float angle) => Jolt.PInvoke.Wheel_SetRotationAngle(this, angle);
///
///
/// Get the current steer angle of the wheel in radians [-pi, pi], positive is to the left
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:70
///
/// float GetSteerAngle() const
///
///
public float GetSteerAngle() => Jolt.PInvoke.Wheel_GetSteerAngle(this);
///
///
/// Set the current steer angle of the wheel in radians [-pi, pi]
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:73
///
/// void SetSteerAngle(float inAngle)
///
///
public void SetSteerAngle(float angle) => Jolt.PInvoke.Wheel_SetSteerAngle(this, angle);
///
///
/// Returns true if the wheel is touching an object
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:76
///
/// inline bool HasContact() const
///
///
public bool HasContact() => Jolt.PInvoke.Wheel_HasContact(this);
///
///
/// Returns the body ID of the body that this wheel is touching
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:79
///
/// BodyID GetContactBodyID() const
///
///
public uint GetContactBodyID() => Jolt.PInvoke.Wheel_GetContactBodyID(this);
///
///
/// Returns the sub shape ID where we're contacting the body
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:82
///
/// SubShapeID GetContactSubShapeID() const
///
///
public uint GetContactSubShapeID() => Jolt.PInvoke.Wheel_GetContactSubShapeID(this);
///
///
/// Returns the current contact position in world space (note by the time you call this the vehicle has
/// moved)
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:85
///
/// RVec3 GetContactPosition() const
///
///
public float3 GetContactPosition() => Jolt.PInvoke.Wheel_GetContactPosition(this);
///
///
/// Velocity of the contact point (m / s, not relative to the wheel but in world space)
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:88
///
/// Vec3 GetContactPointVelocity() const
///
///
public float3 GetContactPointVelocity() => Jolt.PInvoke.Wheel_GetContactPointVelocity(this);
///
///
/// Returns the current contact normal in world space (note by the time you call this the vehicle has moved)
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:91
///
/// Vec3 GetContactNormal() const
///
///
public float3 GetContactNormal() => Jolt.PInvoke.Wheel_GetContactNormal(this);
///
///
/// Returns longitudinal direction (direction along the wheel relative to floor) in world space (note by the
/// time you call this the vehicle has moved)
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:94
///
/// Vec3 GetContactLongitudinal() const
///
///
public float3 GetContactLongitudinal() => Jolt.PInvoke.Wheel_GetContactLongitudinal(this);
///
///
/// Returns lateral direction (sideways direction) in world space (note by the time you call this the
/// vehicle has moved)
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:97
///
/// Vec3 GetContactLateral() const
///
///
public float3 GetContactLateral() => Jolt.PInvoke.Wheel_GetContactLateral(this);
///
///
/// Get the length of the suspension for a wheel (m) relative to the suspension attachment point (hard
/// point)
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:100
///
/// float GetSuspensionLength() const
///
///
public float GetSuspensionLength() => Jolt.PInvoke.Wheel_GetSuspensionLength(this);
///
///
/// Check if the suspension hit its upper limit
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:103
///
/// bool HasHitHardPoint() const
///
///
public bool HasHitHardPoint() => Jolt.PInvoke.Wheel_HasHitHardPoint(this);
///
///
/// Get the total impulse (N s) that was applied by the suspension
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:106
///
/// float GetSuspensionLambda() const
///
///
public float GetSuspensionLambda() => Jolt.PInvoke.Wheel_GetSuspensionLambda(this);
///
///
/// Get total impulse (N s) applied along the forward direction of the wheel
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:109
///
/// float GetLongitudinalLambda() const
///
///
public float GetLongitudinalLambda() => Jolt.PInvoke.Wheel_GetLongitudinalLambda(this);
///
///
/// Get total impulse (N s) applied along the sideways direction of the wheel
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:112
///
/// float GetLateralLambda() const
///
///
public float GetLateralLambda() => Jolt.PInvoke.Wheel_GetLateralLambda(this);
///
///
/// Internal function that should only be called by the controller. Used to apply impulses in the forward
/// direction of the vehicle.
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:115
///
/// bool SolveLongitudinalConstraintPart(const VehicleConstraint &inConstraint, float inMinImpulse, float inMaxImpulse)
///
///
public bool SolveLongitudinalConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) =>
Jolt.PInvoke.Wheel_SolveLongitudinalConstraintPart(this, constraint, minImpulse, maxImpulse);
///
///
/// Internal function that should only be called by the controller. Used to apply impulses in the sideways
/// direction of the vehicle.
///
///
/// C++:
/// Jolt/Physics/Vehicle/Wheel.h:118
///
/// bool SolveLateralConstraintPart(const VehicleConstraint &inConstraint, float inMinImpulse, float inMaxImpulse)
///
///
public bool SolveLateralConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) =>
Jolt.PInvoke.Wheel_SolveLateralConstraintPart(this, constraint, minImpulse, maxImpulse);
}
}