A class wrapping some user data for Box2D fixtures. Includes data for number of contacts being made to the sensor and an ID useful for identifying fixtures when a contact triggers a Box2D contact listener event.
More...
#include <SensorData.hpp>
|
| SensorData () |
| Default constructor. More...
|
|
| SensorData (int id) |
| Preferred constructor. More...
|
|
| ~SensorData () |
|
void | contactMade () |
| Increments the number of contacts made to the sensor. Call this function inside a Box2D contact listener function when filtering contacts. More...
|
|
void | contactEnded () |
| Decrements the number of contacts made to the sensor. Call this function inside a Box2D contact listener function when filtering contacts. More...
|
|
int | getContacts () |
| Get the number of contacts currently being made to the sensor. More...
|
|
int | getID () |
|
A class wrapping some user data for Box2D fixtures. Includes data for number of contacts being made to the sensor and an ID useful for identifying fixtures when a contact triggers a Box2D contact listener event.
◆ SensorData() [1/2]
pk::SensorData::SensorData |
( |
| ) |
|
◆ SensorData() [2/2]
pk::SensorData::SensorData |
( |
int |
id | ) |
|
|
inline |
◆ ~SensorData()
pk::SensorData::~SensorData |
( |
| ) |
|
|
inline |
◆ contactEnded()
pk::SensorData::contactEnded |
( |
| ) |
|
|
inline |
Decrements the number of contacts made to the sensor. Call this function inside a Box2D contact listener function when filtering contacts.
◆ contactMade()
pk::SensorData::contactMade |
( |
| ) |
|
|
inline |
Increments the number of contacts made to the sensor. Call this function inside a Box2D contact listener function when filtering contacts.
◆ getContacts()
pk::SensorData::getContacts |
( |
| ) |
|
|
inline |
Get the number of contacts currently being made to the sensor.
- Returns
- int - the number of contacts given as an int.
◆ getID()
int pk::SensorData::getID |
( |
| ) |
|
|
inline |
◆ m_contacts
int pk::SensorData::m_contacts |
|
private |
the number of contacts made with the sensor.
◆ m_id
The documentation for this class was generated from the following file: