#include <index3D.h>
Public Member Functions | |
Index3D () | |
The default constructor initializes to (0, 0, 0). | |
Index3D (int slice, int row, int column) | |
This constructor explicitly sets the indices. | |
Index3D (const Index3D &other) | |
The copy constructor deep copies its argument. | |
~Index3D () | |
The destructor destroys the Index3D instance. | |
void | setValue (int slice, int row, int column) |
This member function explicitly sets the sets the indices. | |
int | getColumn () const |
This member function returns the first component of the Index3D by value. | |
int | getRow () const |
This member function returns the second component of the Index3D by value. | |
int | getSlice () const |
This member function returns the third component of the Index3D by value. | |
int | getU () const |
This member function returns the first component of the Index3D by value. | |
int | getV () const |
This member function returns the second component of the Index3D by value. | |
int | getW () const |
This member function returns the third component of the Index3D by value. | |
Index3D & | operator= (const Index3D &other) |
The assignment operator deep copies its argument. | |
int | operator[] (size_t index) const |
The indexing operator returns a reference to the U, V, or W component of *this as if *this were a three element array. | |
Index3D & | operator*= (int scalar) |
This operator multiplies each component of the Index3D instance by a scalar. | |
Index3D & | operator/= (int scalar) |
This operator divides each component of the Index3D instance by a scalar. | |
Index3D & | operator+= (const Index3D &other) |
This operator adds a scalar to each component of the Index3D instance. | |
Index3D & | operator-= (const Index3D &other) |
This operator subtracts a scalar from each component of the Index3D instance. | |
Index3D | operator- () |
This operator returns an Index3D equal to *this, but with each element negated. |
By convention, we refer to these coordinates as (U, V, W). We also refer to slice, row, and column, where column == U, row == V, and slice == W.
Definition at line 31 of file index3D.h.
dlr::numeric::Index3D::Index3D | ( | ) | [inline] |
The default constructor initializes to (0, 0, 0).
Definition at line 37 of file index3D.h.
Referenced by operator-().
dlr::numeric::Index3D::Index3D | ( | int | slice, | |
int | row, | |||
int | column | |||
) | [inline] |
dlr::numeric::Index3D::Index3D | ( | const Index3D & | other | ) | [inline] |
dlr::numeric::Index3D::~Index3D | ( | ) | [inline] |
int dlr::numeric::Index3D::getColumn | ( | ) | const [inline] |
This member function returns the first component of the Index3D by value.
Definition at line 91 of file index3D.h.
Referenced by getU(), dlr::numeric::operator*(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), dlr::numeric::operator==(), and operator[]().
int dlr::numeric::Index3D::getRow | ( | ) | const [inline] |
This member function returns the second component of the Index3D by value.
Definition at line 100 of file index3D.h.
Referenced by getV(), dlr::numeric::operator*(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), dlr::numeric::operator==(), and operator[]().
int dlr::numeric::Index3D::getSlice | ( | ) | const [inline] |
This member function returns the third component of the Index3D by value.
Definition at line 109 of file index3D.h.
Referenced by getW(), dlr::numeric::operator*(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), dlr::numeric::operator==(), and operator[]().
int dlr::numeric::Index3D::getU | ( | ) | const [inline] |
This member function returns the first component of the Index3D by value.
It is a synonym for member function getColumn().
Definition at line 118 of file index3D.h.
References getColumn().
int dlr::numeric::Index3D::getV | ( | ) | const [inline] |
int dlr::numeric::Index3D::getW | ( | ) | const [inline] |
This member function returns the third component of the Index3D by value.
It is a synonym for member function getSlice().
Definition at line 137 of file index3D.h.
References getSlice().
Index3D& dlr::numeric::Index3D::operator*= | ( | int | scalar | ) | [inline] |
Index3D dlr::numeric::Index3D::operator- | ( | ) | [inline] |
Index3D& dlr::numeric::Index3D::operator/= | ( | int | scalar | ) | [inline] |
The assignment operator deep copies its argument.
other | This argument is the Index3D instance to be copied. |
Definition at line 149 of file index3D.h.
References m_column, m_row, m_slice, and setValue().
int dlr::numeric::Index3D::operator[] | ( | size_t | index | ) | const [inline] |
The indexing operator returns a reference to the U, V, or W component of *this as if *this were a three element array.
Out of bounds indices will return the W component.
index | This argument is the index into *this. |
Definition at line 166 of file index3D.h.
References getColumn(), getRow(), and getSlice().
void dlr::numeric::Index3D::setValue | ( | int | slice, | |
int | row, | |||
int | column | |||
) | [inline] |
This member function explicitly sets the sets the indices.
slice | The third (W) component of the Index3D. | |
row | The second (U) component of the Index3D. | |
column | The first (U) component of the Index3D. |
Definition at line 80 of file index3D.h.
Referenced by operator=(), and dlr::numeric::operator>>().