• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Common/vtkStructuredData.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkStructuredData.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00026 #ifndef __vtkStructuredData_h
00027 #define __vtkStructuredData_h
00028 
00029 #include "vtkObject.h"
00030 
00031 class vtkIdList;
00032 
00033 #define VTK_UNCHANGED 0
00034 #define VTK_SINGLE_POINT 1
00035 #define VTK_X_LINE 2
00036 #define VTK_Y_LINE 3
00037 #define VTK_Z_LINE 4
00038 #define VTK_XY_PLANE 5
00039 #define VTK_YZ_PLANE 6
00040 #define VTK_XZ_PLANE 7
00041 #define VTK_XYZ_GRID 8
00042 #define VTK_EMPTY 9
00043 
00044 class VTK_COMMON_EXPORT vtkStructuredData : public vtkObject
00045 {
00046 public:
00047   vtkTypeRevisionMacro(vtkStructuredData,vtkObject);
00048 
00050 
00055   static int SetDimensions(int inDim[3], int dim[3]);
00056   static int SetExtent(int inExt[6], int ext[6]);
00058 
00061   static int GetDataDescription(int dims[3]);
00062 
00064   static int GetDataDimension(int dataDescription);
00065 
00067 
00068   static void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds,
00069                             int dataDescription, int dim[3]);
00071 
00073   static void GetPointCells(vtkIdType ptId, vtkIdList *cellIds, int dim[3]);
00074 
00076 
00078   static void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds,
00079                                vtkIdList *cellIds, int dim[3]);
00081 
00083 
00085   static vtkIdType ComputePointId(int dim[3], int ijk[3]) {
00086     return (ijk[2]*static_cast<vtkIdType>(dim[1]) + ijk[1])*dim[0] + ijk[0];}
00088 
00090 
00092   static vtkIdType ComputeCellId(int dim[3], int ijk[3]) {
00093     return (ijk[2]*static_cast<vtkIdType>(dim[1]-1) + ijk[1])*(dim[0]-1) + ijk[0];}
00095 
00096 protected:
00097   vtkStructuredData() {};
00098   ~vtkStructuredData() {};
00099 
00100 private:
00101   vtkStructuredData(const vtkStructuredData&);  // Not implemented.
00102   void operator=(const vtkStructuredData&);  // Not implemented.
00103 };
00104 
00105 
00106 #endif
00107 

Generated by  doxygen 1.7.1