template<class T>
Magnum::Math::Range3D class

Three-dimensional range.

See Range for more information.

Base classes

template<UnsignedInt dimensions, class T>
class Range
N-dimensional range.

Constructors, destructors, conversion operators

Range3D(ZeroInitT = ZeroInit) constexpr noexcept
Construct zero range.

Range3D(NoInitT) explicit noexcept
Construct without initializing the contents.
Range3D(const Vector3<T>& min, const Vector3<T>& max) constexpr noexcept
Construct a range from minimal and maximal coordinates.
template<class U>
Range3D(const Range3D<U>& other) explicit constexpr noexcept
Construct range from another of different type.
template<class U, class V = decltype(Implementation::RangeConverter<3, T, U>::from(std::declval<U>()))>
Range3D(const U& other) explicit constexpr noexcept
Construct range from external representation.
Range3D(const Range<3, T>& other) constexpr noexcept
Copy constructor.

Public functions

auto backBottomLeft() -> Vector3<T>&
Back bottom left corner.
auto backBottomLeft() const -> Vector3<T> constexpr
auto backBottomRight() const -> Vector3<T> constexpr
Back bottom right corner.
auto backTopLeft() const -> Vector3<T> constexpr
Back top right corner.
auto backTopRight() const -> Vector3<T> constexpr
Back top right corner.
auto frontTopRight() -> Vector3<T>&
Front top right corner.
auto frontTopRight() const -> Vector3<T> constexpr
auto frontTopLeft() const -> Vector3<T> constexpr
Front top left corner.
auto frontBottomRight() const -> Vector3<T> constexpr
Front bottom right corner.
auto frontBottomLeft() const -> Vector3<T> constexpr
Front bottom left corner.
auto left() -> T&
Left edge.
auto left() const -> T constexpr
auto right() -> T&
Right edge.
auto right() const -> T constexpr
auto bottom() -> T&
Bottom edge.
auto bottom() const -> T constexpr
auto top() -> T&
Top edge.
auto top() const -> T constexpr
auto back() -> T&
Back edge.
auto back() const -> T constexpr
auto front() -> T&
Front edge.
auto front() const -> T constexpr
auto x() const -> Range<1, T> constexpr
Range in the X axis.
auto y() const -> Range<1, T> constexpr
Range in the Y axis.
auto z() const -> Range<1, T> constexpr
Range in the Z axis.
auto xy() const -> Range<2, T> constexpr
Range in the XY plane.
auto sizeX() const -> T
Range width.
auto sizeY() const -> T
Range height.
auto sizeZ() const -> T
Range depth.
auto centerX() const -> T
Range center on X axis.
auto centerY() const -> T
Range center on Y axis.
auto centerZ() const -> T
Range center on Z axis.

Function documentation

template<class T>
Magnum::Math::Range3D<T>::Range3D(ZeroInitT = ZeroInit) constexpr noexcept

Construct zero range.

Construct zero-size range positioned at origin.

template<class T> template<class U>
Magnum::Math::Range3D<T>::Range3D(const Range3D<U>& other) explicit constexpr noexcept

Construct range from another of different type.

Performs only default casting on the values, no rounding or anything else. Example usage:

Range2D<Float> floatingPoint({1.3f, 2.7f}, {-15.0f, 7.0f});
Range2D<Byte> integral(floatingPoint); // {{1, 2}, {-15, 7}}

template<class T>
Vector3<T>& Magnum::Math::Range3D<T>::backBottomLeft()

Back bottom left corner.

Equivalent to min().

template<class T>
Vector3<T> Magnum::Math::Range3D<T>::backBottomLeft() const constexpr

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T>
Vector3<T>& Magnum::Math::Range3D<T>::frontTopRight()

Front top right corner.

Equivalent to max().

template<class T>
Vector3<T> Magnum::Math::Range3D<T>::frontTopRight() const constexpr

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T>
T Magnum::Math::Range3D<T>::left() const constexpr

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T>
T Magnum::Math::Range3D<T>::right() const constexpr

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T>
T Magnum::Math::Range3D<T>::bottom() const constexpr

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T>
T Magnum::Math::Range3D<T>::top() const constexpr

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T>
T Magnum::Math::Range3D<T>::back() const constexpr

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T>
T Magnum::Math::Range3D<T>::front() const constexpr

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T>
T Magnum::Math::Range3D<T>::sizeX() const

Range width.

template<class T>
T Magnum::Math::Range3D<T>::sizeY() const

Range height.

template<class T>
T Magnum::Math::Range3D<T>::sizeZ() const

Range depth.

template<class T>
T Magnum::Math::Range3D<T>::centerX() const

Range center on X axis.

template<class T>
T Magnum::Math::Range3D<T>::centerY() const

Range center on Y axis.

template<class T>
T Magnum::Math::Range3D<T>::centerZ() const

Range center on Z axis.