Class ContactConstraintAccessor
- Namespace
- BepuPhysics.CollisionDetection
- Assembly
- BepuPhysics.dll
Provides indirection for reading from and updating constraints in the narrow phase.
public abstract class ContactConstraintAccessor
- Inheritance
-
ContactConstraintAccessor
- Derived
- Inherited Members
Remarks
This, like many other similar constructions in the engine, could conceptually be replaced by static function pointers and a few supplementary data fields. We probably will do exactly that at some point.
Fields
AccumulatedImpulseBundleStrideInBytes
protected int AccumulatedImpulseBundleStrideInBytes
Field Value
Convex
protected bool Convex
Field Value
Properties
ConstraintTypeId
public int ConstraintTypeId { get; protected set; }
Property Value
ContactCount
public int ContactCount { get; protected set; }
Property Value
Methods
DeterministicallyAdd<TCallbacks>(int, OverlapWorker[], ref QuickList<SortConstraintTarget>, Simulation, PairCache)
public abstract void DeterministicallyAdd<TCallbacks>(int typeIndex, NarrowPhase<TCallbacks>.OverlapWorker[] overlapWorkers, ref QuickList<NarrowPhase<TCallbacks>.SortConstraintTarget> constraintsOfType, Simulation simulation, PairCache pairCache) where TCallbacks : struct, INarrowPhaseCallbacks
Parameters
typeIndexintoverlapWorkersOverlapWorker[]constraintsOfTypeQuickList<NarrowPhase<TCallbacks>.SortConstraintTarget>simulationSimulationpairCachePairCache
Type Parameters
TCallbacks
ExtractContactData<TExtractor>(ConstraintHandle, Solver, ref TExtractor)
Extracts references to data from a contact constraint of the accessor's type.
public void ExtractContactData<TExtractor>(ConstraintHandle constraintHandle, Solver solver, ref TExtractor extractor) where TExtractor : struct, ISolverContactDataExtractor
Parameters
constraintHandleConstraintHandleHandle of the contact constraint to extract.
solverSolverSolver in which the constraint lives.
extractorTExtractorExtractor to handle the extracted references.
Type Parameters
TExtractorType of the extractor to handle the extracted references.
ExtractContactData<TExtractor>(in ConstraintLocation, Solver, ref TExtractor)
Extracts references to data from a contact constraint of the accessor's type.
public abstract void ExtractContactData<TExtractor>(in ConstraintLocation constraintLocation, Solver solver, ref TExtractor extractor) where TExtractor : struct, ISolverContactDataExtractor
Parameters
constraintLocationConstraintLocationLocation of the constraint in the solver.
solverSolverSolver in which the constraint lives.
extractorTExtractorExtractor to handle the extracted references.
Type Parameters
TExtractorType of the extractor to handle the extracted references.
ExtractContactPrestepAndImpulses<TExtractor>(ConstraintHandle, Solver, ref TExtractor)
Extracts references to data from a contact constraint of the accessor's type.
public void ExtractContactPrestepAndImpulses<TExtractor>(ConstraintHandle constraintHandle, Solver solver, ref TExtractor extractor) where TExtractor : struct, ISolverContactPrestepAndImpulsesExtractor
Parameters
constraintHandleConstraintHandleHandle of the contact constraint to extract.
solverSolverSolver in which the constraint lives.
extractorTExtractorExtractor to handle the extracted references.
Type Parameters
TExtractorType of the extractor to handle the extracted references.
ExtractContactPrestepAndImpulses<TExtractor>(in ConstraintLocation, Solver, ref TExtractor)
Extracts references to data from a contact constraint of the accessor's type.
public abstract void ExtractContactPrestepAndImpulses<TExtractor>(in ConstraintLocation constraintLocation, Solver solver, ref TExtractor extractor) where TExtractor : struct, ISolverContactPrestepAndImpulsesExtractor
Parameters
constraintLocationConstraintLocationLocation of the constraint in the solver.
solverSolverSolver in which the constraint lives.
extractorTExtractorExtractor to handle the extracted references.
Type Parameters
TExtractorType of the extractor to handle the extracted references.
FlushSequentially<TCallbacks>(ref UntypedList, int, Simulation, PairCache)
public abstract void FlushSequentially<TCallbacks>(ref UntypedList list, int narrowPhaseConstraintTypeId, Simulation simulation, PairCache pairCache) where TCallbacks : struct, INarrowPhaseCallbacks
Parameters
listUntypedListnarrowPhaseConstraintTypeIdintsimulationSimulationpairCachePairCache
Type Parameters
TCallbacks
FlushWithSpeculativeBatches<TCallbacks>(ref UntypedList, int, ref Buffer<Buffer<ushort>>, Simulation, PairCache)
public abstract void FlushWithSpeculativeBatches<TCallbacks>(ref UntypedList list, int narrowPhaseConstraintTypeId, ref Buffer<Buffer<ushort>> speculativeBatchIndices, Simulation simulation, PairCache pairCache) where TCallbacks : struct, INarrowPhaseCallbacks
Parameters
listUntypedListnarrowPhaseConstraintTypeIdintspeculativeBatchIndicesBuffer<Buffer<ushort>>simulationSimulationpairCachePairCache
Type Parameters
TCallbacks
GatherOldImpulses(ref ConstraintReference, float*)
public void GatherOldImpulses(ref ConstraintReference constraintReference, float* oldImpulses)
Parameters
constraintReferenceConstraintReferenceoldImpulsesfloat*
ScatterNewImpulses<TContactImpulses>(ref ConstraintReference, ref TContactImpulses)
public void ScatterNewImpulses<TContactImpulses>(ref ConstraintReference constraintReference, ref TContactImpulses contactImpulses)
Parameters
constraintReferenceConstraintReferencecontactImpulsesTContactImpulses
Type Parameters
TContactImpulses
UpdateConstraintForManifold<TContactManifold, TCallBodyHandles, TCallbacks>(NarrowPhase<TCallbacks>, int, int, ref CollidablePair, ref TContactManifold, ref PairMaterialProperties, TCallBodyHandles)
public abstract void UpdateConstraintForManifold<TContactManifold, TCallBodyHandles, TCallbacks>(NarrowPhase<TCallbacks> narrowPhase, int manifoldTypeAsConstraintType, int workerIndex, ref CollidablePair pair, ref TContactManifold manifoldPointer, ref PairMaterialProperties material, TCallBodyHandles bodyHandles) where TCallbacks : struct, INarrowPhaseCallbacks
Parameters
narrowPhaseNarrowPhase<TCallbacks>manifoldTypeAsConstraintTypeintworkerIndexintpairCollidablePairmanifoldPointerTContactManifoldmaterialPairMaterialPropertiesbodyHandlesTCallBodyHandles
Type Parameters
TContactManifoldTCallBodyHandlesTCallbacks