#include <vtkArrayExtents.h>
vtkArrayExtents describes the number of dimensions and size along each dimension of an N-way collection of values. It is used to retrieve and update the extents of a vtkArray object.
Convenience constructors are provided for creating extents along one, two, and three dimensions. For higher dimensions, you can:
Use the static Uniform() factory method to create extents that have the same size along an arbitrary number of dimensions.
Use the default constructor and the Append() method to "grow" your extents to the correct number of dimensions.
Use the default constructuor, SetDimensions() and operator[] to assign a size along each dimension.
Definition at line 61 of file vtkArrayExtents.h.
Public Member Functions | |
vtkArrayExtents () | |
vtkArrayExtents (vtkIdType i) | |
vtkArrayExtents (vtkIdType i, vtkIdType j) | |
vtkArrayExtents (vtkIdType i, vtkIdType j, vtkIdType k) | |
void | Append (vtkIdType extent) |
vtkIdType | GetDimensions () const |
vtkIdType | GetSize () const |
void | SetDimensions (vtkIdType dimensions) |
vtkIdType & | operator[] (vtkIdType i) |
const vtkIdType & | operator[] (vtkIdType i) const |
bool | operator== (const vtkArrayExtents &rhs) const |
bool | operator!= (const vtkArrayExtents &rhs) const |
bool | Contains (const vtkArrayCoordinates &coordinates) const |
Static Public Member Functions | |
static const vtkArrayExtents | Uniform (vtkIdType n, vtkIdType m) |
Friends | |
VTK_COMMON_EXPORT friend ostream & | operator<< (ostream &stream, const vtkArrayExtents &rhs) |
vtkArrayExtents::vtkArrayExtents | ( | ) |
Create zero-dimensional extents.
vtkArrayExtents::vtkArrayExtents | ( | vtkIdType | i | ) | [explicit] |
Create one-dimensional extents.
Create three-dimensional extents.
static const vtkArrayExtents vtkArrayExtents::Uniform | ( | vtkIdType | n, | |
vtkIdType | m | |||
) | [static] |
Create n-dimensional extents with size m along each dimension.
void vtkArrayExtents::Append | ( | vtkIdType | extent | ) |
Grow the number of dimensions by one, specifying the extent of the new dimension.
vtkIdType vtkArrayExtents::GetDimensions | ( | ) | const |
Return the current number of dimensions.
vtkIdType vtkArrayExtents::GetSize | ( | ) | const |
Return the number of values that *could* be stored using the current extents. This is equal to the product of the extents along each dimension.
void vtkArrayExtents::SetDimensions | ( | vtkIdType | dimensions | ) |
Set the current number of dimensions. Note that this method resets the extent along each dimension to zero, so you must assign each dimension's extent explicitly using operator[] after calling SetDimensions().
Accesses the extent of the i-th dimension.
bool vtkArrayExtents::operator== | ( | const vtkArrayExtents & | rhs | ) | const |
Equality comparison
bool vtkArrayExtents::operator!= | ( | const vtkArrayExtents & | rhs | ) | const |
Inequality comparison
bool vtkArrayExtents::Contains | ( | const vtkArrayCoordinates & | coordinates | ) | const |
Returns true if the given array coordinates are completely contained by the current extents (i.e. that 0 <= coordinate and coordinate < extent along every dimension). Returns false if the array coordinates are outside the current extents, or contain a different number of dimensions.
VTK_COMMON_EXPORT friend ostream& operator<< | ( | ostream & | stream, | |
const vtkArrayExtents & | rhs | |||
) | [friend] |