00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00027 #ifndef __vtkGeoTreeNode_h
00028 #define __vtkGeoTreeNode_h
00029
00030 #include "vtkObject.h"
00031 #include "vtkSmartPointer.h"
00032
00033 class vtkPolyData;
00034
00035 class VTK_GEOVIS_EXPORT vtkGeoTreeNode : public vtkObject
00036 {
00037 public:
00038 static vtkGeoTreeNode *New();
00039 vtkTypeRevisionMacro(vtkGeoTreeNode, vtkObject);
00040 void PrintSelf(ostream& os, vtkIndent indent);
00041
00043
00045 vtkSetMacro(Id,unsigned long);
00046 vtkGetMacro(Id,unsigned long);
00048
00050
00051 vtkSetMacro(Level, int);
00052 vtkGetMacro(Level, int);
00054
00056
00057 vtkSetVector2Macro(LongitudeRange,double);
00058 vtkGetVector2Macro(LongitudeRange,double);
00059 vtkSetVector2Macro(LatitudeRange,double);
00060 vtkGetVector2Macro(LatitudeRange,double);
00062
00065 void SetChild(vtkGeoTreeNode* node, int idx);
00066
00070 void SetParent(vtkGeoTreeNode* node) {this->Parent = node;}
00071
00073 int GetWhichChildAreYou();
00074
00078 bool IsDescendantOf(vtkGeoTreeNode* elder);
00079
00083 int CreateChildren();
00084
00085
00086 enum NodeStatus
00087 {
00088 NONE,
00089 PROCESSING
00090 };
00091
00092 NodeStatus GetStatus();
00093 void SetStatus(NodeStatus status);
00094
00095
00096 protected:
00097 vtkGeoTreeNode();
00098 ~vtkGeoTreeNode();
00099
00100 int Level;
00101 unsigned long Id;
00102
00103 double LongitudeRange[2];
00104 double LatitudeRange[2];
00105
00106
00107 vtkSmartPointer<vtkGeoTreeNode> Children[4];
00108 NodeStatus Status;
00109
00110 vtkGeoTreeNode* Parent;
00111
00112 private:
00113 vtkGeoTreeNode(const vtkGeoTreeNode&);
00114 void operator=(const vtkGeoTreeNode&);
00115 };
00116
00117 #endif