mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
490 lines
28 KiB
C#
490 lines
28 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
using Brutal.Interop;
|
|
using Brutal.Numerics;
|
|
namespace Brutal.JoltApi
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L65">Jolt/Physics/Vehicle/VehicleConstraint.h:65</see>
|
|
/// <br/>
|
|
/// <c>class VehicleConstraint : public Constraint, public PhysicsStepListener</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Constraint that simulates a vehicle
|
|
/// Note: Don't forget to register the constraint as a StepListener with the PhysicsSystem!
|
|
///
|
|
/// When the vehicle drives over very light objects (rubble) you may see the car body dip down. This is a known issue and is an artifact of the iterative solver that Jolt is using.
|
|
/// Basically if a light object is sandwiched between two heavy objects (the static floor and the car body), the light object is not able to transfer enough force from the ground to
|
|
/// the car body to keep the car body up. You can see this effect in the HeavyOnLightTest sample, the boxes on the right have a lot of penetration because they're on top of light objects.
|
|
///
|
|
/// There are a couple of ways to improve this:
|
|
///
|
|
/// 1. You can increase the number of velocity steps (global settings PhysicsSettings::mNumVelocitySteps or if you only want to increase it on
|
|
/// the vehicle you can use VehicleConstraintSettings::mNumVelocityStepsOverride). E.g. going from 10 to 30 steps in the HeavyOnLightTest sample makes the penetration a lot less.
|
|
/// The number of position steps can also be increased (the first prevents the body from going down, the second corrects it if the problem did
|
|
/// occur which inevitably happens due to numerical drift). This solution costs CPU cycles.
|
|
///
|
|
/// 2. You can reduce the mass difference between the vehicle body and the rubble on the floor (by making the rubble heavier or the car lighter).
|
|
///
|
|
/// 3. You could filter out collisions between the vehicle collision test and the rubble completely. This would make the wheels ignore the rubble but would cause the vehicle to drive
|
|
/// through it as if nothing happened. You could create fake wheels (keyframed bodies) that move along with the vehicle and that only collide with rubble (and not the vehicle or the ground).
|
|
/// This would cause the vehicle to push away the rubble without the rubble being able to affect the vehicle (unless it hits the main body of course).
|
|
///
|
|
/// Note that when driving over rubble, you may see the wheel jump up and down quite quickly because one frame a collision is found and the next frame not.
|
|
/// To alleviate this, it may be needed to smooth the motion of the visual mesh for the wheel.
|
|
/// </code>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct VehicleConstraint : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L69">Jolt/Physics/Vehicle/VehicleConstraint.h:69</see>
|
|
/// <br/>
|
|
/// <c>VehicleConstraint(Body &inVehicleBody, const VehicleConstraintSettings &inSettings)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Constructor / destructor
|
|
/// </para>
|
|
/// </remarks>
|
|
public static VehicleConstraint Create(Body vehicleBody, VehicleConstraintSettings settings) => Jolt.PInvoke.VehicleConstraint_Create(vehicleBody, settings);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L73">Jolt/Physics/Vehicle/VehicleConstraint.h:73</see>
|
|
/// <br/>
|
|
/// <c>virtual EConstraintSubType GetSubType() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the type of a constraint
|
|
/// </para>
|
|
/// </remarks>
|
|
public EConstraintSubType GetSubType() => Jolt.PInvoke.VehicleConstraint_GetSubType(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L76">Jolt/Physics/Vehicle/VehicleConstraint.h:76</see>
|
|
/// <br/>
|
|
/// <c>void SetMaxPitchRollAngle(float inMaxPitchRollAngle)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetMaxPitchRollAngle(float maxPitchRollAngle) => Jolt.PInvoke.VehicleConstraint_SetMaxPitchRollAngle(this, maxPitchRollAngle);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L77">Jolt/Physics/Vehicle/VehicleConstraint.h:77</see>
|
|
/// <br/>
|
|
/// <c>float GetMaxPitchRollAngle() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMaxPitchRollAngle() => Jolt.PInvoke.VehicleConstraint_GetMaxPitchRollAngle(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L80">Jolt/Physics/Vehicle/VehicleConstraint.h:80</see>
|
|
/// <br/>
|
|
/// <c>void SetVehicleCollisionTester(const VehicleCollisionTester *inTester)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Set the interface that tests collision between wheel and ground
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetVehicleCollisionTester(VehicleCollisionTester tester) => Jolt.PInvoke.VehicleConstraint_SetVehicleCollisionTester(this, tester);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L81">Jolt/Physics/Vehicle/VehicleConstraint.h:81</see>
|
|
/// <br/>
|
|
/// <c>const VehicleCollisionTester *GetVehicleCollisionTester() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public VehicleCollisionTester GetVehicleCollisionTester() => Jolt.PInvoke.VehicleConstraint_GetVehicleCollisionTester(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L114">Jolt/Physics/Vehicle/VehicleConstraint.h:114</see>
|
|
/// <br/>
|
|
/// <c>void OverrideGravity(Vec3Arg inGravity)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Override gravity for this vehicle. Note that overriding gravity will set the gravity factor of the
|
|
/// vehicle body to 0 and apply gravity in the PhysicsStepListener instead.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void OverrideGravity(float3 gravity) => Jolt.PInvoke.VehicleConstraint_OverrideGravity(this, gravity);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L115">Jolt/Physics/Vehicle/VehicleConstraint.h:115</see>
|
|
/// <br/>
|
|
/// <c>bool IsGravityOverridden() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsGravityOverridden() => Jolt.PInvoke.VehicleConstraint_IsGravityOverridden(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L116">Jolt/Physics/Vehicle/VehicleConstraint.h:116</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetGravityOverride() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetGravityOverride() => Jolt.PInvoke.VehicleConstraint_GetGravityOverride(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// Note that resetting the gravity override will restore the gravity factor of the vehicle body to 1.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L117">Jolt/Physics/Vehicle/VehicleConstraint.h:117</see>
|
|
/// <br/>
|
|
/// <c>void ResetGravityOverride()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void ResetGravityOverride() => Jolt.PInvoke.VehicleConstraint_ResetGravityOverride(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L120">Jolt/Physics/Vehicle/VehicleConstraint.h:120</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetLocalForward() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the local space forward vector of the vehicle
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetLocalForward() => Jolt.PInvoke.VehicleConstraint_GetLocalForward(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L123">Jolt/Physics/Vehicle/VehicleConstraint.h:123</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetLocalUp() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the local space up vector of the vehicle
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetLocalUp() => Jolt.PInvoke.VehicleConstraint_GetLocalUp(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L126">Jolt/Physics/Vehicle/VehicleConstraint.h:126</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetWorldUp() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Vector indicating the world space up direction (used to limit vehicle pitch/roll), calculated every
|
|
/// frame by inverting gravity
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetWorldUp() => Jolt.PInvoke.VehicleConstraint_GetWorldUp(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L129">Jolt/Physics/Vehicle/VehicleConstraint.h:129</see>
|
|
/// <br/>
|
|
/// <c>Body * GetVehicleBody() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Access to the vehicle body
|
|
/// </para>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public Body GetVehicleBody() => Jolt.PInvoke.VehicleConstraint_GetVehicleBody(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L132">Jolt/Physics/Vehicle/VehicleConstraint.h:132</see>
|
|
/// <br/>
|
|
/// <c>const VehicleController * GetController() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Access to the vehicle controller interface (determines acceleration / deceleration)
|
|
/// </para>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public VehicleController GetController() => Jolt.PInvoke.VehicleConstraint_GetController(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L144">Jolt/Physics/Vehicle/VehicleConstraint.h:144</see>
|
|
/// <br/>
|
|
/// <c>Wheel * GetWheel(uint inIdx)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the state of a wheel
|
|
/// </para>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public Wheel GetWheel(uint idx) => Jolt.PInvoke.VehicleConstraint_GetWheel(this, idx);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L152">Jolt/Physics/Vehicle/VehicleConstraint.h:152</see>
|
|
/// <br/>
|
|
/// <c>void GetWheelLocalBasis(const Wheel *inWheel, Vec3 &outForward, Vec3 &outUp, Vec3 &outRight) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Get the basis vectors for the wheel in local space to the vehicle body (note: basis does not rotate when the wheel rotates around its axis)
|
|
/// @param inWheel Wheel to fetch basis for
|
|
/// @param outForward Forward vector for the wheel
|
|
/// @param outUp Up vector for the wheel
|
|
/// @param outRight Right vector for the wheel
|
|
/// </code>
|
|
/// </remarks>
|
|
public void GetWheelLocalBasis(Wheel wheel, out float3 forward, out float3 up, out float3 right) => Jolt.PInvoke.VehicleConstraint_GetWheelLocalBasis(this, wheel, out forward, out up, out right);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L158">Jolt/Physics/Vehicle/VehicleConstraint.h:158</see>
|
|
/// <br/>
|
|
/// <c>Mat44 GetWheelLocalTransform(uint inWheelIndex, Vec3Arg inWheelRight, Vec3Arg inWheelUp) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Get the transform of a wheel in local space to the vehicle body, returns a matrix that transforms a cylinder aligned with the Y axis in body space (not COM space)
|
|
/// @param inWheelIndex Index of the wheel to fetch
|
|
/// @param inWheelRight Unit vector that indicates right in model space of the wheel (so if you only have 1 wheel model, you probably want to specify the opposite direction for the left and right wheels)
|
|
/// @param inWheelUp Unit vector that indicates up in model space of the wheel
|
|
/// </code>
|
|
/// </remarks>
|
|
public float4x4 GetWheelLocalTransform(uint wheelIndex, float3 wheelRight, float3 wheelUp) => Jolt.PInvoke.VehicleConstraint_GetWheelLocalTransform(this, wheelIndex, wheelRight, wheelUp);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L164">Jolt/Physics/Vehicle/VehicleConstraint.h:164</see>
|
|
/// <br/>
|
|
/// <c>RMat44 GetWheelWorldTransform(uint inWheelIndex, Vec3Arg inWheelRight, Vec3Arg inWheelUp) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Get the transform of a wheel in world space, returns a matrix that transforms a cylinder aligned with the Y axis in world space
|
|
/// @param inWheelIndex Index of the wheel to fetch
|
|
/// @param inWheelRight Unit vector that indicates right in model space of the wheel (so if you only have 1 wheel model, you probably want to specify the opposite direction for the left and right wheels)
|
|
/// @param inWheelUp Unit vector that indicates up in model space of the wheel
|
|
/// </code>
|
|
/// </remarks>
|
|
public float4x4 GetWheelWorldTransform(uint wheelIndex, float3 wheelRight, float3 wheelUp) => Jolt.PInvoke.VehicleConstraint_GetWheelWorldTransform(this, wheelIndex, wheelRight, wheelUp);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L174">Jolt/Physics/Vehicle/VehicleConstraint.h:174</see>
|
|
/// <br/>
|
|
/// <c>void SetNumStepsBetweenCollisionTestActive(uint inSteps)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Number of simulation steps between wheel collision tests when the vehicle is active. Default is 1. 0 = never, 1 = every step, 2 = every other step, etc.
|
|
/// Note that if a vehicle has multiple wheels and the number of steps &gt; 1, the wheels will be tested in a round robin fashion.
|
|
/// If there are multiple vehicles, the tests will be spread out based on the BodyID of the vehicle.
|
|
/// If you set this to test less than every step, you may see simulation artifacts. This setting can be used to reduce the cost of simulating vehicles in the distance.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void SetNumStepsBetweenCollisionTestActive(uint steps) => Jolt.PInvoke.VehicleConstraint_SetNumStepsBetweenCollisionTestActive(this, steps);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L175">Jolt/Physics/Vehicle/VehicleConstraint.h:175</see>
|
|
/// <br/>
|
|
/// <c>uint GetNumStepsBetweenCollisionTestActive() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public uint GetNumStepsBetweenCollisionTestActive() => Jolt.PInvoke.VehicleConstraint_GetNumStepsBetweenCollisionTestActive(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L182">Jolt/Physics/Vehicle/VehicleConstraint.h:182</see>
|
|
/// <br/>
|
|
/// <c>void SetNumStepsBetweenCollisionTestInactive(uint inSteps)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Number of simulation steps between wheel collision tests when the vehicle is inactive. Default is 1. 0 = never, 1 = every step, 2 = every other step, etc.
|
|
/// Note that if a vehicle has multiple wheels and the number of steps &gt; 1, the wheels will be tested in a round robin fashion.
|
|
/// If there are multiple vehicles, the tests will be spread out based on the BodyID of the vehicle.
|
|
/// This number can be lower than the number of steps when the vehicle is active as the only purpose of this test is
|
|
/// to allow the vehicle to wake up in response to bodies moving into the wheels but not touching the body of the vehicle.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void SetNumStepsBetweenCollisionTestInactive(uint steps) => Jolt.PInvoke.VehicleConstraint_SetNumStepsBetweenCollisionTestInactive(this, steps);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L183">Jolt/Physics/Vehicle/VehicleConstraint.h:183</see>
|
|
/// <br/>
|
|
/// <c>uint GetNumStepsBetweenCollisionTestInactive() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public uint GetNumStepsBetweenCollisionTestInactive() => Jolt.PInvoke.VehicleConstraint_GetNumStepsBetweenCollisionTestInactive(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L186">Jolt/Physics/Vehicle/VehicleConstraint.h:186</see>
|
|
/// <br/>
|
|
/// <c>virtual bool IsActive() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Generic interface of a constraint
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool IsActive() => Jolt.PInvoke.VehicleConstraint_IsActive(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L187">Jolt/Physics/Vehicle/VehicleConstraint.h:187</see>
|
|
/// <br/>
|
|
/// <c>virtual void NotifyShapeChanged(const BodyID &inBodyID, Vec3Arg inDeltaCOM) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => Jolt.PInvoke.VehicleConstraint_NotifyShapeChanged(this, bodyID, deltaCOM);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L188">Jolt/Physics/Vehicle/VehicleConstraint.h:188</see>
|
|
/// <br/>
|
|
/// <c>virtual void SetupVelocityConstraint(float inDeltaTime) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetupVelocityConstraint(float deltaTime) => Jolt.PInvoke.VehicleConstraint_SetupVelocityConstraint(this, deltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L189">Jolt/Physics/Vehicle/VehicleConstraint.h:189</see>
|
|
/// <br/>
|
|
/// <c>virtual void ResetWarmStart() override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void ResetWarmStart() => Jolt.PInvoke.VehicleConstraint_ResetWarmStart(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L190">Jolt/Physics/Vehicle/VehicleConstraint.h:190</see>
|
|
/// <br/>
|
|
/// <c>virtual void WarmStartVelocityConstraint(float inWarmStartImpulseRatio) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => Jolt.PInvoke.VehicleConstraint_WarmStartVelocityConstraint(this, warmStartImpulseRatio);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L191">Jolt/Physics/Vehicle/VehicleConstraint.h:191</see>
|
|
/// <br/>
|
|
/// <c>virtual bool SolveVelocityConstraint(float inDeltaTime) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool SolveVelocityConstraint(float deltaTime) => Jolt.PInvoke.VehicleConstraint_SolveVelocityConstraint(this, deltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L192">Jolt/Physics/Vehicle/VehicleConstraint.h:192</see>
|
|
/// <br/>
|
|
/// <c>virtual bool SolvePositionConstraint(float inDeltaTime, float inBaumgarte) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool SolvePositionConstraint(float deltaTime, float baumgarte) => Jolt.PInvoke.VehicleConstraint_SolvePositionConstraint(this, deltaTime, baumgarte);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L193">Jolt/Physics/Vehicle/VehicleConstraint.h:193</see>
|
|
/// <br/>
|
|
/// <c>virtual void BuildIslands(uint32 inConstraintIndex, IslandBuilder &ioBuilder, BodyManager &inBodyManager) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => Jolt.PInvoke.VehicleConstraint_BuildIslands(this, constraintIndex, builder, bodyManager);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L194">Jolt/Physics/Vehicle/VehicleConstraint.h:194</see>
|
|
/// <br/>
|
|
/// <c>virtual uint BuildIslandSplits(LargeIslandSplitter &ioSplitter) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public uint BuildIslandSplits(LargeIslandSplitter splitter) => Jolt.PInvoke.VehicleConstraint_BuildIslandSplits(this, splitter);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L196">Jolt/Physics/Vehicle/VehicleConstraint.h:196</see>
|
|
/// <br/>
|
|
/// <c>virtual void DrawConstraint(DebugRenderer *inRenderer) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void DrawConstraint(DebugRenderer renderer) => Jolt.PInvoke.VehicleConstraint_DrawConstraint(this, renderer);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L197">Jolt/Physics/Vehicle/VehicleConstraint.h:197</see>
|
|
/// <br/>
|
|
/// <c>virtual void DrawConstraintLimits(DebugRenderer *inRenderer) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void DrawConstraintLimits(DebugRenderer renderer) => Jolt.PInvoke.VehicleConstraint_DrawConstraintLimits(this, renderer);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Vehicle/VehicleConstraint.h#L201">Jolt/Physics/Vehicle/VehicleConstraint.h:201</see>
|
|
/// <br/>
|
|
/// <c>virtual Ref<ConstraintSettings> GetConstraintSettings() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public ConstraintSettings GetConstraintSettings() => Jolt.PInvoke.VehicleConstraint_GetConstraintSettings(this);
|
|
public void AddRef() => Jolt.PInvoke.VehicleConstraint_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.VehicleConstraint_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.VehicleConstraint_GetRefCount(this);
|
|
public static implicit operator Constraint(VehicleConstraint value) => Jolt.PInvoke.VehicleConstraint_AsConstraint(value);
|
|
public static implicit operator PhysicsStepListener(VehicleConstraint value) => Jolt.PInvoke.VehicleConstraint_AsPhysicsStepListener(value);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|