Open 3D Engine AzFramework API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
A hierarchical collection of rigid bodies connected by joints typically used to physically simulate a character. More...
#include <Ragdoll.h>
Inherits AzPhysics::SimulatedBody.
Public Member Functions | |
AZ_CLASS_ALLOCATOR (Ragdoll, AZ::SystemAllocator) | |
AZ_RTTI (Physics::Ragdoll, "{01F09602-80EC-4693-A0E7-C2719239044B}", AzPhysics::SimulatedBody) | |
virtual void | EnableSimulation (const RagdollState &initialState)=0 |
virtual void | EnableSimulationQueued (const RagdollState &initialState)=0 |
virtual void | DisableSimulation ()=0 |
Removes the ragdoll from physics simulation. | |
virtual void | DisableSimulationQueued ()=0 |
Queues removing the ragdoll from the physics simulation, to be executed before the next physics update. | |
virtual bool | IsSimulated () const =0 |
virtual void | GetState (RagdollState &ragdollState) const =0 |
virtual void | SetState (const RagdollState &ragdollState)=0 |
virtual void | SetStateQueued (const RagdollState &ragdollState)=0 |
virtual void | GetNodeState (size_t nodeIndex, RagdollNodeState &nodeState) const =0 |
virtual void | SetNodeState (size_t nodeIndex, const RagdollNodeState &nodeState)=0 |
virtual RagdollNode * | GetNode (size_t nodeIndex) const =0 |
virtual size_t | GetNumNodes () const =0 |
Returns the number of ragdoll nodes in the ragdoll. | |
Public Member Functions inherited from AzPhysics::SimulatedBody | |
AZ_RTTI (AzPhysics::SimulatedBody, "{BCC37A4F-1C05-4660-9E41-0CCF2D5E7175}") | |
template<typename T > | |
void | SetUserData (T *userData) |
void * | GetUserData () |
void | SetFrameId (uint32_t frameId) |
uint32_t | GetFrameId () const |
virtual AzPhysics::SceneQueryHit | RayCast (const RayCastRequest &request)=0 |
void | ProcessCollisionEvent (const CollisionEvent &collision) const |
void | ProcessTriggerEvent (const TriggerEvent &trigger) const |
void | SyncTransform (float deltaTime) const |
void | RegisterOnCollisionBeginHandler (SimulatedBodyEvents::OnCollisionBegin::Handler &handler) |
void | RegisterOnCollisionPersistHandler (SimulatedBodyEvents::OnCollisionPersist::Handler &handler) |
see RegisterOnCollisionBeginHandler | |
void | RegisterOnCollisionEndHandler (SimulatedBodyEvents::OnCollisionEnd::Handler &handler) |
see RegisterOnCollisionBeginHandler | |
void | RegisterOnTriggerEnterHandler (SimulatedBodyEvents::OnTriggerEnter::Handler &handler) |
void | RegisterOnTriggerExitHandler (SimulatedBodyEvents::OnTriggerExit::Handler &handler) |
see RegisterOnTriggerEnterHandler | |
void | RegisterOnSyncTransformHandler (SimulatedBodyEvents::OnSyncTransform::Handler &handler) |
Helper to register a handler for a SyncTransform event on this Simulated body. | |
virtual AZ::Crc32 | GetNativeType () const =0 |
virtual void * | GetNativePointer () const =0 |
virtual Scene * | GetScene () |
virtual AZ::EntityId | GetEntityId () const =0 |
virtual AZ::Transform | GetTransform () const =0 |
virtual void | SetTransform (const AZ::Transform &transform)=0 |
virtual AZ::Vector3 | GetPosition () const =0 |
virtual AZ::Quaternion | GetOrientation () const =0 |
virtual AZ::Aabb | GetAabb () const =0 |
Additional Inherited Members | |
Static Public Member Functions inherited from AzPhysics::SimulatedBody | |
static void | Reflect (AZ::ReflectContext *context) |
Public Attributes inherited from AzPhysics::SimulatedBody | |
AZ_CLASS_ALLOCATOR_DECL | |
SceneHandle | m_sceneOwner = AzPhysics::InvalidSceneHandle |
The current Scene the simulated body is contained. | |
SimulatedBodyHandle | m_bodyHandle = AzPhysics::InvalidSimulatedBodyHandle |
The handle to this simulated body. | |
bool | m_simulating = false |
Static Public Attributes inherited from AzPhysics::SimulatedBody | |
static constexpr uint32_t | UndefinedFrameId = AZStd::numeric_limits<uint32_t>::max() |
A hierarchical collection of rigid bodies connected by joints typically used to physically simulate a character.
|
pure virtual |
Inserts the ragdoll into the physics simulation.
initialState | State for initializing the ragdoll positions, orientations and velocities. |
|
pure virtual |
Queues inserting the ragdoll into the physics simulation, to be executed before the next physics update.
initialState | State for initializing the ragdoll positions, orientations and velocities. |
|
pure virtual |
Gets a pointer to an individual rigid body in the ragdoll.
nodeIndex | Index in the physics representation of the character. Note this does not necessarily correspond to indices used in other systems. |
|
pure virtual |
Writes the state for an individual body in the ragdoll to the provided output. The caller owns the output state and can safely manipulate it without affecting the physics simulation.
nodeIndex | Index in the physics representation of the character. Note this does not necessarily correspond to indices used in other systems. | |
[out] | nodeState | Output parameter to write the node state to. |
|
pure virtual |
Writes the state for all of the bodies in the ragdoll to the provided output. The caller owns the output state and can safely manipulate it without affecting the physics simulation.
[out] | ragdollState | Output parameter to write ragdoll state to. |
|
pure virtual |
Is the ragdoll currently simulated?
|
pure virtual |
Updates the state for an individual body in the ragdoll using the input node state.
nodeIndex | Index in the physics representation of the character. Note this does not necessarily correspond to indices used in other systems. |
nodeState | Contains the state with which to update the individual node. |
|
pure virtual |
Updates the state for all of the bodies in the ragdoll using the input ragdoll state.
ragdollState | The state with which to update the ragdoll. |
|
pure virtual |
Queues updating the state for all of the bodies in the ragdoll using the input ragdoll state. The new state is applied before the next physics update.
ragdollState | The state with which to update the ragdoll. |