Struct BoundingBoxBatcher
- Namespace
- BepuPhysics
- Assembly
- BepuPhysics.dll
public struct BoundingBoxBatcher
- Inherited Members
Constructors
BoundingBoxBatcher(Bodies, Shapes, BroadPhase, BufferPool, float)
public BoundingBoxBatcher(Bodies bodies, Shapes shapes, BroadPhase broadPhase, BufferPool pool, float dt)
Parameters
bodiesBodiesshapesShapesbroadPhaseBroadPhasepoolBufferPooldtfloat
Fields
CollidablesPerFlush
The number of bodies to accumulate per type before executing an AABB update. The more bodies per batch, the less virtual overhead and execution divergence. However, this should be kept low enough such that the data that has to be gathered by the bounding box update is still usually in L1.
public const int CollidablesPerFlush = 16
Field Value
Methods
Add(int, in RigidPose, in BodyVelocity, in Collidable)
public void Add(int bodyIndex, in RigidPose pose, in BodyVelocity velocity, in Collidable collidable)
Parameters
bodyIndexintposeRigidPosevelocityBodyVelocitycollidableCollidable
AddCompoundChild(int, TypedIndex, in RigidPose, in BodyVelocity)
public void AddCompoundChild(int bodyIndex, TypedIndex shapeIndex, in RigidPose pose, in BodyVelocity velocity)
Parameters
bodyIndexintshapeIndexTypedIndexposeRigidPosevelocityBodyVelocity
ExecuteCompoundBatch<TShape>(CompoundShapeBatch<TShape>)
public void ExecuteCompoundBatch<TShape>(CompoundShapeBatch<TShape> shapeBatch) where TShape : unmanaged, ICompoundShape
Parameters
shapeBatchCompoundShapeBatch<TShape>
Type Parameters
TShape
ExecuteConvexBatch<TShape, TShapeWide>(ConvexShapeBatch<TShape, TShapeWide>)
public void ExecuteConvexBatch<TShape, TShapeWide>(ConvexShapeBatch<TShape, TShapeWide> shapeBatch) where TShape : unmanaged, IConvexShape where TShapeWide : unmanaged, IShapeWide<TShape>
Parameters
shapeBatchConvexShapeBatch<TShape, TShapeWide>
Type Parameters
TShapeTShapeWide
ExecuteHomogeneousCompoundBatch<TShape, TChildShape, TChildShapeWide>(HomogeneousCompoundShapeBatch<TShape, TChildShape, TChildShapeWide>)
public void ExecuteHomogeneousCompoundBatch<TShape, TChildShape, TChildShapeWide>(HomogeneousCompoundShapeBatch<TShape, TChildShape, TChildShapeWide> shapeBatch) where TShape : unmanaged, IHomogeneousCompoundShape<TChildShape, TChildShapeWide> where TChildShape : unmanaged, IConvexShape where TChildShapeWide : unmanaged, IShapeWide<TChildShape>
Parameters
shapeBatchHomogeneousCompoundShapeBatch<TShape, TChildShape, TChildShapeWide>
Type Parameters
TShapeTChildShapeTChildShapeWide
Flush()
public void Flush()