stim::bounding_sphere struct

A bounding sphere.

Public types

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

Constructors, destructors, conversion operators

bounding_sphere() defaulted noexcept
Default constructor. Does not initialize the bounding sphere.
bounding_sphere(const bounding_sphere&) defaulted constexpr noexcept
Copy constructor.
bounding_sphere(vector_type center_, scalar_type radius_) constexpr noexcept
Constructs a bounding sphere from a center point and radius.
bounding_sphere(scalar_type radius_) explicit constexpr noexcept
Constructs a bounding sphere of the given radius positioned at the origin.
operator bool() const explicit constexpr noexcept
Returns true if any of the bounding sphere's scalar components are non-zero.

Public functions

auto operator=(const bounding_sphere&) -> bounding_sphere& defaulted noexcept
Copy-assignment operator.

Public variables

vector_type center
The sphere's center position.
scalar_type radius
The of the sphere.

Compatibility with UE4

bounding_sphere(const ::FSphere& sphere) noexcept
Constructs a bounding sphere from a UE4 FSphere.
operator::FSphere() const noexcept
Converts a bounding sphere into a UE4 FSphere.

Function documentation

stim::bounding_sphere::bounding_sphere(const ::FSphere& sphere) noexcept

Constructs a bounding sphere from a UE4 FSphere.

stim::bounding_sphere::operator::FSphere() const noexcept

Converts a bounding sphere into a UE4 FSphere.