Struct CollisionBatcher<TCallbacks>
- Namespace
- BepuPhysics.CollisionDetection
- Assembly
- BepuPhysics.dll
public struct CollisionBatcher<TCallbacks> where TCallbacks : struct, ICollisionCallbacks
Type Parameters
TCallbacks
- Inherited Members
Constructors
CollisionBatcher(BufferPool, Shapes, CollisionTaskRegistry, float, TCallbacks)
public CollisionBatcher(BufferPool pool, Shapes shapes, CollisionTaskRegistry collisionTypeMatrix, float dt, TCallbacks callbacks)
Parameters
poolBufferPoolshapesShapescollisionTypeMatrixCollisionTaskRegistrydtfloatcallbacksTCallbacks
Fields
Callbacks
public TCallbacks Callbacks
Field Value
- TCallbacks
CompoundMeshReductions
public BatcherContinuations<CompoundMeshReduction> CompoundMeshReductions
Field Value
Dt
Timestep duration used by pairs which rely on velocity to compute local bounding boxes for pruning.
public float Dt
Field Value
MeshReductions
public BatcherContinuations<MeshReduction> MeshReductions
Field Value
NonconvexReductions
public BatcherContinuations<NonconvexReduction> NonconvexReductions
Field Value
Pool
public BufferPool Pool
Field Value
- BufferPool
Shapes
public Shapes Shapes
Field Value
Methods
Add(TypedIndex, TypedIndex, Vector3, Quaternion, Quaternion, in BodyVelocity, in BodyVelocity, float, float, in PairContinuation)
public void Add(TypedIndex shapeIndexA, TypedIndex shapeIndexB, Vector3 offsetB, Quaternion orientationA, Quaternion orientationB, in BodyVelocity velocityA, in BodyVelocity velocityB, float speculativeMargin, float maximumExpansion, in PairContinuation continuation)
Parameters
shapeIndexATypedIndexshapeIndexBTypedIndexoffsetBVector3orientationAQuaternionorientationBQuaternionvelocityABodyVelocityvelocityBBodyVelocityspeculativeMarginfloatmaximumExpansionfloatcontinuationPairContinuation
Add(TypedIndex, TypedIndex, Vector3, Quaternion, Quaternion, float, in PairContinuation)
public void Add(TypedIndex shapeIndexA, TypedIndex shapeIndexB, Vector3 offsetB, Quaternion orientationA, Quaternion orientationB, float speculativeMargin, in PairContinuation continuation)
Parameters
shapeIndexATypedIndexshapeIndexBTypedIndexoffsetBVector3orientationAQuaternionorientationBQuaternionspeculativeMarginfloatcontinuationPairContinuation
Add(int, int, int, int, void*, void*, Vector3, Quaternion, Quaternion, float, int)
public void Add(int shapeTypeA, int shapeTypeB, int shapeSizeA, int shapeSizeB, void* shapeA, void* shapeB, Vector3 offsetB, Quaternion orientationA, Quaternion orientationB, float speculativeMargin, int pairId)
Parameters
shapeTypeAintshapeTypeBintshapeSizeAintshapeSizeBintshapeAvoid*shapeBvoid*offsetBVector3orientationAQuaternionorientationBQuaternionspeculativeMarginfloatpairIdint
AddDirectly(int, int, void*, void*, Vector3, Quaternion, Quaternion, in BodyVelocity, in BodyVelocity, float, float, in PairContinuation)
public void AddDirectly(int shapeTypeA, int shapeTypeB, void* shapeA, void* shapeB, Vector3 offsetB, Quaternion orientationA, Quaternion orientationB, in BodyVelocity velocityA, in BodyVelocity velocityB, float speculativeMargin, float maximumExpansion, in PairContinuation pairContinuation)
Parameters
shapeTypeAintshapeTypeBintshapeAvoid*shapeBvoid*offsetBVector3orientationAQuaternionorientationBQuaternionvelocityABodyVelocityvelocityBBodyVelocityspeculativeMarginfloatmaximumExpansionfloatpairContinuationPairContinuation
AddDirectly(int, int, void*, void*, Vector3, Quaternion, Quaternion, float, in PairContinuation)
public void AddDirectly(int shapeTypeA, int shapeTypeB, void* shapeA, void* shapeB, Vector3 offsetB, Quaternion orientationA, Quaternion orientationB, float speculativeMargin, in PairContinuation pairContinuation)
Parameters
shapeTypeAintshapeTypeBintshapeAvoid*shapeBvoid*offsetBVector3orientationAQuaternionorientationBQuaternionspeculativeMarginfloatpairContinuationPairContinuation
Add<TShapeA, TShapeB>(TShapeA, TShapeB, Vector3, Quaternion, Quaternion, float, int)
public void Add<TShapeA, TShapeB>(TShapeA shapeA, TShapeB shapeB, Vector3 offsetB, Quaternion orientationA, Quaternion orientationB, float speculativeMargin, int pairId) where TShapeA : struct, IShape where TShapeB : struct, IShape
Parameters
shapeATShapeAshapeBTShapeBoffsetBVector3orientationAQuaternionorientationBQuaternionspeculativeMarginfloatpairIdint
Type Parameters
TShapeATShapeB
CacheShapeB(int, int, void*, int, out void*)
public void CacheShapeB(int shapeTypeA, int shapeTypeB, void* shapeDataB, int shapeSizeB, out void* cachedShapeDataB)
Parameters
Flush()
Forces any remaining partial batches to execute and disposes the batcher.
public void Flush()
ProcessConvexResult(ref ConvexContactManifold, ref PairContinuation)
Reports the result of a convex collision test to the callbacks and, if necessary, to any continuations for postprocessing.
public void ProcessConvexResult(ref ConvexContactManifold manifold, ref PairContinuation continuation)
Parameters
manifoldConvexContactManifoldContacts detected for the pair.
continuationPairContinuationContinuation describing the pair and what to do with it.
Remarks
Unless you're building custom compound collision pairs or adding new contact processing continuations, you can safely ignore this.
ProcessEmptyResult(ref PairContinuation)
Reports the zero result of a convex collision test to the callbacks and, if necessary, to any continuations for postprocessing.
public void ProcessEmptyResult(ref PairContinuation continuation)
Parameters
continuationPairContinuationContinuation describing the pair and what to do with it.
Remarks
Unless you're building custom compound collision pairs or adding new contact processing continuations, you can safely ignore this.
ProcessUntestedSubpairConvexResult(ref PairContinuation)
Submits a subpair whose testing was blocked by user callback as complete to any relevant continuations.
public void ProcessUntestedSubpairConvexResult(ref PairContinuation continuation)
Parameters
continuationPairContinuationContinuation describing the pair and what to do with it.
Remarks
Unless you're building custom compound collision pairs or adding new contact processing continuations, you can safely ignore this.