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
bodies
Bodiesshapes
ShapesbroadPhase
BroadPhasepool
BufferPooldt
float
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
bodyIndex
intpose
RigidPosevelocity
BodyVelocitycollidable
Collidable
AddCompoundChild(int, TypedIndex, in RigidPose, in BodyVelocity)
public void AddCompoundChild(int bodyIndex, TypedIndex shapeIndex, in RigidPose pose, in BodyVelocity velocity)
Parameters
bodyIndex
intshapeIndex
TypedIndexpose
RigidPosevelocity
BodyVelocity
ExecuteCompoundBatch<TShape>(CompoundShapeBatch<TShape>)
public void ExecuteCompoundBatch<TShape>(CompoundShapeBatch<TShape> shapeBatch) where TShape : unmanaged, ICompoundShape
Parameters
shapeBatch
CompoundShapeBatch<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
shapeBatch
ConvexShapeBatch<TShape, TShapeWide>
Type Parameters
TShape
TShapeWide
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
shapeBatch
HomogeneousCompoundShapeBatch<TShape, TChildShape, TChildShapeWide>
Type Parameters
TShape
TChildShape
TChildShapeWide
Flush()
public void Flush()