Class Solver<TIntegrationCallbacks>
- Namespace
- BepuPhysics
- Assembly
- BepuPhysics.dll
Handles integration-aware substepped solving.
public class Solver<TIntegrationCallbacks> : Solver where TIntegrationCallbacks : struct, IPoseIntegratorCallbacks
Type Parameters
TIntegrationCallbacks
Type of integration callbacks being used during the substepped solve.
- Inheritance
-
Solver<TIntegrationCallbacks>
- Inherited Members
Constructors
Solver(Bodies, BufferPool, SolveDescription, int, int, int, PoseIntegrator<TIntegrationCallbacks>)
public Solver(Bodies bodies, BufferPool pool, SolveDescription solveDescription, int initialCapacity, int initialIslandCapacity, int minimumCapacityPerTypeBatch, PoseIntegrator<TIntegrationCallbacks> poseIntegrator)
Parameters
bodies
Bodiespool
BufferPoolsolveDescription
SolveDescriptioninitialCapacity
intinitialIslandCapacity
intminimumCapacityPerTypeBatch
intposeIntegrator
PoseIntegrator<TIntegrationCallbacks>
Fields
substepContext
protected Solver.SubstepMultithreadingContext substepContext
Field Value
Properties
PoseIntegrator
Pose integrator used by the simulation.
public PoseIntegrator<TIntegrationCallbacks> PoseIntegrator { get; }
Property Value
- PoseIntegrator<TIntegrationCallbacks>
Methods
BuildWorkBlocks<TTypeBatchFilter>(BufferPool, int, int, int, ref TTypeBatchFilter, out QuickList<WorkBlock>, out Buffer<int>)
protected void BuildWorkBlocks<TTypeBatchFilter>(BufferPool pool, int minimumBlockSizeInBundles, int maximumBlockSizeInBundles, int targetBlocksPerBatch, ref TTypeBatchFilter typeBatchFilter, out QuickList<Solver.WorkBlock> workBlocks, out Buffer<int> batchBoundaries) where TTypeBatchFilter : Solver<TIntegrationCallbacks>.ITypeBatchSolveFilter
Parameters
pool
BufferPoolminimumBlockSizeInBundles
intmaximumBlockSizeInBundles
inttargetBlocksPerBatch
inttypeBatchFilter
TTypeBatchFilterworkBlocks
QuickList<Solver.WorkBlock>batchBoundaries
Buffer<int>
Type Parameters
TTypeBatchFilter
DisposeConstraintIntegrationResponsibilities()
public override void DisposeConstraintIntegrationResponsibilities()
ExecuteMultithreaded(float, IThreadDispatcher, Action<int>)
protected void ExecuteMultithreaded(float dt, IThreadDispatcher threadDispatcher, Action<int> workDelegate)
Parameters
GetUniformlyDistributedStart(int, int, int, int)
protected static int GetUniformlyDistributedStart(int workerIndex, int blockCount, int workerCount, int offset)
Parameters
Returns
PrepareConstraintIntegrationResponsibilities(IThreadDispatcher)
public override IndexSet PrepareConstraintIntegrationResponsibilities(IThreadDispatcher threadDispatcher = null)
Parameters
threadDispatcher
IThreadDispatcher
Returns
- IndexSet
Solve(float, IThreadDispatcher)
public override void Solve(float totalDt, IThreadDispatcher threadDispatcher = null)
Parameters
totalDt
floatthreadDispatcher
IThreadDispatcher