|
Rebel Fork Framework
|
2D indexing utilities for row-major 2D array. More...
#include <Urho3D/Container/Array2D.h>
Public Member Functions | |
| ArrayDimensions2D ()=default | |
| Construct default. | |
| ArrayDimensions2D (int width, int height) | |
| Construct with given size. | |
| ArrayDimensions2D (const IntVector2 &size) | |
| Construct with given size as vector (implicitly convertible). | |
| int | GetWidth () const |
| Return width. | |
| int | GetHeight () const |
| Return height. | |
| IntVector2 | GetSize () const |
| Return array size as int vector. | |
| IntRect | GetRect () const |
| Return array dimensions as IntRect. | |
| unsigned | GetCapacity () const |
| Return total number of elements. | |
| bool | Contains (const IntVector2 &index) const |
| Return whether the index is contained in the array. | |
| IntVector2 | ClampIndex (const IntVector2 &index) const |
| Return index clamped to array boundaries. | |
| IntVector2 | WrapIndex (const IntVector2 &index) const |
| Return index wrapped to array boundaries. | |
| unsigned | IndexToOffset (const IntVector2 &index) const |
| Convert 2D array index to linear array index. | |
| IntVector2 | OffsetToIndex (unsigned index) const |
| Convert linear array index to 2D array index. | |
Protected Member Functions | |
| void | SetSize (int width, int height) |
| Set dimensions. | |
| void | Swap (ArrayDimensions2D &other) |
| Swap with other array dimensions. | |
Private Attributes | |
| int | width_ {} |
| Array width. | |
| int | height_ {} |
| Array height. | |
2D indexing utilities for row-major 2D array.