Table of Contents

Struct ConstraintBatch

Namespace
BepuPhysics
Assembly
BepuPhysics.dll

Contains a set of type batches whose constraints share no body references.

public struct ConstraintBatch
Inherited Members

Constructors

ConstraintBatch(BufferPool, int)

public ConstraintBatch(BufferPool pool, int initialTypeCountEstimate = 32)

Parameters

pool BufferPool
initialTypeCountEstimate int

Fields

TypeBatches

public QuickList<TypeBatch> TypeBatches

Field Value

QuickList<TypeBatch>

TypeIndexToTypeBatchIndex

public Buffer<int> TypeIndexToTypeBatchIndex

Field Value

Buffer<int>

Methods

Clear(BufferPool)

public void Clear(BufferPool pool)

Parameters

pool BufferPool

Dispose(BufferPool)

Releases all memory used by the batch.

public void Dispose(BufferPool pool)

Parameters

pool BufferPool

EnsureTypeBatchCapacities(Solver)

Ensures that all type batches within this constraint batch meet or exceed the size requirements of the per-type capacities defined by the solver.

public void EnsureTypeBatchCapacities(Solver solver)

Parameters

solver Solver

Solver to pull minimum capacities from.

GetTypeBatch(int)

Gets a type batch in the batch matching the given type id. Requires that there exists at least one constraint in the type batch.

public ref TypeBatch GetTypeBatch(int typeId)

Parameters

typeId int

Id of the TypeBatch's type to retrieve.

Returns

TypeBatch

TypeBatch instance associated with the given type.

GetTypeBatchPointer(int)

Gets a pointer to the type batch in the batch matching the given type id. Requires that there exists at least one constraint in the type batch.

public TypeBatch* GetTypeBatchPointer(int typeId)

Parameters

typeId int

Id of the TypeBatch's type to retrieve.

Returns

TypeBatch*

TypeBatch instance associated with the given type.

Remove(int, int, bool, Solver)

public void Remove(int constraintTypeId, int indexInTypeBatch, bool isFallback, Solver solver)

Parameters

constraintTypeId int
indexInTypeBatch int
isFallback bool
solver Solver

RemoveBodyHandlesFromBatchForConstraint(int, int, int, Solver)

public void RemoveBodyHandlesFromBatchForConstraint(int constraintTypeId, int indexInTypeBatch, int batchIndex, Solver solver)

Parameters

constraintTypeId int
indexInTypeBatch int
batchIndex int
solver Solver

RemoveTypeBatchIfEmpty(ref TypeBatch, int, BufferPool)

public void RemoveTypeBatchIfEmpty(ref TypeBatch typeBatch, int typeBatchIndexToRemove, BufferPool pool)

Parameters

typeBatch TypeBatch
typeBatchIndexToRemove int
pool BufferPool

ResizeTypeBatchCapacities(Solver)

Applies the solver-defined minimum capacities to existing type batches.

public void ResizeTypeBatchCapacities(Solver solver)

Parameters

solver Solver

Solver to pull minimum capacities from.