VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkArrayCoordinates.h 00005 00006 ------------------------------------------------------------------------- 00007 Copyright 2008 Sandia Corporation. 00008 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00009 the U.S. Government retains certain rights in this software. 00010 ------------------------------------------------------------------------- 00011 00012 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00013 All rights reserved. 00014 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00015 00016 This software is distributed WITHOUT ANY WARRANTY; without even 00017 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00018 PURPOSE. See the above copyright notice for more information. 00019 00020 =========================================================================*/ 00021 00049 #ifndef __vtkArrayCoordinates_h 00050 #define __vtkArrayCoordinates_h 00051 00052 #include "vtkCommonCoreModule.h" // For export macro 00053 #include "vtkSystemIncludes.h" 00054 #include <vector> 00055 00056 class VTKCOMMONCORE_EXPORT vtkArrayCoordinates 00057 { 00058 public: 00059 typedef vtkIdType CoordinateT; 00060 typedef vtkIdType DimensionT; 00061 00064 vtkArrayCoordinates(); 00065 00067 explicit vtkArrayCoordinates(CoordinateT i); 00068 00070 vtkArrayCoordinates(CoordinateT i, CoordinateT j); 00071 00073 vtkArrayCoordinates(CoordinateT i, CoordinateT j, CoordinateT k); 00074 00076 DimensionT GetDimensions() const; 00077 00081 void SetDimensions(DimensionT dimensions); 00082 00084 CoordinateT& operator[](DimensionT i); 00085 00087 const CoordinateT& operator[](DimensionT i) const; 00088 00090 CoordinateT GetCoordinate(DimensionT i) const; 00091 00093 void SetCoordinate(DimensionT i, const CoordinateT&); 00094 00096 bool operator==(const vtkArrayCoordinates& rhs) const; 00097 00099 00100 bool operator!=(const vtkArrayCoordinates& rhs) const; 00101 VTKCOMMONCORE_EXPORT friend ostream& operator<<( 00102 ostream& stream, const vtkArrayCoordinates& rhs); 00104 00105 private: 00106 //BTX 00107 std::vector<CoordinateT> Storage; 00108 //ETX 00109 }; 00110 00111 #endif 00112 00113 // VTK-HeaderTest-Exclude: vtkArrayCoordinates.h