SimShapeFilter

Filter class used during the simulation (PhysicsSystem::Update) to filter out collisions at shape level

C++ JPH::SimShapeFilter.

Constructors

Link copied to clipboard
constructor()

Creates one whose functions a subclass overrides.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open fun shouldCollide(body1: Body, shape1: Shape?, subShapeIDOfShape1: SubShapeID, body2: Body, shape2: Shape?, subShapeIDOfShape2: SubShapeID): Boolean

Filter function to determine if two shapes should collide. Returns true if the filter passes. This overload is called during the simulation (PhysicsSystem::Update) and must be registered with PhysicsSystem::SetSimShapeFilter. It is called at each level of the shape hierarchy, so if you have a compound shape with a box, this function will be called twice. It will not be called on triangles that are part of another shape, i.e a mesh shape will not trigger a callback per triangle. Note that this function is called from multiple threads and must be thread safe. All properties are read only.