Jolt Physics
A multi core friendly Game Physics Engine
|
#include <ObjectLayerPairFilterMask.h>
Public Member Functions | |
virtual bool | ShouldCollide (ObjectLayer inObject1, ObjectLayer inObject2) const override |
Returns true if two layers can collide. More... | |
Public Member Functions inherited from ObjectLayerPairFilter | |
virtual | ~ObjectLayerPairFilter ()=default |
Destructor. More... | |
virtual bool | ShouldCollide (ObjectLayer inLayer1, ObjectLayer inLayer2) const |
Returns true if two layers can collide. More... | |
Public Member Functions inherited from NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
void | operator= (const NonCopyable &)=delete |
Static Public Member Functions | |
static ObjectLayer | sGetObjectLayer (uint32 inGroup, uint32 inMask=cMask) |
Construct an ObjectLayer from a group and mask bits. More... | |
static uint32 | sGetGroup (ObjectLayer inObjectLayer) |
Get the group bits from an ObjectLayer. More... | |
static uint32 | sGetMask (ObjectLayer inObjectLayer) |
Get the mask bits from an ObjectLayer. More... | |
Static Public Attributes | |
static JPH_OVERRIDE_NEW_DELETE constexpr uint32 | cNumBits = JPH_OBJECT_LAYER_BITS / 2 |
Number of bits for the group and mask bits. More... | |
static constexpr uint32 | cMask = (1 << cNumBits) - 1 |
Filter class to test if two objects can collide based on their object layer. Used while finding collision pairs. Uses group bits and mask bits. Two layers can collide if Object1.Group & Object2.Mask is non-zero and Object2.Group & Object1.Mask is non-zero. The behavior is similar to that in e.g. Bullet. This implementation works together with BroadPhaseLayerInterfaceMask and ObjectVsBroadPhaseLayerFilterMask
|
inlinestatic |
Get the group bits from an ObjectLayer.
|
inlinestatic |
Get the mask bits from an ObjectLayer.
|
inlinestatic |
Construct an ObjectLayer from a group and mask bits.
|
inlineoverridevirtual |
Returns true if two layers can collide.
Reimplemented from ObjectLayerPairFilter.
|
staticconstexpr |
Number of bits for the group and mask bits.