VTK
9.4.20241217
|
Stores coordinate into an N-way array. More...
#include <vtkArrayCoordinates.h>
Public Types | |
typedef vtkIdType | CoordinateT |
typedef vtkIdType | DimensionT |
Public Member Functions | |
vtkArrayCoordinates () | |
Create an empty set of coordinates. | |
vtkArrayCoordinates (CoordinateT i) | |
Create coordinates for a one-dimensional array. | |
vtkArrayCoordinates (CoordinateT i, CoordinateT j) | |
Create coordinates for a two-dimensional array. | |
vtkArrayCoordinates (CoordinateT i, CoordinateT j, CoordinateT k) | |
Create coordinates for a three-dimensional array. | |
DimensionT | GetDimensions () const |
Return the number of dimensions contained in the coordinates. | |
void | SetDimensions (DimensionT dimensions) |
Set the number of dimensions. | |
CoordinateT & | operator[] (DimensionT i) |
Returns the coordinate of the i-th dimension. | |
const CoordinateT & | operator[] (DimensionT i) const |
Returns the coordinate of the i-th dimension. | |
CoordinateT | GetCoordinate (DimensionT i) const |
Returns the coordinate of the i-th dimension. | |
void | SetCoordinate (DimensionT i, const CoordinateT &) |
Sets the coordinate of the i-th dimension. | |
bool | operator== (const vtkArrayCoordinates &rhs) const |
Equality comparison. | |
bool | operator!= (const vtkArrayCoordinates &rhs) const |
Inequality comparison. | |
VTKCOMMONCORE_EXPORT friend ostream & | operator<< (ostream &stream, const vtkArrayCoordinates &rhs) |
Inequality comparison. | |
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.
Definition at line 38 of file vtkArrayCoordinates.h.
Definition at line 41 of file vtkArrayCoordinates.h.
Definition at line 42 of file vtkArrayCoordinates.h.
vtkArrayCoordinates::vtkArrayCoordinates | ( | ) |
Create an empty set of coordinates.
Use SetDimensions() and operator[] to populate the coordinates.
|
explicit |
Create coordinates for a one-dimensional array.
vtkArrayCoordinates::vtkArrayCoordinates | ( | CoordinateT | i, |
CoordinateT | j | ||
) |
Create coordinates for a two-dimensional array.
vtkArrayCoordinates::vtkArrayCoordinates | ( | CoordinateT | i, |
CoordinateT | j, | ||
CoordinateT | k | ||
) |
Create coordinates for a three-dimensional array.
DimensionT vtkArrayCoordinates::GetDimensions | ( | ) | const |
Return the number of dimensions contained in the coordinates.
void vtkArrayCoordinates::SetDimensions | ( | DimensionT | 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().
CoordinateT & vtkArrayCoordinates::operator[] | ( | DimensionT | i | ) |
Returns the coordinate of the i-th dimension.
const CoordinateT & vtkArrayCoordinates::operator[] | ( | DimensionT | i | ) | const |
Returns the coordinate of the i-th dimension.
CoordinateT vtkArrayCoordinates::GetCoordinate | ( | DimensionT | i | ) | const |
Returns the coordinate of the i-th dimension.
void vtkArrayCoordinates::SetCoordinate | ( | DimensionT | i, |
const CoordinateT & | |||
) |
Sets the coordinate of the i-th dimension.
bool vtkArrayCoordinates::operator== | ( | const vtkArrayCoordinates & | rhs | ) | const |
Equality comparison.
bool vtkArrayCoordinates::operator!= | ( | const vtkArrayCoordinates & | rhs | ) | const |
Inequality comparison.
|
friend |
Inequality comparison.