VTK
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
50#ifndef vtkArrayCoordinates_h
51#define vtkArrayCoordinates_h
52
53#include "vtkCommonCoreModule.h" // For export macro
54#include "vtkSystemIncludes.h"
55#include <vector>
56
57class VTKCOMMONCORE_EXPORT vtkArrayCoordinates
58{
59public:
62
68
73
78
83
88
94 void SetDimensions(DimensionT dimensions);
95
100
105
110
115
119 bool operator==(const vtkArrayCoordinates& rhs) const;
120
122
125 bool operator!=(const vtkArrayCoordinates& rhs) const;
126 VTKCOMMONCORE_EXPORT friend ostream& operator<<(
127 ostream& stream, const vtkArrayCoordinates& rhs);
129
130private:
131
132 std::vector<CoordinateT> Storage;
133
134};
135
136#endif
137
138// VTK-HeaderTest-Exclude: vtkArrayCoordinates.h
Stores coordinate into an N-way array.
void SetDimensions(DimensionT dimensions)
Set the number of dimensions.
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.
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)
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:287