Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
BroadPhaseLayerInterfaceMask Class Reference

#include <BroadPhaseLayerInterfaceMask.h>

Inheritance diagram for BroadPhaseLayerInterfaceMask:
BroadPhaseLayerInterface NonCopyable

Public Member Functions

JPH_OVERRIDE_NEW_DELETE BroadPhaseLayerInterfaceMask (uint inNumBroadPhaseLayers)
 
void ConfigureLayer (BroadPhaseLayer inBroadPhaseLayer, uint32 inGroupsToInclude, uint32 inGroupsToExclude)
 
virtual uint GetNumBroadPhaseLayers () const override
 Return the number of broadphase layers there are.
 
virtual BroadPhaseLayer GetBroadPhaseLayer (ObjectLayer inLayer) const override
 Convert an object layer to the corresponding broadphase layer.
 
bool ShouldCollide (ObjectLayer inLayer1, BroadPhaseLayer inLayer2) const
 Returns true if an object layer should collide with a broadphase layer, this function is being called from ObjectVsBroadPhaseLayerFilterMask.
 
void SetBroadPhaseLayerName (BroadPhaseLayer inLayer, const char *inName)
 
virtual const char * GetBroadPhaseLayerName (BroadPhaseLayer inLayer) const override
 Get the user readable name of a broadphase layer (debugging purposes)
 
- Public Member Functions inherited from BroadPhaseLayerInterface
virtual ~BroadPhaseLayerInterface ()=default
 Destructor.
 
- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 

Detailed Description

BroadPhaseLayerInterface implementation. This defines a mapping between object and broadphase layers. This implementation works together with ObjectLayerPairFilterMask and ObjectVsBroadPhaseLayerFilterMask. A broadphase layer is suitable for an object if its group & inGroupsToInclude is not zero and its group & inGroupsToExclude is zero. The broadphase layers are iterated from lowest to highest value and the first one that matches is taken. If none match then it takes the last layer.

Constructor & Destructor Documentation

◆ BroadPhaseLayerInterfaceMask()

JPH_OVERRIDE_NEW_DELETE BroadPhaseLayerInterfaceMask::BroadPhaseLayerInterfaceMask ( uint  inNumBroadPhaseLayers)
inlineexplicit

Member Function Documentation

◆ ConfigureLayer()

void BroadPhaseLayerInterfaceMask::ConfigureLayer ( BroadPhaseLayer  inBroadPhaseLayer,
uint32  inGroupsToInclude,
uint32  inGroupsToExclude 
)
inline

◆ GetBroadPhaseLayer()

virtual BroadPhaseLayer BroadPhaseLayerInterfaceMask::GetBroadPhaseLayer ( ObjectLayer  inLayer) const
inlineoverridevirtual

Convert an object layer to the corresponding broadphase layer.

Implements BroadPhaseLayerInterface.

◆ GetBroadPhaseLayerName()

virtual const char * BroadPhaseLayerInterfaceMask::GetBroadPhaseLayerName ( BroadPhaseLayer  inLayer) const
inlineoverridevirtual

Get the user readable name of a broadphase layer (debugging purposes)

Implements BroadPhaseLayerInterface.

◆ GetNumBroadPhaseLayers()

virtual uint BroadPhaseLayerInterfaceMask::GetNumBroadPhaseLayers ( ) const
inlineoverridevirtual

Return the number of broadphase layers there are.

Implements BroadPhaseLayerInterface.

◆ SetBroadPhaseLayerName()

void BroadPhaseLayerInterfaceMask::SetBroadPhaseLayerName ( BroadPhaseLayer  inLayer,
const char *  inName 
)
inline

◆ ShouldCollide()

bool BroadPhaseLayerInterfaceMask::ShouldCollide ( ObjectLayer  inLayer1,
BroadPhaseLayer  inLayer2 
) const
inline

Returns true if an object layer should collide with a broadphase layer, this function is being called from ObjectVsBroadPhaseLayerFilterMask.


The documentation for this class was generated from the following file: