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

#include <ObjectLayerPairFilterTable.h>

Inheritance diagram for ObjectLayerPairFilterTable:
ObjectLayerPairFilter NonCopyable

Public Member Functions

JPH_OVERRIDE_NEW_DELETE ObjectLayerPairFilterTable (uint inNumObjectLayers)
 Constructs the table with inNumObjectLayers Layers, initially all layer pairs are disabled. More...
 
uint GetNumObjectLayers () const
 Get the number of object layers. More...
 
void DisableCollision (ObjectLayer inLayer1, ObjectLayer inLayer2)
 Disable collision between two object layers. More...
 
void EnableCollision (ObjectLayer inLayer1, ObjectLayer inLayer2)
 Enable collision between two object layers. More...
 
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
 

Detailed Description

Filter class to test if two objects can collide based on their object layer. Used while finding collision pairs. This implementation uses a table to determine if two layers can collide.

Constructor & Destructor Documentation

◆ ObjectLayerPairFilterTable()

JPH_OVERRIDE_NEW_DELETE ObjectLayerPairFilterTable::ObjectLayerPairFilterTable ( uint  inNumObjectLayers)
inlineexplicit

Constructs the table with inNumObjectLayers Layers, initially all layer pairs are disabled.

Member Function Documentation

◆ DisableCollision()

void ObjectLayerPairFilterTable::DisableCollision ( ObjectLayer  inLayer1,
ObjectLayer  inLayer2 
)
inline

Disable collision between two object layers.

◆ EnableCollision()

void ObjectLayerPairFilterTable::EnableCollision ( ObjectLayer  inLayer1,
ObjectLayer  inLayer2 
)
inline

Enable collision between two object layers.

◆ GetNumObjectLayers()

uint ObjectLayerPairFilterTable::GetNumObjectLayers ( ) const
inline

Get the number of object layers.

◆ ShouldCollide()

virtual bool ObjectLayerPairFilterTable::ShouldCollide ( ObjectLayer  inObject1,
ObjectLayer  inObject2 
) const
inlineoverridevirtual

Returns true if two layers can collide.

Reimplemented from ObjectLayerPairFilter.


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