VTK: Common/Core/vtkArrayCoordinates.h Source File

| VTK 9.3.1

vtkArrayCoordinates.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4
30 #ifndef vtkArrayCoordinates_h
31 #define vtkArrayCoordinates_h
32
33 #include "vtkCommonCoreModule.h" // For export macro
34 #include "vtkSystemIncludes.h"
35 #include <vector>
36
37 VTK_ABI_NAMESPACE_BEGIN
38 class VTKCOMMONCORE_EXPORT vtkArrayCoordinates
39 {
40 public:
41 typedef vtkIdType CoordinateT;
42 typedef vtkIdType DimensionT;
43
48 vtkArrayCoordinates();
49
53 explicit vtkArrayCoordinates(CoordinateT i);
54
58 vtkArrayCoordinates(CoordinateT i, CoordinateT j);
59
63 vtkArrayCoordinates(CoordinateT i, CoordinateT j, CoordinateT k);
64
68 DimensionT GetDimensions() const;
69
75 void SetDimensions(DimensionT dimensions);
76
80 CoordinateT& operator[](DimensionT i);
81
85 const CoordinateT& operator[](DimensionT i) const;
86
90 CoordinateT GetCoordinate(DimensionT i) const;
91
95 void SetCoordinate(DimensionT i, const CoordinateT&);
96
100 bool operator==(const vtkArrayCoordinates& rhs) const;
101
103
106 bool operator!=(const vtkArrayCoordinates& rhs) const;
107 VTKCOMMONCORE_EXPORT friend ostream& operator<<(ostream& stream, const vtkArrayCoordinates& rhs);
109
110 private:
111 std::vector<CoordinateT> Storage;
112 };
113
114 VTK_ABI_NAMESPACE_END
115 #endif
116
117 // VTK-HeaderTest-Exclude: vtkArrayCoordinates.h
vtkArrayCoordinates
Stores coordinate into an N-way array.
Definition: vtkArrayCoordinates.h:39
vtkArrayCoordinates::SetDimensions
void SetDimensions(DimensionT dimensions)
Set the number of dimensions.
vtkArrayCoordinates::GetCoordinate
CoordinateT GetCoordinate(DimensionT i) const
Returns the coordinate of the i-th dimension.
vtkArrayCoordinates::CoordinateT
vtkIdType CoordinateT
Definition: vtkArrayCoordinates.h:41
vtkArrayCoordinates::vtkArrayCoordinates
vtkArrayCoordinates(CoordinateT i, CoordinateT j)
Create coordinates for a two-dimensional array.
vtkArrayCoordinates::vtkArrayCoordinates
vtkArrayCoordinates()
Create an empty set of coordinates.
vtkArrayCoordinates::operator[]
CoordinateT & operator[](DimensionT i)
Returns the coordinate of the i-th dimension.
vtkArrayCoordinates::operator<<
VTKCOMMONCORE_EXPORT friend ostream & operator<<(ostream &stream, const vtkArrayCoordinates &rhs)
Inequality comparison.
vtkArrayCoordinates::operator[]
const CoordinateT & operator[](DimensionT i) const
Returns the coordinate of the i-th dimension.
vtkArrayCoordinates::DimensionT
vtkIdType DimensionT
Definition: vtkArrayCoordinates.h:42
vtkArrayCoordinates::GetDimensions
DimensionT GetDimensions() const
Return the number of dimensions contained in the coordinates.
vtkArrayCoordinates::operator!=
bool operator!=(const vtkArrayCoordinates &rhs) const
Inequality comparison.
vtkArrayCoordinates::SetCoordinate
void SetCoordinate(DimensionT i, const CoordinateT &)
Sets the coordinate of the i-th dimension.
vtkArrayCoordinates::vtkArrayCoordinates
vtkArrayCoordinates(CoordinateT i)
Create coordinates for a one-dimensional array.
vtkArrayCoordinates::operator==
bool operator==(const vtkArrayCoordinates &rhs) const
Equality comparison.
vtkArrayCoordinates::vtkArrayCoordinates
vtkArrayCoordinates(CoordinateT i, CoordinateT j, CoordinateT k)
Create coordinates for a three-dimensional array.
vtkSystemIncludes.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315