|
Hymn to Beauty
C++ 3D Engine
|
#include <TriggerObserver.hpp>
Public Types | |
| enum class | IntersectionPhase { Enter , Retained , Leave , None } |
| The type of intersection this observer has to its trigger. More... | |
Public Member Functions | |
| TriggerObserver (btCollisionObject &body) | |
| Constructor. More... | |
| btCollisionObject * | GetBulletCollisionObject () |
| Get the Bullet collision object of the observing body. More... | |
| IntersectionPhase | GetPhase () const |
| Get the intersection phase of the observer. More... | |
| void | PostIntersectionTest () |
| void | OnEnter (const std::function< void()> &handler) |
| void | ForgetEnter () |
| void | OnRetain (const std::function< void()> &handler) |
| void | ForgetRetain () |
| void | OnLeave (const std::function< void()> &handler) |
| void | ForgetLeave () |
Represents an object that listens to intersections against a trigger volume.
|
strong |
|
explicit |
Constructor.
| body | Rigid body listening to trigger. |
| void Physics::TriggerObserver::ForgetEnter | ( | ) |
Remove handler for when the observer begins intersecting its associated trigger volume.
| void Physics::TriggerObserver::ForgetLeave | ( | ) |
Remove handler for when the observer stops intersecting its associated trigger volume.
| void Physics::TriggerObserver::ForgetRetain | ( | ) |
Remove handler for when the observer continues intersecting its associated trigger volume.
| btCollisionObject * Physics::TriggerObserver::GetBulletCollisionObject | ( | ) |
Get the Bullet collision object of the observing body.
| TriggerObserver::IntersectionPhase Physics::TriggerObserver::GetPhase | ( | ) | const |
Get the intersection phase of the observer.
| void Physics::TriggerObserver::OnEnter | ( | const std::function< void()> & | handler | ) |
Set up a handler for when the observer begins intersecting its associated trigger volume.
| handler | Handler function to call. |
| void Physics::TriggerObserver::OnLeave | ( | const std::function< void()> & | handler | ) |
Set up a handler for when the observer stops intersecting its associated trigger volume.
| handler | Handler function to call. |
| void Physics::TriggerObserver::OnRetain | ( | const std::function< void()> & | handler | ) |
Set up a handler for when the observer continues intersecting its associated trigger volume.
| handler | Handler function to call. |
| void Physics::TriggerObserver::PostIntersectionTest | ( | ) |
Determine new intersection phase after collision test has been applied.