Struct NonconvexReduction
- Namespace
- BepuPhysics.CollisionDetection
- Assembly
- BepuPhysics.dll
public struct NonconvexReduction : ICollisionTestContinuation
- Implements
- Inherited Members
Fields
ChildCount
public int ChildCount
Field Value
Children
public Buffer<NonconvexReductionChild> Children
Field Value
- Buffer<NonconvexReductionChild>
CompletedChildCount
public int CompletedChildCount
Field Value
Methods
Create(int, BufferPool)
Creates a collision test continuation with the given number of slots for subpairs.
public void Create(int childManifoldCount, BufferPool pool)
Parameters
childManifoldCount
intpool
BufferPoolPool to take resources from.
Flush<TCallbacks>(int, ref CollisionBatcher<TCallbacks>)
public void Flush<TCallbacks>(int pairId, ref CollisionBatcher<TCallbacks> batcher) where TCallbacks : struct, ICollisionCallbacks
Parameters
pairId
intbatcher
CollisionBatcher<TCallbacks>
Type Parameters
TCallbacks
OnChildCompleted<TCallbacks>(ref PairContinuation, ref ConvexContactManifold, ref CollisionBatcher<TCallbacks>)
Handles what to do next when the child pair has finished execution and the resulting manifold is available.
public void OnChildCompleted<TCallbacks>(ref PairContinuation report, ref ConvexContactManifold manifold, ref CollisionBatcher<TCallbacks> batcher) where TCallbacks : struct, ICollisionCallbacks
Parameters
report
PairContinuationContinuation instance being considered.
manifold
ConvexContactManifoldContact manifold for the child pair.
batcher
CollisionBatcher<TCallbacks>Collision batcher processing the pair.
Type Parameters
TCallbacks
Type of the callbacks used in the batcher.
OnUntestedChildCompleted<TCallbacks>(ref PairContinuation, ref CollisionBatcher<TCallbacks>)
Handles what to do next when the child pair was rejected for testing, and no manifold exists.
public void OnUntestedChildCompleted<TCallbacks>(ref PairContinuation report, ref CollisionBatcher<TCallbacks> batcher) where TCallbacks : struct, ICollisionCallbacks
Parameters
report
PairContinuationContinuation instance being considered.
batcher
CollisionBatcher<TCallbacks>Collision batcher processing the pair.
Type Parameters
TCallbacks
Type of the callbacks used in the batcher.
TryFlush<TCallbacks>(int, ref CollisionBatcher<TCallbacks>)
Checks if the parent pair is complete and should be flushed.
public bool TryFlush<TCallbacks>(int pairId, ref CollisionBatcher<TCallbacks> batcher) where TCallbacks : struct, ICollisionCallbacks
Parameters
pairId
intId of the pair to attempt to flush.
batcher
CollisionBatcher<TCallbacks>Collision batcher processing the pair.
Returns
- bool
True if the pair was done and got flushed, false otherwise.
Type Parameters
TCallbacks
Type of the callbacks used in the batcher.