VTK
|
templated base type for storage of vectors. More...
#include <vtkVector.h>
Public Member Functions | |
vtkVector () | |
vtkVector (const T *init) | |
int | GetSize () const |
T | operator() (int i) const |
T * | GetData () |
const T * | GetData () const |
T & | operator[] (int i) |
const T & | operator[] (int i) const |
template<typename TR > | |
vtkVector< TR, Size > | Cast () const |
Protected Attributes | |
T | Data [Size] |
templated base type for storage of vectors.
This class is a templated data type for storing and manipulating fixed size vectors, which can be used to represent two and three dimensional points. The memory layout is a contiguous array of the specified type, such that a float[2] can be cast to a vtkVector2f and manipulated. Also a float[6] could be cast and used as a vtkVector2f[3].
Definition at line 34 of file vtkVector.h.
Definition at line 37 of file vtkVector.h.
Definition at line 45 of file vtkVector.h.
|
inline |
Get the size of the vtkVector.
Definition at line 54 of file vtkVector.h.
|
inline |
Get a pointer to the underlying data of the vtkVector.
Definition at line 58 of file vtkVector.h.
|
inline |
Get a pointer to the underlying data of the vtkVector.
Definition at line 59 of file vtkVector.h.
|
inline |
Get a reference to the underlying data element of the vtkVector. Can be used in much the same way as vector[i] is used.
Definition at line 65 of file vtkVector.h.
|
inline |
Get a reference to the underlying data element of the vtkVector. Can be used in much the same way as vector[i] is used.
Definition at line 66 of file vtkVector.h.
|
inline |
Get the value of the vector at the index speciifed. Does bounds checking, used in much the same way as vector.at(i) is used.
Definition at line 71 of file vtkVector.h.
|
inline |
Cast the vector to the specified type, returning the result.
Definition at line 76 of file vtkVector.h.
|
protected |
The only thing stored in memory!
Definition at line 90 of file vtkVector.h.