RavEngine
Loading...
Searching...
No Matches
RavEngine::PhysicsCallback Struct Reference

Public Member Functions

void OnRegisterBody (PolymorphicComponentHandle< RavEngine::PhysicsBodyComponent > sender)
 
void OnUnregisterBody (PolymorphicComponentHandle< RavEngine::PhysicsBodyComponent > sender)
 

Public Attributes

Function< void(PhysicsBodyComponent &other, const ContactPairPoint *contactPoints, size_t numContactPoints)> OnColliderEnter
 
Function< void(PhysicsBodyComponent &other, const ContactPairPoint *contactPoints, size_t numContactPoints)> OnColliderExit
 
Function< void(PhysicsBodyComponent &other, const ContactPairPoint *contactPoints, size_t numContactPoints)> OnColliderPersist
 
Function< void(PhysicsBodyComponent &)> OnTriggerEnter
 
Function< void(PhysicsBodyComponent &)> OnTriggerExit
 

Member Data Documentation

◆ OnColliderEnter

Function<void(PhysicsBodyComponent& other, const ContactPairPoint* contactPoints, size_t numContactPoints)> RavEngine::PhysicsCallback::OnColliderEnter

Called by a PhysicsBodyComponent when it has collided with another. Override in subclasses.

Parameters
otherthe other component
contactPointsthe contact point data. Do not hold onto this pointer, because after this call, the pointer is invalid.
numContactPointsthe number of contact points. Set to 0 if wantsContactData is false.

◆ OnColliderExit

Function<void(PhysicsBodyComponent& other, const ContactPairPoint* contactPoints, size_t numContactPoints)> RavEngine::PhysicsCallback::OnColliderExit

Called by a PhysicsBodyComponent when it has exited collision with another. Override in subclasses.

Parameters
otherthe other component
contactPointsthe contact point data. Do not hold onto this pointer, because after this call, the pointer is invalid.
numContactPointsthe number of contact points. Set to 0 if wantsContactData is false.

◆ OnColliderPersist

Function<void(PhysicsBodyComponent& other, const ContactPairPoint* contactPoints, size_t numContactPoints)> RavEngine::PhysicsCallback::OnColliderPersist

Called by a PhysicsBodyComponent when it has collided with another and the collision has persisted. Override in subclasses.

Parameters
otherthe other component
contactPointsthe contact point data. Do not hold onto this pointer, because after this call, the pointer is invalid.
numContactPointsthe number of contact points. Set to 0 if wantsContactData is false.

◆ OnTriggerEnter

Function<void(PhysicsBodyComponent&)> RavEngine::PhysicsCallback::OnTriggerEnter

Called by a PhysicsBodyComponent when it has entered another trigger . Override in subclasses. Note that triggers cannot fire events on other triggers.

Parameters
otherthe other component

◆ OnTriggerExit

Function<void(PhysicsBodyComponent&)> RavEngine::PhysicsCallback::OnTriggerExit

Called by a PhysicsBodyComponent when it has exited another trigger . Override in subclasses. Note that triggers cannot fire events on other triggers.

Parameters
otherthe other component

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