VTK
dox/Common/vtkArrayCoordinates.h
Go to the documentation of this file.
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 "vtkSystemIncludes.h"
00053 #include <vector>
00054 
00055 class VTK_COMMON_EXPORT vtkArrayCoordinates
00056 {
00057 public:
00058   typedef vtkIdType CoordinateT;
00059   typedef vtkIdType DimensionT;
00060 
00063   vtkArrayCoordinates();
00064 
00066   explicit vtkArrayCoordinates(CoordinateT i);
00067 
00069   vtkArrayCoordinates(CoordinateT i, CoordinateT j);
00070 
00072   vtkArrayCoordinates(CoordinateT i, CoordinateT j, CoordinateT k);
00073 
00075   DimensionT GetDimensions() const;
00076 
00080   void SetDimensions(DimensionT dimensions);
00081 
00083   CoordinateT& operator[](DimensionT i);
00084 
00086   const CoordinateT& operator[](DimensionT i) const;
00087 
00089   CoordinateT GetCoordinate(DimensionT i) const;
00090 
00092   void SetCoordinate(DimensionT i, const CoordinateT&);
00093 
00095   bool operator==(const vtkArrayCoordinates& rhs) const;
00096 
00098 
00099   bool operator!=(const vtkArrayCoordinates& rhs) const;
00100   VTK_COMMON_EXPORT friend ostream& operator<<(
00101     ostream& stream, const vtkArrayCoordinates& rhs);
00103 
00104 private:
00105   //BTX
00106   std::vector<CoordinateT> Storage;
00107   //ETX
00108 };
00109 
00110 #endif
00111