template<class T>
Frustum class
Camera frustum.
Contents
Stores camera frustum planes in order left (index 0), right (index 1), bottom (index 2), top (index 3), near (index 4) and far (index 5).
Public static functions
- static auto fromMatrix(const Matrix4<T>& m) -> Frustum<T>
- Create a frustum from projection matrix.
Constructors, destructors, conversion operators
- Frustum(IdentityInitT = IdentityInit) constexpr noexcept
- Identity constructor.
- Frustum(NoInitT) explicit noexcept
- Construct a frustum without initializing the contents.
- Frustum(const Vector4<T>& left, const Vector4<T>& right, const Vector4<T>& bottom, const Vector4<T>& top, const Vector4<T>& near, const Vector4<T>& far) constexpr noexcept
- Construct a frustum from plane equations.
-
template<class U>Frustum(const Frustum<U>& other) explicit constexpr noexcept
- Construct frustum from another of different type.
-
template<class U, class V = decltype(Implementation::FrustumConverter<T, U>::from(std::Frustum(const U& other) explicit constexpr noexcept
declval<U>()))> - Construct frustum from external representation.
-
template<class U, class V = decltype(Implementation::FrustumConverter<T, U>::to(std::operator U() const explicit constexpr
declval<Frustum<T>>()))> - Convert frustum to external representation.
Public functions
- auto operator==(const Frustum<T>& other) const -> bool
- Equality comparison.
- auto operator!=(const Frustum<T>& other) const -> bool
- Non-equality comparison.
- auto data() -> T*
- Raw data.
- auto data() const -> const T* constexpr
-
auto planes() const -> Corrade::
Containers:: StaticArrayView<6, const Vector4<T>> constexpr - Frustum planes.
-
auto operator[](std::
size_t i) const -> const Vector4<T>& constexpr - Plane at given index.
- auto left() const -> Vector4<T> constexpr
- Left plane.
- auto right() const -> Vector4<T> constexpr
- Right plane.
- auto bottom() const -> Vector4<T> constexpr
- Bottom plane.
- auto top() const -> Vector4<T> constexpr
- Top plane.
- auto near() const -> Vector4<T> constexpr
- Near plane.
- auto far() const -> Vector4<T> constexpr
- Far plane.
Function documentation
template<class T>
Magnum:: Math:: Frustum<T>:: Frustum(IdentityInitT = IdentityInit) constexpr noexcept
Identity constructor.
Equivalent to creating a frustum from an identity matrix.
template<class T>
T* Magnum:: Math:: Frustum<T>:: data()
Raw data.
| Returns | One-dimensional array of length 24. |
|---|
template<class T>
const T* Magnum:: Math:: Frustum<T>:: data() 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>
template<class T>
Corrade:: Utility:: Debug& operator<<(Corrade:: Utility:: Debug& debug,
const Frustum<T>& value)
Debug output operator.