Public Member Functions

vtkArrayCoordinates Class Reference

Stores coordinate into an N-way array. More...

#include <vtkArrayCoordinates.h>

List of all members.

Public Member Functions

 vtkArrayCoordinates ()
 vtkArrayCoordinates (vtkIdType i)
 vtkArrayCoordinates (vtkIdType i, vtkIdType j)
 vtkArrayCoordinates (vtkIdType i, vtkIdType j, vtkIdType k)
vtkIdType GetDimensions () const
void SetDimensions (vtkIdType dimensions)
vtkIdTypeoperator[] (vtkIdType i)
const vtkIdTypeoperator[] (vtkIdType i) const
bool operator== (const vtkArrayCoordinates &rhs) const



bool operator!= (const vtkArrayCoordinates &rhs) const
VTK_COMMON_EXPORT friend ostream & operator<< (ostream &stream, const vtkArrayCoordinates &rhs)

Detailed Description

Stores coordinate into an N-way array.

vtkArrayCoordinates stores a collection of coordinates that can be used to access values in a vtkArray containing an arbitrary number of dimensions.

Convenience constructors are provided for working with one, two, and three dimensions. For higher dimensions, use the default constructor, SetDimensions() and operator[] to assign a coordinate value along each dimension.

See also:
vtkArray, vtkArrayExtents
Thanks:
Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National Laboratories.
Tests:
vtkArrayCoordinates (Tests)

Definition at line 50 of file vtkArrayCoordinates.h.


Constructor & Destructor Documentation

vtkArrayCoordinates::vtkArrayCoordinates (  ) 

Create an empty set of coordinates. Use SetDimensions() and operator[] to populate the coordinates.

vtkArrayCoordinates::vtkArrayCoordinates ( vtkIdType  i  )  [explicit]

Create coordinates for a one-dimensional array.

vtkArrayCoordinates::vtkArrayCoordinates ( vtkIdType  i,
vtkIdType  j 
)

Create coordinates for a two-dimensional array.

vtkArrayCoordinates::vtkArrayCoordinates ( vtkIdType  i,
vtkIdType  j,
vtkIdType  k 
)

Create coordinates for a three-dimensional array.


Member Function Documentation

vtkIdType vtkArrayCoordinates::GetDimensions (  )  const

Return the number of dimensions contained in the coordinates.

void vtkArrayCoordinates::SetDimensions ( vtkIdType  dimensions  ) 

Set the number of dimensions. Note that this method resets the coordinate along each dimension to zero, so you must set every coordinate explicitly using operator[] after calling SetDimensions().

vtkIdType& vtkArrayCoordinates::operator[] ( vtkIdType  i  ) 

Returns the index of the i-th dimension.

const vtkIdType& vtkArrayCoordinates::operator[] ( vtkIdType  i  )  const

Returns the index of the i-th dimension.

bool vtkArrayCoordinates::operator== ( const vtkArrayCoordinates rhs  )  const

Equality comparison

bool vtkArrayCoordinates::operator!= ( const vtkArrayCoordinates rhs  )  const

Inequality comparison


Friends And Related Function Documentation

VTK_COMMON_EXPORT friend ostream& operator<< ( ostream &  stream,
const vtkArrayCoordinates rhs 
) [friend]

Inequality comparison


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