00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00024 #ifndef __vtkStructuredData_h
00025 #define __vtkStructuredData_h
00026
00027 #include "vtkObject.h"
00028
00029 class vtkIdList;
00030
00031 #define VTK_UNCHANGED 0
00032 #define VTK_SINGLE_POINT 1
00033 #define VTK_X_LINE 2
00034 #define VTK_Y_LINE 3
00035 #define VTK_Z_LINE 4
00036 #define VTK_XY_PLANE 5
00037 #define VTK_YZ_PLANE 6
00038 #define VTK_XZ_PLANE 7
00039 #define VTK_XYZ_GRID 8
00040 #define VTK_EMPTY 9
00041
00042 class VTK_COMMON_EXPORT vtkStructuredData : public vtkObject
00043 {
00044 public:
00045 vtkTypeRevisionMacro(vtkStructuredData,vtkObject);
00046
00048
00053 static int SetDimensions(int inDim[3], int dim[3]);
00054 static int SetExtent(int inExt[6], int ext[6]);
00056
00058 static int GetDataDimension(int dataDescription);
00059
00061
00062 static void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds,
00063 int dataDescription, int dim[3]);
00065
00067 static void GetPointCells(vtkIdType ptId, vtkIdList *cellIds, int dim[3]);
00068
00070
00072 static void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds,
00073 vtkIdList *cellIds, int dim[3]);
00075
00077
00079 static vtkIdType ComputePointId(int dim[3], int ijk[3]) {
00080 return (ijk[2]*dim[1] + ijk[1])*dim[0] + ijk[0];}
00082
00084
00086 static vtkIdType ComputeCellId(int dim[3], int ijk[3]) {
00087 return (ijk[2]*(dim[1]-1) + ijk[1])*(dim[0]-1) + ijk[0];}
00089
00090 protected:
00091 vtkStructuredData() {};
00092 ~vtkStructuredData() {};
00093
00094 private:
00095 vtkStructuredData(const vtkStructuredData&);
00096 void operator=(const vtkStructuredData&);
00097 };
00098
00099
00100 #endif
00101