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
pool
BufferPoolshapes
ShapescollisionTypeMatrix
CollisionTaskRegistrydt
floatcallbacks
TCallbacks
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
shapeIndexA
TypedIndexshapeIndexB
TypedIndexoffsetB
Vector3orientationA
QuaternionorientationB
QuaternionvelocityA
BodyVelocityvelocityB
BodyVelocityspeculativeMargin
floatmaximumExpansion
floatcontinuation
PairContinuation
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
shapeIndexA
TypedIndexshapeIndexB
TypedIndexoffsetB
Vector3orientationA
QuaternionorientationB
QuaternionspeculativeMargin
floatcontinuation
PairContinuation
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
shapeTypeA
intshapeTypeB
intshapeSizeA
intshapeSizeB
intshapeA
void*shapeB
void*offsetB
Vector3orientationA
QuaternionorientationB
QuaternionspeculativeMargin
floatpairId
int
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
shapeTypeA
intshapeTypeB
intshapeA
void*shapeB
void*offsetB
Vector3orientationA
QuaternionorientationB
QuaternionvelocityA
BodyVelocityvelocityB
BodyVelocityspeculativeMargin
floatmaximumExpansion
floatpairContinuation
PairContinuation
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
shapeTypeA
intshapeTypeB
intshapeA
void*shapeB
void*offsetB
Vector3orientationA
QuaternionorientationB
QuaternionspeculativeMargin
floatpairContinuation
PairContinuation
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
shapeA
TShapeAshapeB
TShapeBoffsetB
Vector3orientationA
QuaternionorientationB
QuaternionspeculativeMargin
floatpairId
int
Type Parameters
TShapeA
TShapeB
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
manifold
ConvexContactManifoldContacts detected for the pair.
continuation
PairContinuationContinuation 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
continuation
PairContinuationContinuation 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
continuation
PairContinuationContinuation 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.