Jolt Physics
A multi core friendly Game Physics Engine
|
Filter class used during the simulation (PhysicsSystem::Update) to filter out collisions at shape level. More...
#include <SimShapeFilter.h>
Public Member Functions | |
virtual | ~SimShapeFilter ()=default |
Destructor. | |
virtual bool | ShouldCollide (const Body &inBody1, const Shape *inShape1, const SubShapeID &inSubShapeIDOfShape1, const Body &inBody2, const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const |
Public Member Functions inherited from NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
void | operator= (const NonCopyable &)=delete |
Filter class used during the simulation (PhysicsSystem::Update) to filter out collisions at shape level.
|
virtualdefault |
Destructor.
|
inlinevirtual |
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.
inBody1 | 1st body that is colliding |
inShape1 | 1st shape that is colliding |
inSubShapeIDOfShape1 | The sub shape ID that will lead from inBody1.GetShape() to inShape1 |
inBody2 | 2nd body that is colliding |
inShape2 | 2nd shape that is colliding |
inSubShapeIDOfShape2 | The sub shape ID that will lead from inBody2.GetShape() to inShape2 |