Open 3D Engine LmbrCentral Gem 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.
LmbrCentral::ShapeComponentRequests Class Referenceabstract

Services provided by the Shape Component. More...

#include <ShapeComponentBus.h>

Inherits AZ::EBusSharedDispatchTraits< ShapeComponentRequests >.

Public Types

using BusIdType = AZ::EntityId
 

Public Member Functions

virtual AZ::Crc32 GetShapeType ()=0
 Returns the type of shape that this component holds.
 
virtual AZ::Aabb GetEncompassingAabb ()=0
 Returns an AABB that encompasses this entire shape.
 
virtual void GetTransformAndLocalBounds (AZ::Transform &transform, AZ::Aabb &bounds)=0
 Returns the local space bounds of a shape and its world transform.
 
virtual bool IsPointInside (const AZ::Vector3 &point)=0
 Checks if a given point is inside a shape or outside it.
 
virtual float DistanceFromPoint (const AZ::Vector3 &point)
 Returns the min distance a given point is from the shape.
 
virtual float DistanceSquaredFromPoint (const AZ::Vector3 &point)=0
 Returns the min squared distance a given point is from the shape.
 
virtual AZ::Vector3 GenerateRandomPointInside (AZ::RandomDistributionType)
 Returns a random position inside the volume.
 
virtual bool IntersectRay (const AZ::Vector3 &, const AZ::Vector3 &, float &)
 Returns if a ray is intersecting the shape.
 
virtual AZ::Vector3 GetTranslationOffset () const
 Get the translation offset for the shape relative to its entity.
 
virtual void SetTranslationOffset (const AZ::Vector3 &translationOffset)
 Set the translation offset for the shape relative to its entity.
 

Static Public Attributes

static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById
 

Detailed Description

Services provided by the Shape Component.

Member Function Documentation

◆ DistanceFromPoint()

virtual float LmbrCentral::ShapeComponentRequests::DistanceFromPoint ( const AZ::Vector3 &  point)
inlinevirtual

Returns the min distance a given point is from the shape.

Parameters
pointVector3 indicating point to calculate distance from
Returns
float indicating distance point is from shape

◆ DistanceSquaredFromPoint()

virtual float LmbrCentral::ShapeComponentRequests::DistanceSquaredFromPoint ( const AZ::Vector3 &  point)
pure virtual

Returns the min squared distance a given point is from the shape.

Parameters
pointVector3 indicating point to calculate square distance from
Returns
float indicating square distance point is from shape

◆ GenerateRandomPointInside()

virtual AZ::Vector3 LmbrCentral::ShapeComponentRequests::GenerateRandomPointInside ( AZ::RandomDistributionType  )
inlinevirtual

Returns a random position inside the volume.

Parameters
randomDistributionAn enum representing the different random distributions to use.

◆ GetEncompassingAabb()

virtual AZ::Aabb LmbrCentral::ShapeComponentRequests::GetEncompassingAabb ( )
pure virtual

Returns an AABB that encompasses this entire shape.

Returns
AABB that encompasses the shape

◆ GetShapeType()

virtual AZ::Crc32 LmbrCentral::ShapeComponentRequests::GetShapeType ( )
pure virtual

Returns the type of shape that this component holds.

Returns
Crc32 indicating the type of shape

◆ GetTransformAndLocalBounds()

virtual void LmbrCentral::ShapeComponentRequests::GetTransformAndLocalBounds ( AZ::Transform &  transform,
AZ::Aabb &  bounds 
)
pure virtual

Returns the local space bounds of a shape and its world transform.

Parameters
transformAZ::Transform outparam containing the shape transform
boundsAZ::Aabb outparam containing an untransformed tight fitting bounding box according to the shape parameters

◆ IsPointInside()

virtual bool LmbrCentral::ShapeComponentRequests::IsPointInside ( const AZ::Vector3 &  point)
pure virtual

Checks if a given point is inside a shape or outside it.

Parameters
pointVector3 indicating the point to be tested
Returns
bool indicating whether the point is inside or out

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