Radium Engine
1.5.20
|
A vector of signed offsets. More...
#include <Core/Containers/Grid.hpp>
Public Member Functions | |
Iterator (const IdxVector &size, uint startIdx=0) | |
Constructor from size and linear index. | |
Iterator (const IdxVector &size, const IdxVector &startIdx) | |
Constructor from size and vector index. | |
Iterator (const Grid< T, D > &grid, uint startIdx=0) | |
Constructor from grid and linear index. | |
Iterator (const Grid< T, D > &grid, const IdxVector &startIdx) | |
Constructor from grid and vector index. | |
Iterator (const Iterator &other)=default | |
Default copy constructor and assignment operator. | |
Iterator & | operator= (const Iterator &other)=default |
template<typename T2 > | |
Grid< T2, D >::Iterator | cast () const |
Cast to the an iterator in a different type grid. | |
void | setFromLinear (uint idx) |
Set an existing iterator to a linear index value. | |
void | setFromVector (const IdxVector &idx) |
Set an existing iterator to a vector index value. | |
uint | getLinear () const |
Get the current linear index. | |
IdxVector | getVector () const |
Get the current vector index. | |
const IdxVector & | getGridSize () const |
Get the associated grid size. | |
bool | isOut () const |
Returns true if the current index is out of the grid. | |
bool | isIn () const |
Returns true if the current index is inside the grid. | |
Iterator & | operator++ () |
Advance the iterator to the next-element. | |
Iterator | operator++ (int) |
Iterator & | operator-- () |
Move the iterator back to the previous element. | |
Iterator | operator-- (int) |
Iterator & | operator+= (uint i) |
Advance the iterator with an offset of i elements. | |
Iterator & | operator-= (uint i) |
Rewind the iterator with an offset of i elements. | |
Iterator & | operator+= (const IdxVector &idx) |
Iterator & | operator-= (const IdxVector &idx) |
Iterator & | operator+= (const OffsetVector &idx) |
bool | isValidOffset (const OffsetVector &idx) |
bool | operator== (const Iterator &other) const |
bool | operator< (const Iterator &other) const |
bool | operator!= (const Iterator &rhs) const |
bool | operator> (const Iterator &rhs) const |
bool | operator<= (const Iterator &rhs) const |
bool | operator>= (const Iterator &rhs) const |
Friends | |
Iterator | operator+ (const Iterator &it, uint i) |
Iterator | operator- (const Iterator &it, uint i) |
Iterator | operator+ (const Iterator &it, const IdxVector &idx) |
Iterator | operator- (const Iterator &it, const IdxVector &idx) |
Iterator | operator+ (const Iterator &it, const OffsetVector &idx) |
A vector of signed offsets.
This class implements an iterator though elements of the grid that can be referenced with a linear index or a D-dimensional uint vector.
|
inlineexplicit |
Grid< T2, D >::Iterator Ra::Core::Grid< T, D >::Iterator::cast | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool Ra::Core::Grid< T, D >::Iterator::isValidOffset | ( | const OffsetVector & | idx | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |