A component defining the true bounds of a spatially queryable object situated somewhere in the world.
More...
|
| void | applyModelMatrix (const glm::mat4 &modelMatrix) |
| | Computes new mPosition and mOrientation offsets based on (presumably) the model transform of the underlying scene object.
|
| glm::mat3 | getLocalRotationTransform () const |
| | Gets the rotation matrix associated with this object's orientation offset.
|
| glm::mat3 | getWorldRotationTransform () const |
| | Gets the rotation matrix associated with the underlying scene object's orientation, derived from its cached transform.
|
| glm::vec3 | getComputedWorldPosition () const |
| | The final position of the origin of the object bounds in the world.
|
| glm::quat | getComputedWorldOrientation () const |
| | The final orientation of the object bounds in the world.
|
| std::array< glm::vec3, 8 > | getVolumeRelativeBoxCorners () const |
| | Gets the corners of the box just encapsulating this object's true volume, relative to the origin of the spatial query volume alone.
|
| std::array< glm::vec3, 8 > | getLocalOrientedBoxCorners () const |
| | Gets the corners of the box just encapsulating this object's true volume and sharing its position and orientation, relative to the origin of the underlying scene node at 0,0,0 (in short, in model space).
|
| std::array< glm::vec3, 8 > | getWorldOrientedBoxCorners () const |
| | Gets the corners of the box just encapsulating this object's true volume relative to the origin of the underlying scene node in world space.
|
| std::array< AreaTriangle, 12 > | getWorldOrientedBoxFaceTriangles () const |
| | Gets an array of triangles that make up the faces of the bounds-aligned box corners in world space.
|
| glm::vec3 | getSupportAlong (const glm::vec3 &axis) const |
| | Returns the point on this object's surface furthest along a given axis from the origin of this object.
|
| std::pair< float, float > | getProjectionAlong (const glm::vec3 &axis) const |
| | Returns this shape's projection along some unit vector.
|
|
bool | isSensible () const |
| | Returns whether the underlying volume has sensible parameters (i.e., finite, non-degenerate, non-negative parameters).
|
|
bool | isPositiveStrict () const |
| | Checks whether underlying bounds is non-trivial, as in each important parameter that represents the volume is greater than 0.
|
|
| static std::string | getComponentTypeName () |
| | Fetches the component type string associated with this class.
|
| static ObjectBounds | create (const VolumeBox &box, const glm::vec3 &positionOffset, const glm::quat &orientationOffset) |
| | Creates bounds for an object in the shape of a box.
|
| static ObjectBounds | create (const VolumeCapsule &capsule, const glm::vec3 &positionOffset, const glm::quat &orientationOffset) |
| | Creates bounds for an object in the shape of a capsule.
|
| static ObjectBounds | create (const VolumeSphere &sphere, const glm::vec3 &positionOffset, const glm::quat &orientationOffset) |
| | Creates bounds for an object in the shape of a sphere.
|
|
|
TrueVolumeType | mType { TrueVolumeType::BOX } |
| | Value indicating the type of the volume represented by this object.
|
|
TrueVolume | mTrueVolume {} |
| | The data defining the volume itself, independent of its position.
|
|
glm::vec3 | mPosition { 0.f } |
| | The position, in the real world, of the scene node this data is attached to.
|
|
glm::vec3 | mPositionOffset { 0.f } |
| | The position of the origin of the spatial query volume relative to the origin of the node it is attached to.
|
|
glm::quat | mOrientation { glm::vec3{ 0.f } } |
| | The orientation in the real world of the scene node this bounds component is attached to.
|
|
glm::quat | mOrientationOffset { glm::vec3{ 0.f } } |
| | The transformation mapping forward as known by the underlying scene node, to forward as known by the spatial query volume.
|
A component defining the true bounds of a spatially queryable object situated somewhere in the world.
Also provides methods for retrieving related axis aligned and volume aligned box properties.
- See also
- ECSWorld::registerComponentTypes()