VTK
|
templated base type for containers of constant size. More...
#include <vtkTuple.h>
Public Member Functions | |
int | GetSize () const |
vtkTuple () | |
vtkTuple (const T &scalar) | |
vtkTuple (const T *init) | |
T * | GetData () |
const T * | GetData () const |
T & | operator[] (int i) |
const T & | operator[] (int i) const |
T | operator() (int i) const |
bool | Compare (const vtkTuple< T, Size > &other, const T &tol) const |
template<typename TR > | |
vtkTuple< TR, Size > | Cast () const |
Protected Attributes | |
T | Data [Size] |
templated base type for containers of constant size.
This class is a templated data type for storing and manipulating tuples.
Definition at line 29 of file vtkTuple.h.
The default constructor does not initialize values. If initializtion is desired, this should be done explicitly using the constructors for scalar initialization, or other suitable constructors taking arguments.
Definition at line 37 of file vtkTuple.h.
Initialize all of the tuple's elements with the supplied scalar.
Definition at line 44 of file vtkTuple.h.
Initalize the tuple's elements with the elements of the supplied array. Note that the supplied pointer must contain at least as many elements as the tuple, or it will result in access to out of bounds memory.
Definition at line 58 of file vtkTuple.h.
Get the size of the tuple.
Definition at line 68 of file vtkTuple.h.
T* vtkTuple< T, Size >::GetData | ( | ) | [inline] |
Get a pointer to the underlying data of the tuple.
Definition at line 72 of file vtkTuple.h.
const T* vtkTuple< T, Size >::GetData | ( | ) | const [inline] |
Get a pointer to the underlying data of the tuple.
Definition at line 73 of file vtkTuple.h.
Get a reference to the underlying data element of the tuple. This works similarly to the way C++ STL containers work. No bounds checking is performed.
Definition at line 80 of file vtkTuple.h.
Get a reference to the underlying data element of the tuple. This works similarly to the way C++ STL containers work. No bounds checking is performed.
Definition at line 81 of file vtkTuple.h.
Get the value of the tuple at the index specifed. Does bounds checking, similar to the at(i) method of C++ STL containers, but only when the code is compiled in debug mode.
Definition at line 88 of file vtkTuple.h.
bool vtkTuple< T, Size >::Compare | ( | const vtkTuple< T, Size > & | other, |
const T & | tol | ||
) | const [inline] |
Equality operator with a tolerance to allow fuzzy comparisons.
Definition at line 97 of file vtkTuple.h.
vtkTuple<TR, Size> vtkTuple< T, Size >::Cast | ( | ) | const [inline] |
Cast the tuple to the specified type, returning the result.
Reimplemented in vtkVector< T, Size >, vtkVector< T, 3 >, vtkVector< T, 2 >, vtkVector< double, 4 >, vtkVector< double, 3 >, vtkVector< double, 2 >, vtkVector< float, 4 >, vtkVector< int, 4 >, vtkVector< float, 3 >, vtkVector< int, 3 >, vtkVector< float, 2 >, vtkVector< int, 2 >, and vtkVector< T, 4 >.
Definition at line 117 of file vtkTuple.h.
The only thing stored in memory!
Definition at line 131 of file vtkTuple.h.