12#ifndef JPH_OBJECT_LAYER_BITS
13 #define JPH_OBJECT_LAYER_BITS 16
15#if JPH_OBJECT_LAYER_BITS == 16
17#elif JPH_OBJECT_LAYER_BITS == 32
20 #error "JPH_OBJECT_LAYER_BITS must be 16 or 32"
39#ifdef JPH_TRACK_BROADPHASE_STATS
41 virtual String GetDescription()
const
43 return "No Description";
68 mObjectLayerPairFilter(inObjectLayerPairFilter),
75 mObjectLayerPairFilter(inRHS.mObjectLayerPairFilter),
83 return mObjectLayerPairFilter.ShouldCollide(mLayer, inLayer);
104 return mLayer == inLayer;
#define JPH_EXPORT
Definition: Core.h:236
#define JPH_NAMESPACE_END
Definition: Core.h:378
std::uint32_t uint32
Definition: Core.h:455
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
std::uint16_t uint16
Definition: Core.h:454
uint16 ObjectLayer
Definition: ObjectLayer.h:16
std::basic_string< char, std::char_traits< char >, STLAllocator< char > > String
Definition: STLAllocator.h:107
Default filter class that uses the pair filter in combination with a specified layer to filter layers...
Definition: ObjectLayer.h:64
virtual bool ShouldCollide(ObjectLayer inLayer) const override
Function to filter out object layers when doing collision query test (return true to allow testing ag...
Definition: ObjectLayer.h:81
DefaultObjectLayerFilter(const ObjectLayerPairFilter &inObjectLayerPairFilter, ObjectLayer inLayer)
Constructor.
Definition: ObjectLayer.h:67
DefaultObjectLayerFilter(const DefaultObjectLayerFilter &inRHS)
Copy constructor.
Definition: ObjectLayer.h:74
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition: NonCopyable.h:11
Filter class for object layers.
Definition: ObjectLayer.h:28
virtual bool ShouldCollide(ObjectLayer inLayer) const
Function to filter out object layers when doing collision query test (return true to allow testing ag...
Definition: ObjectLayer.h:34
virtual ~ObjectLayerFilter()=default
Destructor.
Filter class to test if two objects can collide based on their object layer. Used while finding colli...
Definition: ObjectLayer.h:50
virtual bool ShouldCollide(ObjectLayer inLayer1, ObjectLayer inLayer2) const
Returns true if two layers can collide.
Definition: ObjectLayer.h:56
virtual ~ObjectLayerPairFilter()=default
Destructor.
Allows objects from a specific layer only.
Definition: ObjectLayer.h:93
virtual bool ShouldCollide(ObjectLayer inLayer) const override
Function to filter out object layers when doing collision query test (return true to allow testing ag...
Definition: ObjectLayer.h:102
SpecifiedObjectLayerFilter(ObjectLayer inLayer)
Constructor.
Definition: ObjectLayer.h:96