Struct SimulationAllocationSizes
- Namespace
- BepuPhysics
- Assembly
- BepuPhysics.dll
The common set of allocation sizes for a simulation.
public struct SimulationAllocationSizes
- Inherited Members
Constructors
SimulationAllocationSizes(int, int, int, int, int, int, int)
Constructs a description of simulation allocations.
public SimulationAllocationSizes(int bodies, int statics, int islands, int shapesPerType, int constraints, int constraintsPerTypeBatch, int constraintCountPerBodyEstimate)
Parameters
bodiesintThe number of bodies to allocate space for.
staticsintThe number of statics to allocate space for.
islandsintThe number of inactive islands to allocate space for.
shapesPerTypeintMinimum number of shapes to allocate space for in each shape type batch. Unused if a Shapes instance was directly provided to the Simulation constructor.
constraintsintThe number of constraints to allocate bookkeeping space for. This does not affect actual type batch allocation sizes, only the solver-level constraint handle storage.
constraintsPerTypeBatchintThe minimum number of constraints to allocate space for in each individual type batch. New type batches will be given enough memory for this number of constraints, and any compaction will not reduce the allocations below it. The number of constraints can vary greatly across types- there are usually far more contacts than ragdoll constraints. Per type estimates can be assigned within the Solver.TypeBatchAllocation if necessary. This value acts as a lower bound for all types.
constraintCountPerBodyEstimateintThe minimum number of constraints to allocate space for in each body's constraint list. New bodies will be given enough memory for this number of constraints, and any compaction will not reduce the allocations below it.
Fields
Bodies
The number of bodies to allocate space for.
public int Bodies
Field Value
ConstraintCountPerBodyEstimate
The minimum number of constraints to allocate space for in each body's constraint list. New bodies will be given enough memory for this number of constraints, and any compaction will not reduce the allocations below it.
public int ConstraintCountPerBodyEstimate
Field Value
Constraints
The number of constraints to allocate bookkeeping space for. This does not affect actual type batch allocation sizes, only the solver-level constraint handle storage.
public int Constraints
Field Value
ConstraintsPerTypeBatch
The minimum number of constraints to allocate space for in each individual type batch. New type batches will be given enough memory for this number of constraints, and any compaction will not reduce the allocations below it. The number of constraints can vary greatly across types- there are usually far more contacts than ragdoll constraints. Per type estimates can be assigned within the Solver.TypeBatchAllocation if necessary. This value acts as a lower bound for all types.
public int ConstraintsPerTypeBatch
Field Value
Islands
The number of inactive islands to allocate space for.
public int Islands
Field Value
ShapesPerType
Minimum number of shapes to allocate space for in each shape type batch.
public int ShapesPerType
Field Value
Remarks
Unused if a Shapes instance was directly provided to the Simulation constructor.
Statics
The number of statics to allocate space for.
public int Statics