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::BoxShape Class Reference

Inherits ShapeComponentRequestsBus::Handler, BoxShapeComponentRequestsBus::Handler, and AZ::TransformNotificationBus::Handler.

Inherited by LmbrCentral::AxisAlignedBoxShape.

Classes

class  BoxIntersectionDataCache
 Runtime data - cache potentially expensive operations. More...
 

Public Member Functions

virtual void Activate (AZ::EntityId entityId)
 
void Deactivate ()
 
void InvalidateCache (InvalidateShapeCacheReason reason)
 
AZ::Crc32 GetShapeType () override
 
AZ::Aabb GetEncompassingAabb () override
 
void GetTransformAndLocalBounds (AZ::Transform &transform, AZ::Aabb &bounds) override
 
bool IsPointInside (const AZ::Vector3 &point) override
 
float DistanceSquaredFromPoint (const AZ::Vector3 &point) override
 
AZ::Vector3 GenerateRandomPointInside (AZ::RandomDistributionType randomDistribution) override
 
bool IntersectRay (const AZ::Vector3 &src, const AZ::Vector3 &dir, float &distance) override
 
AZ::Vector3 GetTranslationOffset () const override
 
void SetTranslationOffset (const AZ::Vector3 &translationOffset) override
 
BoxShapeConfig GetBoxConfiguration () override
 
AZ::Vector3 GetBoxDimensions () const override
 
void SetBoxDimensions (const AZ::Vector3 &dimensions) override
 
bool IsTypeAxisAligned () override
 
void OnTransformChanged (const AZ::Transform &local, const AZ::Transform &world) override
 
void OnNonUniformScaleChanged (const AZ::Vector3 &scale)
 
const AZ::Vector3 & GetCurrentNonUniformScale () const
 
const BoxShapeConfigGetBoxConfiguration () const
 
void SetBoxConfiguration (const BoxShapeConfig &boxShapeConfig)
 
const AZ::Transform & GetCurrentTransform () const
 
void SetDrawColor (const AZ::Color &color)
 
BoxShapeConfigModifyConfiguration ()
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Protected Attributes

BoxIntersectionDataCache m_intersectionDataCache
 Caches transient intersection data.
 
AZ::Transform m_currentTransform
 Caches the current transform for the entity on which this component lives.
 
AZ::EntityId m_entityId
 Id of the entity the box shape is attached to.
 
AZ::NonUniformScaleChangedEvent::Handler m_nonUniformScaleChangedHandler
 Responds to changes in non-uniform scale.
 
AZ::Vector3 m_currentNonUniformScale = AZ::Vector3::CreateOne()
 Caches the current non-uniform scale.
 
BoxShapeConfig m_boxShapeConfig
 Underlying box configuration.
 
AZStd::shared_mutex m_mutex
 Mutex to allow multiple readers but single writer for efficient thread safety.
 

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