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.
Physics::Shape Class Referenceabstract

Public Member Functions

 AZ_CLASS_ALLOCATOR (Shape, AZ::SystemAllocator)
 
 AZ_RTTI (Shape, "{0A47DDD6-2BD7-43B3-BF0D-2E12CC395C13}")
 
virtual void SetMaterial (const AZStd::shared_ptr< Material > &material)=0
 
virtual AZStd::shared_ptr< MaterialGetMaterial () const =0
 
virtual Physics::MaterialId GetMaterialId () const =0
 
virtual void SetCollisionLayer (const AzPhysics::CollisionLayer &layer)=0
 
virtual AzPhysics::CollisionLayer GetCollisionLayer () const =0
 
virtual void SetCollisionGroup (const AzPhysics::CollisionGroup &group)=0
 
virtual AzPhysics::CollisionGroup GetCollisionGroup () const =0
 
virtual void SetName (const char *name)=0
 
virtual void SetLocalPose (const AZ::Vector3 &offset, const AZ::Quaternion &rotation)=0
 
virtual AZStd::pair< AZ::Vector3, AZ::Quaternion > GetLocalPose () const =0
 
virtual float GetRestOffset () const =0
 
virtual float GetContactOffset () const =0
 
virtual void SetRestOffset (float restOffset)=0
 
virtual void SetContactOffset (float contactOffset)=0
 
virtual void * GetNativePointer ()=0
 
virtual const void * GetNativePointer () const =0
 
virtual AZ::Crc32 GetTag () const =0
 
virtual void AttachedToActor (void *actor)=0
 
virtual void DetachedFromActor ()=0
 
virtual AzPhysics::SceneQueryHit RayCast (const AzPhysics::RayCastRequest &worldSpaceRequest, const AZ::Transform &worldTransform)=0
 
virtual AzPhysics::SceneQueryHit RayCastLocal (const AzPhysics::RayCastRequest &localSpaceRequest)=0
 
virtual AZ::Aabb GetAabb (const AZ::Transform &worldTransform) const =0
 
virtual AZ::Aabb GetAabbLocal () const =0
 Retrieve this shape AABB using local coordinates.
 
virtual void GetGeometry (AZStd::vector< AZ::Vector3 > &vertices, AZStd::vector< AZ::u32 > &indices, const AZ::Aabb *optionalBounds=nullptr) const =0
 

Member Function Documentation

◆ GetAabb()

virtual AZ::Aabb Physics::Shape::GetAabb ( const AZ::Transform &  worldTransform) const
pure virtual

Retrieve this shape AABB.

Parameters
worldTransformWorld transform of this shape.

◆ GetGeometry()

virtual void Physics::Shape::GetGeometry ( AZStd::vector< AZ::Vector3 > &  vertices,
AZStd::vector< AZ::u32 > &  indices,
const AZ::Aabb *  optionalBounds = nullptr 
) const
pure virtual

Fills in the vertices and indices buffers representing this shape. If vertices are returned but not indices you may assume the vertices are in triangle list format.

Parameters
verticesA buffer to be filled with vertices
indicesA buffer to be filled with indices
optionalBoundsOptional AABB that, if provided, will limit the mesh returned to that AABB.
Currently only supported by the heightfield shape.

◆ RayCast()

virtual AzPhysics::SceneQueryHit Physics::Shape::RayCast ( const AzPhysics::RayCastRequest worldSpaceRequest,
const AZ::Transform &  worldTransform 
)
pure virtual

Raycast against this shape.

Parameters
requestRay parameters in world space.
worldTransformWorld transform of this shape.

◆ RayCastLocal()

virtual AzPhysics::SceneQueryHit Physics::Shape::RayCastLocal ( const AzPhysics::RayCastRequest localSpaceRequest)
pure virtual

Raycast against this shape using local coordinates.

Parameters
requestRay parameters in local space.

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