Services provided by the Shape Component.
More...
#include <ShapeComponentBus.h>
Inherits AZ::EBusSharedDispatchTraits< ShapeComponentRequests >.
|
using | BusIdType = AZ::EntityId |
|
|
virtual AZ::Crc32 | GetShapeType () const =0 |
| Returns the type of shape that this component holds. More...
|
|
virtual AZ::Aabb | GetEncompassingAabb () const =0 |
| Returns an AABB that encompasses this entire shape. More...
|
|
virtual void | GetTransformAndLocalBounds (AZ::Transform &transform, AZ::Aabb &bounds) const =0 |
| Returns the local space bounds of a shape and its world transform. More...
|
|
virtual bool | IsPointInside (const AZ::Vector3 &point) const =0 |
| Checks if a given point is inside a shape or outside it. More...
|
|
virtual float | DistanceFromPoint (const AZ::Vector3 &point) const |
| Returns the min distance a given point is from the shape. More...
|
|
virtual float | DistanceSquaredFromPoint (const AZ::Vector3 &point) const =0 |
| Returns the min squared distance a given point is from the shape. More...
|
|
virtual AZ::Vector3 | GenerateRandomPointInside (AZ::RandomDistributionType) const |
| Returns a random position inside the volume. More...
|
|
virtual bool | IntersectRay (const AZ::Vector3 &, const AZ::Vector3 &, float &) const |
| 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 ([[maybe_unused]] const AZ::Vector3 &translationOffset) |
| Set the translation offset for the shape relative to its entity.
|
|
|
static constexpr AZ::EBusAddressPolicy | AddressPolicy = AZ::EBusAddressPolicy::ById |
|
Services provided by the Shape Component.
◆ DistanceFromPoint()
virtual float LmbrCentral::ShapeComponentRequests::DistanceFromPoint |
( |
const AZ::Vector3 & |
point | ) |
const |
|
inlinevirtual |
Returns the min distance a given point is from the shape.
- Parameters
-
point | Vector3 indicating point to calculate distance from |
- Returns
- float indicating distance point is from shape
◆ DistanceSquaredFromPoint()
virtual float LmbrCentral::ShapeComponentRequests::DistanceSquaredFromPoint |
( |
const AZ::Vector3 & |
point | ) |
const |
|
pure virtual |
Returns the min squared distance a given point is from the shape.
- Parameters
-
point | Vector3 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 |
| ) |
const |
|
inlinevirtual |
Returns a random position inside the volume.
- Parameters
-
randomDistribution | An enum representing the different random distributions to use. |
◆ GetEncompassingAabb()
virtual AZ::Aabb LmbrCentral::ShapeComponentRequests::GetEncompassingAabb |
( |
| ) |
const |
|
pure virtual |
Returns an AABB that encompasses this entire shape.
- Returns
- AABB that encompasses the shape
◆ GetShapeType()
virtual AZ::Crc32 LmbrCentral::ShapeComponentRequests::GetShapeType |
( |
| ) |
const |
|
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 |
|
) |
| const |
|
pure virtual |
Returns the local space bounds of a shape and its world transform.
- Parameters
-
transform | AZ::Transform outparam containing the shape transform |
bounds | AZ::Aabb outparam containing an untransformed tight fitting bounding box according to the shape parameters |
◆ IsPointInside()
virtual bool LmbrCentral::ShapeComponentRequests::IsPointInside |
( |
const AZ::Vector3 & |
point | ) |
const |
|
pure virtual |
Checks if a given point is inside a shape or outside it.
- Parameters
-
point | Vector3 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:
- Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ShapeComponentBus.h