Table of Contents

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 Bodies
pool BufferPool
solveDescription SolveDescription
initialCapacity int
initialIslandCapacity int
minimumCapacityPerTypeBatch int
poseIntegrator PoseIntegrator<TIntegrationCallbacks>

Fields

substepContext

protected Solver.SubstepMultithreadingContext substepContext

Field Value

Solver.SubstepMultithreadingContext

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 BufferPool
minimumBlockSizeInBundles int
maximumBlockSizeInBundles int
targetBlocksPerBatch int
typeBatchFilter TTypeBatchFilter
workBlocks 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

dt float
threadDispatcher IThreadDispatcher
workDelegate Action<int>

GetUniformlyDistributedStart(int, int, int, int)

protected static int GetUniformlyDistributedStart(int workerIndex, int blockCount, int workerCount, int offset)

Parameters

workerIndex int
blockCount int
workerCount int
offset int

Returns

int

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 float
threadDispatcher IThreadDispatcher