Table of Contents

Struct NarrowPhase<TCallbacks>.CollisionCallbacks

Namespace
BepuPhysics.CollisionDetection
Assembly
BepuPhysics.dll
public struct NarrowPhase<TCallbacks>.CollisionCallbacks : ICollisionCallbacks
Implements
Inherited Members

Constructors

CollisionCallbacks(int, BufferPool, NarrowPhase<TCallbacks>)

public CollisionCallbacks(int workerIndex, BufferPool pool, NarrowPhase<TCallbacks> narrowPhase)

Parameters

workerIndex int
pool BufferPool
narrowPhase NarrowPhase<TCallbacks>

Methods

AddContinuous(ref CollidablePair, Vector3, Vector3, Vector3, float)

public CCDContinuationIndex AddContinuous(ref CollidablePair pair, Vector3 relativeLinearVelocity, Vector3 angularVelocityA, Vector3 angularVelocityB, float t)

Parameters

pair CollidablePair
relativeLinearVelocity Vector3
angularVelocityA Vector3
angularVelocityB Vector3
t float

Returns

CCDContinuationIndex

AddDiscrete(ref CollidablePair)

public CCDContinuationIndex AddDiscrete(ref CollidablePair pair)

Parameters

pair CollidablePair

Returns

CCDContinuationIndex

AllowCollisionTesting(int, int, int)

Checks whether further collision testing should be performed for a given subtask.

public bool AllowCollisionTesting(int pairId, int childA, int childB)

Parameters

pairId int

Id of the parent pair.

childA int

Index of the child belonging to collidable A in the subpair under consideration.

childB int

Index of the child belonging to collidable B in the subpair under consideration.

Returns

bool

True if testing should proceed, false otherwise.

OnChildPairCompleted(int, int, int, ref ConvexContactManifold)

Provides control over subtask generated results before they are reported to the parent task.

public void OnChildPairCompleted(int pairId, int childA, int childB, ref ConvexContactManifold manifold)

Parameters

pairId int

Id of the parent pair that spawned this child pair.

childA int

Index of the child belonging to collidable A in the subpair under consideration.

childB int

Index of the child belonging to collidable B in the subpair under consideration.

manifold ConvexContactManifold

Manifold of the child pair to configure.

OnPairCompleted<TManifold>(int, ref TManifold)

Called when a pair submitted to a collision batcher has finished collision detection.

public void OnPairCompleted<TManifold>(int pairId, ref TManifold manifoldReference) where TManifold : unmanaged, IContactManifold<TManifold>

Parameters

pairId int

Id of the pair that completed.

manifoldReference TManifold

Type Parameters

TManifold

Type of the contact manifold generated by collision detection.