stim::bounding_box struct

An axis-aligned bounding box.

Public types

using scalar_type = float
The scalar type used for bounding boxes.
using vector_type = vector<scalar_type, 3>
The 3D vector type used for bounding boxes.

Constructors, destructors, conversion operators

bounding_box() defaulted noexcept
Default constructor. Does not initialize the bounding box.
bounding_box(const bounding_box&) defaulted constexpr noexcept
Copy constructor.
bounding_box(vector_type center_, vector_type extents_) constexpr noexcept
Constructs a bounding box from a center point and extents (half-lengths).
bounding_box(scalar_type center_x, scalar_type center_y, scalar_type center_z, scalar_type extents_x, scalar_type extents_y, scalar_type extents_z) constexpr noexcept
Constructs a bounding box from a center point and extents (half-lengths) as scalar values.
operator bool() const explicit constexpr noexcept
Returns true if any of the bounding box's scalar components are non-zero.

Public functions

auto max_corner() const -> vector_type constexpr noexcept
Returns the 'max' corner of the bounding box.
auto min_corner() const -> vector_type constexpr noexcept
Returns the 'min' corner of the bounding box.
auto operator=(const bounding_box&) -> bounding_box& defaulted noexcept
Copy-assignment operator.

Public variables

vector_type center
The box's center position.
vector_type extents
The extents (half-lengths) of the box on each axis.

Compatibility with UE4

bounding_box(const ::FBox& box) noexcept
Constructs a bounding box from a UE4 FBox.
operator::FBox() const noexcept
Converts a bounding box into a UE4 FBox.

Function documentation

stim::bounding_box::bounding_box(const ::FBox& box) noexcept

Constructs a bounding box from a UE4 FBox.

stim::bounding_box::operator::FBox() const noexcept

Converts a bounding box into a UE4 FBox.