PlayRho  1.1.0
An Interactive Real-Time-Oriented C++ Physics Engine & Library
playrho::Filter Struct Reference

A holder for contact filtering data. More...

#include <Filter.hpp>

Collaboration diagram for playrho::Filter:
[legend]

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 = 0x0001
 The collision category bits. More...
 
bits_type maskBits = 0xFFFF
 The collision mask bits. More...
 
index_type groupIndex = 0
 Group index. More...
 

Related Functions

(Note that these are not member functions.)

constexpr bool operator== (const Filter lhs, const Filter rhs) noexcept
 Equality operator.
 
constexpr bool operator!= (const Filter lhs, const Filter rhs) noexcept
 Inequality operator.
 
bool ShouldCollide (const Filter filterA, const Filter filterB) noexcept
 Determines whether collision processing should be performed.
 

Detailed Description

A holder for contact filtering data.

Note
This data structure size is 6-bytes.
Examples
WorldFixture.cpp.

Member Data Documentation

◆ categoryBits

bits_type playrho::Filter::categoryBits = 0x0001

The collision category bits.

Note
Normally you would just set one bit.

◆ groupIndex

index_type playrho::Filter::groupIndex = 0

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.

◆ maskBits

bits_type playrho::Filter::maskBits = 0xFFFF

The collision mask bits.

This states the categories that this shape would accept for collision.


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