Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Common/vtkStructuredData.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00039 #ifndef __vtkStructuredData_h
00040 #define __vtkStructuredData_h
00041
00042 #include "vtkObject.h"
00043
00044 class vtkIdList;
00045
00046 #define VTK_UNCHANGED 0
00047 #define VTK_SINGLE_POINT 1
00048 #define VTK_X_LINE 2
00049 #define VTK_Y_LINE 3
00050 #define VTK_Z_LINE 4
00051 #define VTK_XY_PLANE 5
00052 #define VTK_YZ_PLANE 6
00053 #define VTK_XZ_PLANE 7
00054 #define VTK_XYZ_GRID 8
00055 #define VTK_EMPTY 9
00056
00057 class VTK_COMMON_EXPORT vtkStructuredData : public vtkObject
00058 {
00059 public:
00060 vtkTypeRevisionMacro(vtkStructuredData,vtkObject);
00061
00063
00068 static int SetDimensions(int inDim[3], int dim[3]);
00069 static int SetExtent(int inExt[6], int ext[6]);
00071
00073 static int GetDataDimension(int dataDescription);
00074
00076
00077 static void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds,
00078 int dataDescription, int dim[3]);
00080
00082 static void GetPointCells(vtkIdType ptId, vtkIdList *cellIds, int dim[3]);
00083
00085
00087 static void GetCellNeigbors(vtkIdType cellId, vtkIdList *ptIds,
00088 vtkIdList *cellIds, int dim[3]);
00090
00092
00094 static vtkIdType ComputePointId(int dim[3], int ijk[3]) {
00095 return ijk[2]*dim[0]*dim[1] + ijk[1]*dim[0] + ijk[0];}
00097
00099
00101 static vtkIdType ComputeCellId(int dim[3], int ijk[3]) {
00102 return ijk[2]*(dim[0]-1)*(dim[1]-1) + ijk[1]*(dim[0]-1) + ijk[0];};
00104
00105 protected:
00106 vtkStructuredData() {};
00107 ~vtkStructuredData() {};
00108
00109 private:
00110 vtkStructuredData(const vtkStructuredData&);
00111 void operator=(const vtkStructuredData&);
00112 };
00113
00114
00115 #endif
00116