Class CollisionTask
- Namespace
- BepuPhysics.CollisionDetection
- Assembly
- BepuPhysics.dll
Parent type of tasks which handle collision tests between batches of shapes of a particular type.
public abstract class CollisionTask
- Inheritance
-
CollisionTask
- Derived
- Inherited Members
Properties
BatchSize
Gets the number of tasks to batch together before executing this task.
public int BatchSize { get; protected set; }
Property Value
PairType
Gets the pair type that the ExecuteBatch call requires.
public CollisionTaskPairType PairType { get; protected set; }
Property Value
ShapeTypeIndexA
Gets the first shape type index associated with the task. Shape pairs provided to the task for execution should be in the order defined by these type two indices. If a collision task isn't a top level shape pair task, this should be -1.
public int ShapeTypeIndexA { get; protected set; }
Property Value
ShapeTypeIndexB
Gets the second shape type index associated with the task. Shape pairs provided to the task for execution should be in the order defined by these type two indices. If a collision task isn't a top level shape pair task, this should be -1.
public int ShapeTypeIndexB { get; protected set; }
Property Value
SubtaskGenerator
Gets whether the task is capable of generating subtasks. Note that subtask generators cannot generate subtasks that are themselves subtask generators.
public bool SubtaskGenerator { get; protected set; }
Property Value
Methods
ExecuteBatch<TCallbacks>(ref UntypedList, ref CollisionBatcher<TCallbacks>)
Executes the task on the given input.
public abstract void ExecuteBatch<TCallbacks>(ref UntypedList batch, ref CollisionBatcher<TCallbacks> batcher) where TCallbacks : struct, ICollisionCallbacks
Parameters
batch
UntypedListBatch of pairs to test.
batcher
CollisionBatcher<TCallbacks>Batcher responsible for the invocation.
Type Parameters
TCallbacks
Type of the callbacks used to handle results of collision tasks.