#include <matrixUtil.h>

Public Types | |
| typedef MatrixSlice< const T, I > | Const |
| the class is convertible to Const type | |
Public Member Functions | |
| MatrixSlice () | |
| Initializes an empty slice. | |
| operator Const () const | |
| Converts to a matrix of constant objects (shallow copy). | |
| T * | operator[] (I column) |
| Indexing operator - returns pointer to a column. | |
| const T * | operator[] (I column) const |
| Const version of indexing operator - doesn't allow to change the elements. | |
| void | allocate (I width, I height, T *memory=0) |
| Reallocates the matrix for a new size. | |
| void | free () |
| Releases the memory. | |
| bool | isValid () const |
| Returns whether the matrix is allocated (and thus usable for indexing). | |
| void | fillSubMatrix (const Block &block, T value) |
| Fills a submatrix of a valid matrix with a value. | |
| MatrixSlice & | shiftMatrix (I x0, I y0) |
| Shifts the indexing of this matrix - dangerous. | |
| void | getPosition (const T *elem, int &x, int &y) const |
Computes relative position of a pointer in the matrix (always 0 <= y < colSkip). | |
Static Public Member Functions | |
| static MatrixSlice | makeRaw (T *start, I colSkip) |
| Creates an instance with pre-filled member fields. | |
Public Attributes | |
| T * | start |
| pointer to the top-left pixel | |
| I | colSkip |
| how many pixels to skip to get in the next column | |
Definition at line 24 of file matrixUtil.h.
| void MatrixSlice< T, I >::allocate | ( | I | width, | |
| I | height, | |||
| T * | memory = 0 | |||
| ) | [inline] |
Reallocates the matrix for a new size.
If memory parameter is given, it is used for storage (the user is responsible that the matrix fits in it, etc.)
Definition at line 61 of file matrixUtil.h.
| MatrixSlice& MatrixSlice< T, I >::shiftMatrix | ( | I | x0, | |
| I | y0 | |||
| ) | [inline] |
Shifts the indexing of this matrix - dangerous.
After calling this, only addressing or more shifts can be done (not checked). Also shifts out of the allocated matrix aren't detected
Definition at line 90 of file matrixUtil.h.
1.5.8