GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::physics::CollisionFilterTestResult Struct Reference

Result of a CollisionFilterTest. More...

#include <GREM/physics/Shape.hpp>

Public Types

enum  TestFlag : TestFlags { DETECTS_COLLISION = 1 << 0 , RESPONDS_TO_COLLISION = 1 << 1 }
using TestFlags = uint8_t

Public Member Functions

constexpr operator bool () const noexcept
 Check if both colliders wanted to detect or respond to collisions on any of the tested layers.
constexpr bool operator== (const CollisionFilterTestResult &other) const noexcept=default
 Compare this filter test result to another for equality.
constexpr bool detectsCollision () const noexcept
 Check if both colliders want to detect collisions with each other on at least some tested layer.
constexpr bool respondsToCollision () const noexcept
 Check if both colliders want to respond to collisions with each other on at least some tested layer.

Public Attributes

TestFlags passed {}
 Set of filter tests that passed.

Detailed Description

Result of a CollisionFilterTest.

Member Typedef Documentation

◆ TestFlags

Member Enumeration Documentation

◆ TestFlag

Enumerator
DETECTS_COLLISION 

Both colliders wanted to detect collisions with each other on at least one of the tested layers.

RESPONDS_TO_COLLISION 

Both colliders wanted to respond to collisions with each other on at least one of the tested layers.

Member Function Documentation

◆ operator bool()

grem::physics::CollisionFilterTestResult::operator bool ( ) const
inlineexplicitnodiscardconstexprnoexcept

Check if both colliders wanted to detect or respond to collisions on any of the tested layers.

Returns
true if the filter test passed, false otherwise.

◆ operator==()

bool grem::physics::CollisionFilterTestResult::operator== ( const CollisionFilterTestResult & other) const
nodiscardconstexprdefaultnoexcept

Compare this filter test result to another for equality.

Parameters
otherthe filter test result to compare this one to.
Returns
true if the results are equal, false otherwise.

◆ detectsCollision()

bool grem::physics::CollisionFilterTestResult::detectsCollision ( ) const
inlinenodiscardconstexprnoexcept

Check if both colliders want to detect collisions with each other on at least some tested layer.

Returns
true if the filter test passed for collision detection, false otherwise.

◆ respondsToCollision()

bool grem::physics::CollisionFilterTestResult::respondsToCollision ( ) const
inlinenodiscardconstexprnoexcept

Check if both colliders want to respond to collisions with each other on at least some tested layer.

Returns
true if the filter test passed for collision response, false otherwise.

Member Data Documentation

◆ passed

TestFlags grem::physics::CollisionFilterTestResult::passed {}

Set of filter tests that passed.


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