|
| Packed3DArray (int dim1=2, int dim2=2, int dim3=2, const T *initBuf=nullptr) |
|
| Packed3DArray (const Packed3DArray< T > &t3da) |
|
virtual | ~Packed3DArray () |
|
const T * | getData () const |
|
T | getDataElement (int i1, int i2, int i3) const |
|
const T * | getDataElementLoc (int i1, int i2, int i3) const |
|
int | getDim1 () const |
|
int | getDim2 () const |
|
int | getDim3 () const |
|
T * | getModifiableData () |
|
int | getTotalNumberElements () const |
|
void | setDataElement (int i1, int i2, int i3, const T &elem) |
|
Default constructor and a constructor that takes explicit dimensions.
- Parameters
-
dim1 | the first dimension |
dim2 | the second dimension |
dim3 | the third dimension |
initBuf | if non-null, populate the buffer with this initial data |
The copy constructor.
- Parameters
-
Returns a pointer to the actual internal array for read-only access
- Returns
- a read-only pointer to the start of the actual internal array
Return an element at a specific location
- Parameters
-
i1 | the first index |
i2 | the second index |
i3 | the third index |
- Returns
- the element at the given location, if [i1][i2][i3] represents a valid array access. Otherwise returns an "out of bounds" value.
- See also
- setOutOfBoundsValue
Return a pointer to the item in the internal array at the given location
- Parameters
-
i1 | the first index |
i2 | the second index |
i3 | the third index |
- Returns
- a pointer into the internal array to the actual element, if [i1][i2][i3] represents a valid array access. nullptr otherwise.
Return the first array dimension
- Returns
- the first dimension
Return the second array dimension
- Returns
- the second dimension
Return the third array dimension
- Returns
- the third dimension
Return a pointer to the actual internal array for RW access
- Returns
- a RW pointer to the start of the actual internal array
Return the total number of elements in this array
- Returns
- the total number of elements computed as the product of the three dimensions
Set a specific element of the array. If the indices are not valid, no change is made to the array.
- Parameters
-
i1 | the first index |
i2 | the second index |
i3 | the third index |
Specify whether errors such as invalid array accesses are reported to the console. By default, they are reported.
Specify a specific value to be returned by getDataElement if invalid array indices are provided.
The documentation for this class was generated from the following file: