Class Solver<TIntegrationCallbacks>
- Namespace
- BepuPhysics
- Assembly
- BepuPhysics.dll
Handles integration-aware substepped solving.
public class Solver<TIntegrationCallbacks> : Solver where TIntegrationCallbacks : struct, IPoseIntegratorCallbacks
Type Parameters
TIntegrationCallbacksType 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
bodiesBodiespoolBufferPoolsolveDescriptionSolveDescriptioninitialCapacityintinitialIslandCapacityintminimumCapacityPerTypeBatchintposeIntegratorPoseIntegrator<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
poolBufferPoolminimumBlockSizeInBundlesintmaximumBlockSizeInBundlesinttargetBlocksPerBatchinttypeBatchFilterTTypeBatchFilterworkBlocksQuickList<Solver.WorkBlock>batchBoundariesBuffer<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
threadDispatcherIThreadDispatcher
Returns
- IndexSet
Solve(float, IThreadDispatcher)
public override void Solve(float totalDt, IThreadDispatcher threadDispatcher = null)
Parameters
totalDtfloatthreadDispatcherIThreadDispatcher