A holder for contact filtering data. More...
#include <playrho/Filter.hpp>
Public Types | |
using | bits_type = std::uint16_t |
Bits type definition. | |
using | index_type = std::int16_t |
Index type definition. | |
Public Attributes | |
bits_type | categoryBits = DefaultCategoryBits |
The collision category bits. More... | |
index_type | groupIndex = DefaultGroupIndex |
Group index. More... | |
bits_type | maskBits = DefaultMaskBits |
The collision mask bits. More... | |
Static Public Attributes | |
static constexpr auto | DefaultCategoryBits = bits_type(0x0001) |
Default category bits. | |
static constexpr auto | DefaultGroupIndex = index_type{0} |
Default group index. | |
static constexpr auto | DefaultMaskBits = bits_type(0xFFFF) |
Default mask bits. | |
Related Functions | |
(Note that these are not member functions.) | |
constexpr bool | operator!= (const Filter lhs, const Filter rhs) noexcept |
Inequality operator. | |
constexpr bool | operator== (const Filter lhs, const Filter rhs) noexcept |
Equality operator. | |
bool | ShouldCollide (const Filter filterA, const Filter filterB) noexcept |
Determines whether collision processing should be performed. | |
A holder for contact filtering data.
bits_type playrho::Filter::categoryBits = DefaultCategoryBits |
The collision category bits.
index_type playrho::Filter::groupIndex = DefaultGroupIndex |
Group index.
Collision groups allow a certain group of objects to never collide (negative) or always collide (positive). Zero means no collision group. Non-zero group filtering always wins against the mask bits.
bits_type playrho::Filter::maskBits = DefaultMaskBits |
The collision mask bits.
This states the categories that this shape would accept for collision.