C# Class Jitter.Dynamics.Arbiter

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.
Datei anzeigen Open project: tpb3d/TPB3D Class Usage Examples

Public Properties

Property Type Description
Pool ResourcePool

Public Methods

Method Description
AddContact ( Jitter.LinearMath.JVector point1, Jitter.LinearMath.JVector point2, Jitter.LinearMath.JVector normal, float penetration, ContactSettings contactSettings ) : Contact

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.

Arbiter ( ) : System

Initializes a new instance of the Arbiter class.

Arbiter ( RigidBody body1, RigidBody body2 ) : System

Private Methods

Method Description
GetCacheEntry ( Jitter.LinearMath.JVector &realRelPos1, float contactBreakThreshold ) : int
MaxAxis ( float x, float y, float z, float w ) : int
ReplaceContact ( Jitter.LinearMath.JVector &point1, Jitter.LinearMath.JVector &point2, Jitter.LinearMath.JVector &n, float p, int index, ContactSettings contactSettings ) : void
SortCachedPoints ( Jitter.LinearMath.JVector &realRelPos1, float pen ) : int

Method Details

AddContact() public method

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.
public AddContact ( Jitter.LinearMath.JVector point1, Jitter.LinearMath.JVector point2, Jitter.LinearMath.JVector normal, float penetration, ContactSettings contactSettings ) : Contact
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 ContactSettings
return Contact

Arbiter() public method

Initializes a new instance of the Arbiter class.
public Arbiter ( ) : System
return System

Arbiter() public method

public Arbiter ( RigidBody body1, RigidBody body2 ) : System
body1 RigidBody
body2 RigidBody
return System

Property Details

Pool public_oe static_oe property

public static ResourcePool Pool
return ResourcePool