|
|
auto | getScene () const |
| |
|
| PhysicsBodyComponent (Entity owner) |
| |
|
void | Destroy () |
| |
|
template<typename T , typename ... A> |
| ColliderHandle | EmplaceCollider (A &&... args) |
| |
|
template<typename T > |
| void | DestroyCollider (ColliderHandle handle) |
| |
|
void | OnDestroyDetatchCollider (RavEngine::PhysicsCollider &collider) |
| |
| void | AddReceiver (decltype(receivers)::value_type &obj) |
| |
| void | RemoveReceiver (decltype(receivers)::value_type &obj) |
| |
|
void | RemoveReceiver (PhysicsCallback *) |
| |
| std::pair< vector3, quaternion > | getDynamicsWorldPose () const |
| |
| void | setDynamicsWorldPose (const vector3 &worldpos, const quaternion &worldrot) const |
| |
| void | SetGravityEnabled (bool) |
| |
| bool | GetGravityEnabled () const |
| |
| void | SetSleepNotificationsEnabled (bool) |
| |
| bool | GetSleepNotificationsEnabled () const |
| |
| void | SetSimulationEnabled (bool) |
| |
| bool | GetSimulationEnabled () const |
| |
| void | OnColliderEnter (PhysicsBodyComponent &other, const ContactPairPoint *contactPoints, size_t numContactPoints) |
| |
| void | OnColliderPersist (PhysicsBodyComponent &other, const ContactPairPoint *contactPoints, size_t numContactPoints) |
| |
| void | OnColliderExit (PhysicsBodyComponent &other, const ContactPairPoint *contactPoints, size_t numContactPoints) |
| |
| void | OnTriggerEnter (PhysicsBodyComponent &other) |
| |
| void | OnTriggerExit (PhysicsBodyComponent &other) |
| |
| bool | GetWantsContactData () const |
| |
| void | SetWantsContactData (bool state) |
| |
| void | DebugDraw (RavEngine::DebugDrawer &dbg, const RavEngine::Transform &tr) const |
| |
|
| ComponentWithOwner (const decltype(owner) o) |
| |
|
Entity | GetOwner () const |
| |
|
|
physx::PxRigidActor * | rigidActor = nullptr |
| |
|
physx::PxU32 | filterGroup = -1 |
| |
|
physx::PxU32 | filterMask = -1 |
| |
|
bool | debugEnabled = false |
| |
|
color_t | debug_color = 0xFFFFFFFF |
| |
|
constexpr | q_qt_def |
| |
|
|
class | PhysicsLinkSystemRead |
| |
|
class | PhysicsLinkSystemWrite |
| |
◆ AddReceiver()
| void RavEngine::PhysicsBodyComponent::AddReceiver |
( |
decltype(receivers)::value_type & |
obj | ) |
|
Add a recipient for collision events. Must implement IPhysicsActor.
- Parameters
-
| obj | the interface implementer to recieve the events |
◆ DebugDraw()
Draw a wireframe shape representing the boundary of this object
- Parameters
-
| color | the hex color to use to draw, in format 0xRRGGBBAA |
Implements RavEngine::IDebugRenderable.
◆ getDynamicsWorldPose()
| std::pair< vector3, quaternion > PhysicsBodyComponent::getDynamicsWorldPose |
( |
| ) |
const |
- Returns
- the PhysX dynamics pose.
- Note
- thread-safe (Locks internally).
◆ GetGravityEnabled()
| bool RavEngine::PhysicsBodyComponent::GetGravityEnabled |
( |
| ) |
const |
- Returns
- true if gravity is enabled
◆ GetSimulationEnabled()
| bool RavEngine::PhysicsBodyComponent::GetSimulationEnabled |
( |
| ) |
const |
- Returns
- true if simulation is enabled.
◆ GetSleepNotificationsEnabled()
| bool RavEngine::PhysicsBodyComponent::GetSleepNotificationsEnabled |
( |
| ) |
const |
Returns true if sleep / wake notifications are enabled.
◆ GetWantsContactData()
| bool RavEngine::PhysicsBodyComponent::GetWantsContactData |
( |
| ) |
const |
|
inline |
Get if this body wants contact data
◆ OnColliderEnter()
Invoked when a collider begins colliding with another body
- Parameters
-
| other | the second body |
| contactPoints | the contact point data. Do not hold onto this pointer, because after this call, the pointer is invalid. |
| numContactPoints | the number of contact points. Set to 0 if wantsContactData is false. |
◆ OnColliderExit()
Invoked when a collider has exited another collider
- Parameters
-
| other | the second body |
| contactPoints | the contact point data. Do not hold onto this pointer, because after this call, the pointer is invalid. |
| numContactPoints | the number of contact points. Set to 0 if wantsContactData is false. |
◆ OnColliderPersist()
Invoked when a collider has collided with another body for multiple frames
- Parameters
-
| other | the second body |
| contactPoints | the contact point data. Do not hold onto this pointer, because after this call, the pointer is invalid. |
| numContactPoints | the number of contact points. Set to 0 if wantsContactData is false. |
◆ OnTriggerEnter()
Called by a PhysicsBodyComponent when it has entered another trigger. Override in subclasses. Note that triggers cannot fire events on other triggers.
- Parameters
-
◆ OnTriggerExit()
Called by a PhysicsBodyComponent when it has exited another trigger. Override in subclasses. Note that triggers cannot fire events on other triggers.
- Parameters
-
◆ RemoveReceiver()
| void RavEngine::PhysicsBodyComponent::RemoveReceiver |
( |
decltype(receivers)::value_type & |
obj | ) |
|
Remove a recipient for collision events. Must implement IPhysicsActor On deallocation, objects automatically remove themselves.
- Parameters
-
◆ setDynamicsWorldPose()
Set the world space dynamics transform (via teleport)
- Parameters
-
| worldpos | world-space position |
| worldrot | world-space rotation |
- Note
- thread-safe (Locks internally).
◆ SetGravityEnabled()
| void RavEngine::PhysicsBodyComponent::SetGravityEnabled |
( |
bool |
state | ) |
|
Enable or disable gravity on this body
- Parameters
-
| state | the new state of gravity |
◆ SetSimulationEnabled()
| void RavEngine::PhysicsBodyComponent::SetSimulationEnabled |
( |
bool |
state | ) |
|
Enable or disable simulation for this body.
- Parameters
-
| state | the new simulation status. |
- Note
- If simulation is disbaled, all constraints are removed, all velocities and forces are cleared, and actor is set to sleep.
◆ SetSleepNotificationsEnabled()
| void RavEngine::PhysicsBodyComponent::SetSleepNotificationsEnabled |
( |
bool |
state | ) |
|
Sets whether or not onWake and onSleep events get called.
- Parameters
-
| state | new state for this property |
◆ SetWantsContactData()
| void RavEngine::PhysicsBodyComponent::SetWantsContactData |
( |
bool |
state | ) |
|
|
inline |
wantsContactData controls if the simulation calculates and extracts contact point information on collisions. Set to true to get contact point data. If set to false, OnCollider functions will have a dangling contactPoints pointer and numContactPoints will be 0.
The documentation for this class was generated from the following files: