Jolt Physics
A multi core friendly Game Physics Engine
|
Helper class to reverse the order of the shapes in the ShouldCollide function. More...
#include <ShapeFilter.h>
Public Member Functions | |
ReversedShapeFilter (const ShapeFilter &inFilter) | |
Constructor. More... | |
virtual bool | ShouldCollide (const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const override |
virtual bool | ShouldCollide (const Shape *inShape1, const SubShapeID &inSubShapeIDOfShape1, const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const override |
Public Member Functions inherited from ShapeFilter | |
virtual | ~ShapeFilter ()=default |
Destructor. More... | |
virtual bool | ShouldCollide (const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const |
virtual bool | ShouldCollide (const Shape *inShape1, const SubShapeID &inSubShapeIDOfShape1, const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const |
Public Member Functions inherited from NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
void | operator= (const NonCopyable &)=delete |
Additional Inherited Members | |
Public Attributes inherited from ShapeFilter | |
BodyID | mBodyID2 |
Set by the collision detection functions to the body ID of the body that we're colliding against before calling the ShouldCollide function. More... | |
Helper class to reverse the order of the shapes in the ShouldCollide function.
|
inlineexplicit |
Constructor.
|
inlineoverridevirtual |
Filter function to determine if two shapes should collide. Returns true if the filter passes. This overload is called when querying a shape vs a shape (e.g. collide object / cast object). 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. You can filter out individual triangles in the CollisionCollector::AddHit function by their sub shape ID.
inShape1 | 1st shape that is colliding |
inSubShapeIDOfShape1 | The sub shape ID that will lead from the root shape to inShape1 (i.e. the shape that is used to collide or cast against shape 2) |
inShape2 | 2nd shape that is colliding |
inSubShapeIDOfShape2 | The sub shape ID that will lead from the root shape to inShape2 (i.e. the shape of mBodyID2) |
Reimplemented from ShapeFilter.
|
inlineoverridevirtual |
Filter function to determine if we should collide with a shape. Returns true if the filter passes. This overload is called when the query doesn't have a source shape (e.g. ray cast / collide point)
inShape2 | Shape we're colliding against |
inSubShapeIDOfShape2 | The sub shape ID that will lead from the root shape to inShape2 (i.e. the shape of mBodyID2) |
Reimplemented from ShapeFilter.