Arbiter

class Arbiter : System.Object

An arbiter holds all contact information of two bodies. The contacts are stored in the ContactList. There is a maximum of four contacts which can be added to an arbiter. The arbiter only keeps the best four contacts based on the area spanned by the contact points.

Jitter.ResourcePool<Arbiter> Pool
readonly RigidBody Body1

The first body.

readonly RigidBody Body2

The second body.

readonly ContactList ContactList

The contact list containing all contacts of both bodies.

public void Invalidate()

Removes all contacts from this arbiter. The world will remove the arbiter automatically next frame or add new contacts.

public Contact AddContact(JVector point1, JVector point2, JVector normal, float penetration, ContactSettings contactSettings)

Adds a contact to the arbiter (threadsafe). No more than four contacts are stored in the contactList. When adding a new contact to the arbiter the existing are checked and the best are kept.

Parameters:
  • point1 (Jitter.LinearMath.JVector) – Point on body1. In world space.
  • point2 (Jitter.LinearMath.JVector) – Point on body2. In world space.
  • normal (Jitter.LinearMath.JVector) – The normal pointing to body2.
  • penetration (float) – The estimated penetration depth.
  • contactSettings (Jitter.Dynamics.ContactSettings) –
int MaxAxis(float x, float y, float z, float w)
Parameters:
  • x (float) –
  • y (float) –
  • z (float) –
  • w (float) –