Struct CompoundMeshReduction
- Namespace
- BepuPhysics.CollisionDetection
- Assembly
- BepuPhysics.dll
public struct CompoundMeshReduction : ICollisionTestContinuation
- Implements
- Inherited Members
Fields
ChildManifoldRegions
public Buffer<(int Start, int Count)> ChildManifoldRegions
Field Value
Inner
public NonconvexReduction Inner
Field Value
Mesh
public Mesh* Mesh
Field Value
- Mesh*
MeshOrientation
public Quaternion MeshOrientation
Field Value
QueryBounds
public Buffer<BoundingBox> QueryBounds
Field Value
- Buffer<BoundingBox>
RegionCount
public int RegionCount
Field Value
RequiresFlip
public bool RequiresFlip
Field Value
Triangles
public Buffer<Triangle> Triangles
Field Value
- Buffer<Triangle>
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.
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.