VTK  9.1.0
vtkArrayCoordinates.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkArrayCoordinates.h
5 
6 -------------------------------------------------------------------------
7  Copyright 2008 Sandia Corporation.
8  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9  the U.S. Government retains certain rights in this software.
10 -------------------------------------------------------------------------
11 
12  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
13  All rights reserved.
14  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
15 
16  This software is distributed WITHOUT ANY WARRANTY; without even
17  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18  PURPOSE. See the above copyright notice for more information.
19 
20 =========================================================================*/
21 
44 #ifndef vtkArrayCoordinates_h
45 #define vtkArrayCoordinates_h
46 
47 #include "vtkCommonCoreModule.h" // For export macro
48 #include "vtkSystemIncludes.h"
49 #include <vector>
50 
51 class VTKCOMMONCORE_EXPORT vtkArrayCoordinates
52 {
53 public:
56 
62 
67 
72 
77 
82 
88  void SetDimensions(DimensionT dimensions);
89 
94 
99 
104 
109 
113  bool operator==(const vtkArrayCoordinates& rhs) const;
114 
116 
119  bool operator!=(const vtkArrayCoordinates& rhs) const;
120  VTKCOMMONCORE_EXPORT friend ostream& operator<<(ostream& stream, const vtkArrayCoordinates& rhs);
122 
123 private:
124  std::vector<CoordinateT> Storage;
125 };
126 
127 #endif
128 
129 // VTK-HeaderTest-Exclude: vtkArrayCoordinates.h
Stores coordinate into an N-way array.
void SetDimensions(DimensionT dimensions)
Set the number of dimensions.
CoordinateT GetCoordinate(DimensionT i) const
Returns the coordinate of the i-th dimension.
vtkArrayCoordinates(CoordinateT i, CoordinateT j)
Create coordinates for a two-dimensional array.
vtkArrayCoordinates()
Create an empty set of coordinates.
CoordinateT & operator[](DimensionT i)
Returns the coordinate of the i-th dimension.
VTKCOMMONCORE_EXPORT friend ostream & operator<<(ostream &stream, const vtkArrayCoordinates &rhs)
Inequality comparison.
const CoordinateT & operator[](DimensionT i) const
Returns the coordinate of the i-th dimension.
DimensionT GetDimensions() const
Return the number of dimensions contained in the coordinates.
bool operator!=(const vtkArrayCoordinates &rhs) const
Inequality comparison.
void SetCoordinate(DimensionT i, const CoordinateT &)
Sets the coordinate of the i-th dimension.
vtkArrayCoordinates(CoordinateT i)
Create coordinates for a one-dimensional array.
bool operator==(const vtkArrayCoordinates &rhs) const
Equality comparison.
vtkArrayCoordinates(CoordinateT i, CoordinateT j, CoordinateT k)
Create coordinates for a three-dimensional array.
int vtkIdType
Definition: vtkType.h:332