#include <Magnum/Array.h>
template<class T>
Array2D class
Two-dimensional array.
Template parameters | |
---|---|
T | Data type |
Base classes
-
template<UnsignedInt dimensions, class T>class Array<2, T> deprecated in Git master
- Array.
Constructors, destructors, conversion operators
- Array2D() defaulted constexpr
- Default constructor.
- Array2D(T x, T y) constexpr
- Constructor.
-
Array2D(const Math::
Vector2<T>& vector) constexpr - Construct from a vector.
- Array2D(T value) constexpr
- Initializer-list constructor.
- operator Math::Vector2<T>() const
- Convert to a vector.
Public functions
Function documentation
template<class T>
Magnum:: Array2D<T>:: Array2D() defaulted constexpr
Default constructor.
Sets all components to their default-constructed values.
template<class T>
Magnum:: Array2D<T>:: Array2D(T x,
T y) constexpr
Constructor.
Parameters | |
---|---|
x | X component |
y | Y component |
template<class T>
T Magnum:: Array2D<T>:: x() 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:: Array2D<T>:: y() 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>
Debug& operator<<(Debug& debug,
const Array2D<T>& value)
Debug output operator.