Table of Contents

Class FixedAngle

Namespace
Jitter2.Dynamics.Constraints
Assembly
Jitter2.dll

Constrains the relative orientation between two bodies, eliminating three degrees of rotational freedom.

public class FixedAngle : Constraint<FixedAngle.FixedAngleData>, IDebugDrawable
Inheritance
FixedAngle
Implements
Inherited Members

Properties

Bias

Gets or sets the bias factor controlling how aggressively angular error is corrected.

public float Bias { get; set; }

Property Value

float

Default is 0.2. Range [0, 1]. Higher values correct errors faster but may cause instability.

Impulse

Gets the accumulated impulse applied by this constraint during the last step.

public JVector Impulse { get; }

Property Value

JVector

Softness

Gets or sets the softness (compliance) of the constraint.

public float Softness { get; set; }

Property Value

float

Default is 0.001. Higher values allow more angular error but improve stability.

Methods

Create()

Sets the Iterate and PrepareForIteration function pointer fields on this instance. Override this in derived classes to assign the correct solver methods. The pointers are later written into ConstraintData when the constraint is enabled.

protected override void Create()

DebugDraw(IDebugDrawer)

Draws a debug visualization of this constraint.

public override void DebugDraw(IDebugDrawer drawer)

Parameters

drawer IDebugDrawer

The debug drawer to receive visualization primitives.

Exceptions

NotImplementedException

Thrown if the derived class does not override this method.

Initialize()

Initializes the constraint using the current relative orientation of the bodies.

public void Initialize()

Remarks

Records the current relative orientation as the target. Default values: Softness = DefaultAngularSoftness, Bias = DefaultAngularBias.

IterateFixedAngle(ref ConstraintData, float)

public static void IterateFixedAngle(ref ConstraintData constraint, float idt)

Parameters

constraint ConstraintData
idt float

PrepareForIterationFixedAngle(ref ConstraintData, float)

public static void PrepareForIterationFixedAngle(ref ConstraintData constraint, float idt)

Parameters

constraint ConstraintData
idt float