Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzPhysics::StaticRigidBody Struct Referenceabstract

Static rigid body. More...

#include <StaticRigidBody.h>

Inherits AzPhysics::SimulatedBody.

Public Member Functions

 AZ_RTTI (AzPhysics::StaticRigidBody, "{13A677BB-7085-4EDB-BCC8-306548238692}", AzPhysics::SimulatedBody)
 
virtual void AddShape (AZStd::shared_ptr< Physics::Shape > shape)=0
 
virtual AZ::u32 GetShapeCount () const
 
virtual AZStd::shared_ptr< Physics::ShapeGetShape (AZ::u32 index)
 
virtual AZStd::shared_ptr< const Physics::ShapeGetShape (AZ::u32 index) const
 
- 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 SceneGetScene ()
 
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
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
- Static Public Member Functions inherited from AzPhysics::SimulatedBody
static void Reflect (AZ::ReflectContext *context)
 

Public Attributes

 AZ_CLASS_ALLOCATOR_DECL
 
- 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
 

Additional Inherited Members

- Static Public Attributes inherited from AzPhysics::SimulatedBody
static constexpr uint32_t UndefinedFrameId = AZStd::numeric_limits<uint32_t>::max()
 

Detailed Description

Static rigid body.

Member Function Documentation

◆ AddShape()

virtual void AzPhysics::StaticRigidBody::AddShape ( AZStd::shared_ptr< Physics::Shape shape)
pure virtual

Add a shape to the static rigid body.

Parameters
shapeA shared pointer of the shape to add.

◆ GetShape()

virtual AZStd::shared_ptr< Physics::Shape > AzPhysics::StaticRigidBody::GetShape ( AZ::u32  index)
inlinevirtual

Returns a shared pointer to the requested shape index.

Parameters
indexThe index of the shapes to return. Expected to be between 0 and GetShapeCount().
Returns
Returns a shared pointer of the shape requested or nullptr if index is out of bounds.

◆ GetShapeCount()

virtual AZ::u32 AzPhysics::StaticRigidBody::GetShapeCount ( ) const
inlinevirtual

Returns the number of shapes that make up this static rigid body.

Returns
Returns the number of shapes as a AZ::u32.

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