Table of Contents

Struct ConstraintData

Namespace
Jitter2.Dynamics.Constraints
Assembly
Jitter2.dll

Low-level data for constraints, stored in unmanaged memory.

public struct ConstraintData
Inherited Members

Remarks

This structure is stored in unmanaged memory and accessed via Handle. It contains a solver dispatch id, a stable constraint identifier, and handles to the connected bodies.

The data is valid only while the constraint is registered with the world. Do not cache references across simulation steps. Not safe to access concurrently with Step(float, bool).

Fields

Body1

Handle to the first body's simulation data.

public JHandle<RigidBodyData> Body1

Field Value

JHandle<RigidBodyData>

Body2

Handle to the second body's simulation data.

public JHandle<RigidBodyData> Body2

Field Value

JHandle<RigidBodyData>

ConstraintId

Stable creation-order identifier used for deterministic sorting.

public ulong ConstraintId

Field Value

ulong

DispatchId

Identifier of the registered solver dispatch pair for this constraint.

public uint DispatchId

Field Value

uint

Properties

IsEnabled

Gets whether this constraint is enabled.

public readonly bool IsEnabled { get; }

Property Value

bool

Methods

Iterate(ref ConstraintData, float)

public readonly void Iterate(ref ConstraintData constraint, float idt)

Parameters

constraint ConstraintData
idt float

PrepareForIteration(ref ConstraintData, float)

public readonly void PrepareForIteration(ref ConstraintData constraint, float idt)

Parameters

constraint ConstraintData
idt float