Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

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 =========================================================================*/
00035 #ifndef __vtkStructuredData_h
00036 #define __vtkStructuredData_h
00037 
00038 #include "vtkObject.h"
00039 
00040 class vtkIdList;
00041 
00042 #define VTK_UNCHANGED 0
00043 #define VTK_SINGLE_POINT 1
00044 #define VTK_X_LINE 2
00045 #define VTK_Y_LINE 3
00046 #define VTK_Z_LINE 4
00047 #define VTK_XY_PLANE 5
00048 #define VTK_YZ_PLANE 6
00049 #define VTK_XZ_PLANE 7
00050 #define VTK_XYZ_GRID 8
00051 #define VTK_EMPTY 9
00052 
00053 class VTK_COMMON_EXPORT vtkStructuredData : public vtkObject 
00054 {
00055 public:
00056   vtkTypeRevisionMacro(vtkStructuredData,vtkObject);
00057 
00059 
00064   static int SetDimensions(int inDim[3], int dim[3]);
00065   static int SetExtent(int inExt[6], int ext[6]);
00067 
00069   static int GetDataDimension(int dataDescription);
00070 
00072 
00073   static void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds, 
00074                             int dataDescription, int dim[3]);
00076 
00078   static void GetPointCells(vtkIdType ptId, vtkIdList *cellIds, int dim[3]);
00079 
00081 
00083   static void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, 
00084                                vtkIdList *cellIds, int dim[3]);
00086 
00088 
00090   static vtkIdType ComputePointId(int dim[3], int ijk[3]) {
00091     return ijk[2]*dim[0]*dim[1] + ijk[1]*dim[0] + ijk[0];}
00093 
00095 
00097   static vtkIdType ComputeCellId(int dim[3], int ijk[3]) {
00098     return ijk[2]*(dim[0]-1)*(dim[1]-1) + ijk[1]*(dim[0]-1) + ijk[0];};
00100 
00101 protected:
00102   vtkStructuredData() {};
00103   ~vtkStructuredData() {};
00104   
00105 private:
00106   vtkStructuredData(const vtkStructuredData&);  // Not implemented.
00107   void operator=(const vtkStructuredData&);  // Not implemented.
00108 };
00109 
00110 
00111 #endif
00112