Table of Contents

Class Joint2D

Namespace
Gravitas.Constraints
Assembly
Gravitas.dll

Context-owned deterministic pure 2D joint runtime state.

public sealed class Joint2D : IRecordable
Inheritance
Joint2D
Implements
IRecordable
Inherited Members

Properties

AccumulatedImpulseMagnitude

Gets the cumulative absolute incremental impulse emitted since the solver cache was last cleared.

public Fixed64 AccumulatedImpulseMagnitude { get; }

Property Value

Fixed64

BodyA

Gets the first body linked by the joint.

public SolidBody2D BodyA { get; }

Property Value

SolidBody2D

BodyB

Gets the second body linked by the joint.

public SolidBody2D BodyB { get; }

Property Value

SolidBody2D

CollisionPolicy

Gets physical collision filtering behavior for the linked colliders.

public JointCollisionPolicy CollisionPolicy { get; }

Property Value

JointCollisionPolicy

Context

Gets the owning world context.

public GravitasWorldContext Context { get; }

Property Value

GravitasWorldContext

Id

Gets this context-local joint ID.

public int Id { get; }

Property Value

int

IsActive

Gets whether this joint is registered with its owning service.

public bool IsActive { get; }

Property Value

bool

IsEnabled

Gets or sets whether this active joint emits solver rows.

public bool IsEnabled { get; set; }

Property Value

bool

LastSolveMetrics

Gets deterministic metrics from the most recent solver pass.

public JointSolveMetrics2D LastSolveMetrics { get; }

Property Value

JointSolveMetrics2D

LastSolvedRowCount

Gets the number of rows emitted by the most recent solver pass.

public int LastSolvedRowCount { get; }

Property Value

int

Limits

Gets optional scalar limit data.

public JointLimit2D Limits { get; }

Property Value

JointLimit2D

LocalFrameA

Gets the first local anchor frame.

public JointFrame2D LocalFrameA { get; }

Property Value

JointFrame2D

LocalFrameB

Gets the second local anchor frame.

public JointFrame2D LocalFrameB { get; }

Property Value

JointFrame2D

Motor

Gets optional scalar motor data.

public JointMotor2D Motor { get; }

Property Value

JointMotor2D

Type

Gets the joint type.

public JointType2D Type { get; }

Property Value

JointType2D

Methods

ClearMotor()

Disables the joint motor and wakes linked bodies.

public void ClearMotor()

RecordData(IChronicler)

Records mutable joint state into a Chronicler pass.

public void RecordData(IChronicler chronicler)

Parameters

chronicler IChronicler

SetMotor(JointMotor2D)

Replaces the motor payload and wakes linked bodies.

public void SetMotor(JointMotor2D motor)

Parameters

motor JointMotor2D