Table of Contents

Class Arbiter

Namespace
Jitter2.Dynamics
Assembly
Jitter2.dll

Manages contact information between two different rigid bodies.

public sealed class Arbiter
Inheritance
Arbiter
Inherited Members

Remarks

Holds up to four contact points for a pair of shapes. CCD may create contacts before the shapes overlap. The arbiter is removed when contact ends or either body is removed.

For contacts created by the engine, the shape with the smaller ID is first.

The Handle property provides access to the underlying ContactData stored in unmanaged memory. This data is only valid while the arbiter exists and must not be accessed concurrently with Step(float, bool).

Removed arbiters are recycled by their owning world. Do not retain an arbiter after removal: the same instance may subsequently represent a different pair of bodies.

Properties

Body1

Gets the first rigid body involved in this contact.

public RigidBody Body1 { get; }

Property Value

RigidBody

Body2

Gets the second rigid body involved in this contact.

public RigidBody Body2 { get; }

Property Value

RigidBody

Handle

Gets the handle to the ContactData stored in unmanaged memory.

public JHandle<ContactData> Handle { get; }

Property Value

JHandle<ContactData>

Remarks

The underlying data is valid only while this arbiter is registered with the world. After removal, the arbiter object may be recycled for a different contact pair; do not retain or access the handle after the arbiter's collision lifetime ends.