//
// 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/MotorcycleController.h:44
///
/// class MotorcycleController : public WheeledVehicleController
///
///
///
///
/// Runtime controller class
///
///
[InteropHandle]
public readonly partial struct MotorcycleController : IDisposable
{
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:50
///
/// MotorcycleController(const MotorcycleControllerSettings &inSettings, VehicleConstraint &inConstraint)
///
///
///
///
/// Constructor
///
///
public static MotorcycleController Create(MotorcycleControllerSettings settings, VehicleConstraint constraint) => Jolt.PInvoke.MotorcycleController_Create(settings, constraint);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:53
///
/// float GetWheelBase() const
///
///
///
///
/// Get the distance between the front and back wheels
///
///
public float GetWheelBase() => Jolt.PInvoke.MotorcycleController_GetWheelBase(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:56
///
/// void EnableLeanController(bool inEnable)
///
///
///
///
/// Enable or disable the lean spring. This allows you to temporarily disable the lean spring to allow the
/// motorcycle to fall over.
///
///
public void EnableLeanController(bool enable) => Jolt.PInvoke.MotorcycleController_EnableLeanController(this, enable);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:59
///
/// bool IsLeanControllerEnabled() const
///
///
///
///
/// Check if the lean spring is enabled.
///
///
public bool IsLeanControllerEnabled() => Jolt.PInvoke.MotorcycleController_IsLeanControllerEnabled(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:62
///
/// void EnableLeanSteeringLimit(bool inEnable)
///
///
///
///
/// Enable or disable the lean steering limit. When enabled (default) the steering angle is limited based on
/// the vehicle speed to prevent steering that would cause an inertial force that causes the motorcycle to
/// topple over.
///
///
public void EnableLeanSteeringLimit(bool enable) => Jolt.PInvoke.MotorcycleController_EnableLeanSteeringLimit(this, enable);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:63
///
/// bool IsLeanSteeringLimitEnabled() const
///
///
public bool IsLeanSteeringLimitEnabled() => Jolt.PInvoke.MotorcycleController_IsLeanSteeringLimitEnabled(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:66
///
/// void SetLeanSpringConstant(float inConstant)
///
///
///
///
/// Spring constant for the lean spring
///
///
public void SetLeanSpringConstant(float constant) => Jolt.PInvoke.MotorcycleController_SetLeanSpringConstant(this, constant);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:67
///
/// float GetLeanSpringConstant() const
///
///
public float GetLeanSpringConstant() => Jolt.PInvoke.MotorcycleController_GetLeanSpringConstant(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:70
///
/// void SetLeanSpringDamping(float inDamping)
///
///
///
///
/// Spring damping constant for the lean spring
///
///
public void SetLeanSpringDamping(float damping) => Jolt.PInvoke.MotorcycleController_SetLeanSpringDamping(this, damping);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:71
///
/// float GetLeanSpringDamping() const
///
///
public float GetLeanSpringDamping() => Jolt.PInvoke.MotorcycleController_GetLeanSpringDamping(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:74
///
/// void SetLeanSpringIntegrationCoefficient(float inCoefficient)
///
///
///
///
/// The lean spring applies an additional force equal to this coefficient * Integral(delta angle, 0, t),
/// this effectively makes the lean spring a PID controller
///
///
public void SetLeanSpringIntegrationCoefficient(float coefficient) => Jolt.PInvoke.MotorcycleController_SetLeanSpringIntegrationCoefficient(this, coefficient);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:75
///
/// float GetLeanSpringIntegrationCoefficient() const
///
///
public float GetLeanSpringIntegrationCoefficient() => Jolt.PInvoke.MotorcycleController_GetLeanSpringIntegrationCoefficient(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:78
///
/// void SetLeanSpringIntegrationCoefficientDecay(float inDecay)
///
///
///
///
/// How much to decay the angle integral when the wheels are not touching the floor: new_value = e^(-decay *
/// t) * initial_value
///
///
public void SetLeanSpringIntegrationCoefficientDecay(float decay) => Jolt.PInvoke.MotorcycleController_SetLeanSpringIntegrationCoefficientDecay(this, decay);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:79
///
/// float GetLeanSpringIntegrationCoefficientDecay() const
///
///
public float GetLeanSpringIntegrationCoefficientDecay() => Jolt.PInvoke.MotorcycleController_GetLeanSpringIntegrationCoefficientDecay(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:83
///
/// void SetLeanSmoothingFactor(float inFactor)
///
///
///
///
/// How much to smooth the lean angle (0 = no smoothing, 1 = lean angle never changes)
/// Note that this is frame rate dependent because the formula is: smoothing_factor * previous + (1 - smoothing_factor) * current
///
///
public void SetLeanSmoothingFactor(float factor) => Jolt.PInvoke.MotorcycleController_SetLeanSmoothingFactor(this, factor);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:84
///
/// float GetLeanSmoothingFactor() const
///
///
public float GetLeanSmoothingFactor() => Jolt.PInvoke.MotorcycleController_GetLeanSmoothingFactor(this);
///
///
/// C++:
/// Jolt/Physics/Vehicle/MotorcycleController.h:87
///
/// virtual Ref<VehicleControllerSettings> GetSettings() const override
///
///
///
///
/// See: VehicleController
///
///
public VehicleControllerSettings GetSettings() => Jolt.PInvoke.MotorcycleController_GetSettings(this);
public static implicit operator WheeledVehicleController(MotorcycleController value) => Jolt.PInvoke.MotorcycleController_AsWheeledVehicleController(value);
public static implicit operator VehicleController(MotorcycleController value) => Jolt.PInvoke.MotorcycleController_AsVehicleController(value);
public void Dispose() => Jolt.PInvoke.MotorcycleController_Destroy(this);
}
}