Class CollisionTaskRegistry
- Namespace
- BepuPhysics.CollisionDetection
- Assembly
- BepuPhysics.dll
Registry of collision tasks used to handle various shape pair types.
public class CollisionTaskRegistry
- Inheritance
-
CollisionTaskRegistry
- Inherited Members
Constructors
CollisionTaskRegistry(int)
Creates a new collision task registry.
public CollisionTaskRegistry(int initialShapeCount = 9)
Parameters
initialShapeCount
intInitial number of shape types to allocate space for in the registry.
Properties
this[int]
Gets the collision task associated with a task index.
public CollisionTask this[int taskIndex] { get; }
Parameters
taskIndex
intTask index to look up.
Property Value
- CollisionTask
Task associated with the task index.
Methods
GetTaskReference(int, int)
Gets metadata about the task associated with a shape type pair.
public ref CollisionTaskReference GetTaskReference(int topLevelTypeA, int topLevelTypeB)
Parameters
Returns
- CollisionTaskReference
Reference to the metadata for the task.
GetTaskReference<TShapeA, TShapeB>()
Gets metadata about the task associated with a shape type pair.
public ref CollisionTaskReference GetTaskReference<TShapeA, TShapeB>() where TShapeA : unmanaged, IShape where TShapeB : unmanaged, IShape
Returns
- CollisionTaskReference
Reference to the metadata for the task.
Type Parameters
TShapeA
Type of the first shape.
TShapeB
Type of the second shape.
Register(CollisionTask)
Registers a collision task.
public int Register(CollisionTask task)
Parameters
task
CollisionTaskTask to register.
Returns
- int
Index of the task in the registry.