vtkVector< T, Size > Class Template Reference

#include <vtkVector.h>

Inheritance diagram for vtkVector< T, Size >:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<typename T, int Size>
class vtkVector< T, 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].

Tests:
vtkVector (Tests)

Definition at line 34 of file vtkVector.h.


Public Member Functions

 vtkVector ()
int GetSize () const
operator() (int i) const
T * GetData ()
const T * GetData () const
T & operator[] (int i)
const T & operator[] (int i) const

Protected Attributes

Data [Size]

Constructor & Destructor Documentation

template<typename T, int Size>
vtkVector< T, Size >::vtkVector (  )  [inline]

Definition at line 37 of file vtkVector.h.


Member Function Documentation

template<typename T, int Size>
int vtkVector< T, Size >::GetSize (  )  const [inline]

Get the size of the vtkVector.

Definition at line 46 of file vtkVector.h.

template<typename T, int Size>
T* vtkVector< T, Size >::GetData (  )  [inline]

Get a pointer to the underlying data of the vtkVector.

Definition at line 50 of file vtkVector.h.

template<typename T, int Size>
const T* vtkVector< T, Size >::GetData (  )  const [inline]

Get a pointer to the underlying data of the vtkVector.

Definition at line 51 of file vtkVector.h.

template<typename T, int Size>
T& vtkVector< T, Size >::operator[] ( int  i  )  [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 57 of file vtkVector.h.

template<typename T, int Size>
const T& vtkVector< T, Size >::operator[] ( int  i  )  const [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 58 of file vtkVector.h.

template<typename T, int Size>
T vtkVector< T, Size >::operator() ( int  i  )  const [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 63 of file vtkVector.h.


Member Data Documentation

template<typename T, int Size>
T vtkVector< T, Size >::Data[Size] [protected]

The only thing stored in memory!

Definition at line 67 of file vtkVector.h.


The documentation for this class was generated from the following file:

Generated on Fri Apr 9 18:16:02 2010 for VTK by  doxygen 1.5.6