00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00024 #ifndef __vtkHyperOctreeCursor_h
00025 #define __vtkHyperOctreeCursor_h
00026
00027 #include "vtkObject.h"
00028
00029 enum
00030 {
00031 VTK_OCTREE_CHILD_ZMIN_YMIN_XMIN=0,
00032 VTK_OCTREE_CHILD_ZMIN_YMIN_XMAX,
00033 VTK_OCTREE_CHILD_ZMIN_YMAX_XMIN,
00034 VTK_OCTREE_CHILD_ZMIN_YMAX_XMAX,
00035 VTK_OCTREE_CHILD_ZMAX_YMIN_XMIN,
00036 VTK_OCTREE_CHILD_ZMAX_YMIN_XMAX,
00037 VTK_OCTREE_CHILD_ZMAX_YMAX_XMIN,
00038 VTK_OCTREE_CHILD_ZMAX_YMAX_XMAX
00039 };
00040
00041 const int VTK_QUADTREE_CHILD_SW=VTK_OCTREE_CHILD_ZMIN_YMIN_XMIN;
00042 const int VTK_QUADTREE_CHILD_SE=VTK_OCTREE_CHILD_ZMIN_YMIN_XMAX;
00043 const int VTK_QUADTREE_CHILD_NW=VTK_OCTREE_CHILD_ZMIN_YMAX_XMIN;
00044 const int VTK_QUADTREE_CHILD_NE=VTK_OCTREE_CHILD_ZMIN_YMAX_XMAX;
00045
00046 const int VTK_BINARY_TREE_CHILD_LEFT=VTK_QUADTREE_CHILD_SW;
00047 const int VTK_BINARY_TREE_CHILD_RIGHT=VTK_QUADTREE_CHILD_SE;
00048
00049 class VTK_FILTERING_EXPORT vtkHyperOctreeCursor : public vtkObject
00050 {
00051 public:
00052 vtkTypeRevisionMacro(vtkHyperOctreeCursor,vtkObject);
00053 void PrintSelf(ostream& os, vtkIndent indent);
00054
00057 virtual int GetLeafId()=0;
00058
00060 virtual int CurrentIsLeaf()=0;
00061
00063 virtual int CurrentIsRoot()=0;
00064
00067 virtual int GetCurrentLevel()=0;
00068
00072 virtual int GetChildIndex()=0;
00073
00074
00075
00076
00077 virtual int CurrentIsTerminalNode()=0;
00078
00081 virtual void ToRoot()=0;
00082
00085 virtual void ToParent()=0;
00086
00090 virtual void ToChild(int child)=0;
00091
00095 virtual void ToSameNode(vtkHyperOctreeCursor *other)=0;
00096
00099 virtual int IsEqual(vtkHyperOctreeCursor *other)=0;
00100
00103 virtual vtkHyperOctreeCursor *Clone()=0;
00104
00107 virtual int SameTree(vtkHyperOctreeCursor *other)=0;
00108
00113 virtual int GetIndex(int d)=0;
00114
00117 virtual int GetNumberOfChildren()=0;
00118
00120 virtual int GetDimension()=0;
00121
00123
00129 virtual void MoveToNode(int *indices,
00130 int level)=0;
00132
00134 virtual int Found()=0;
00135
00136 protected:
00137
00138 vtkHyperOctreeCursor();
00139 virtual ~vtkHyperOctreeCursor();
00140 private:
00141 vtkHyperOctreeCursor(const vtkHyperOctreeCursor&);
00142 void operator=(const vtkHyperOctreeCursor&);
00143 };
00144 #endif