Table of Contents

Interface ITwoBodyConstraintFunctions<TPrestepData, TAccumulatedImpulse>

Namespace
BepuPhysics.Constraints
Assembly
BepuPhysics.dll

Prestep, warm start and solve iteration functions for a two body constraint type.

public interface ITwoBodyConstraintFunctions<TPrestepData, TAccumulatedImpulse>

Type Parameters

TPrestepData

Type of the prestep data used by the constraint.

TAccumulatedImpulse

Type of the accumulated impulses used by the constraint.

Properties

RequiresIncrementalSubstepUpdates

Gets whether this constraint type requires incremental updates for each substep taken beyond the first.

public static abstract bool RequiresIncrementalSubstepUpdates { get; }

Property Value

bool

Methods

IncrementallyUpdateForSubstep(in Vector<float>, in BodyVelocityWide, in BodyVelocityWide, ref TPrestepData)

public static abstract void IncrementallyUpdateForSubstep(in Vector<float> dt, in BodyVelocityWide wsvA, in BodyVelocityWide wsvB, ref TPrestepData prestepData)

Parameters

dt Vector<float>
wsvA BodyVelocityWide
wsvB BodyVelocityWide
prestepData TPrestepData

Solve(in Vector3Wide, in QuaternionWide, in BodyInertiaWide, in Vector3Wide, in QuaternionWide, in BodyInertiaWide, float, float, ref TPrestepData, ref TAccumulatedImpulse, ref BodyVelocityWide, ref BodyVelocityWide)

public static abstract void Solve(in Vector3Wide positionA, in QuaternionWide orientationA, in BodyInertiaWide inertiaA, in Vector3Wide positionB, in QuaternionWide orientationB, in BodyInertiaWide inertiaB, float dt, float inverseDt, ref TPrestepData prestep, ref TAccumulatedImpulse accumulatedImpulses, ref BodyVelocityWide wsvA, ref BodyVelocityWide wsvB)

Parameters

positionA Vector3Wide
orientationA QuaternionWide
inertiaA BodyInertiaWide
positionB Vector3Wide
orientationB QuaternionWide
inertiaB BodyInertiaWide
dt float
inverseDt float
prestep TPrestepData
accumulatedImpulses TAccumulatedImpulse
wsvA BodyVelocityWide
wsvB BodyVelocityWide

WarmStart(in Vector3Wide, in QuaternionWide, in BodyInertiaWide, in Vector3Wide, in QuaternionWide, in BodyInertiaWide, ref TPrestepData, ref TAccumulatedImpulse, ref BodyVelocityWide, ref BodyVelocityWide)

public static abstract void WarmStart(in Vector3Wide positionA, in QuaternionWide orientationA, in BodyInertiaWide inertiaA, in Vector3Wide positionB, in QuaternionWide orientationB, in BodyInertiaWide inertiaB, ref TPrestepData prestep, ref TAccumulatedImpulse accumulatedImpulses, ref BodyVelocityWide wsvA, ref BodyVelocityWide wsvB)

Parameters

positionA Vector3Wide
orientationA QuaternionWide
inertiaA BodyInertiaWide
positionB Vector3Wide
orientationB QuaternionWide
inertiaB BodyInertiaWide
prestep TPrestepData
accumulatedImpulses TAccumulatedImpulse
wsvA BodyVelocityWide
wsvB BodyVelocityWide