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
00097
00099 virtual void ShallowCopy(vtkGeoTreeNode *src);
00100 virtual void DeepCopy(vtkGeoTreeNode *src);
00102
00103 protected:
00104 vtkGeoTreeNode();
00105 ~vtkGeoTreeNode();
00106
00107 int Level;
00108 unsigned long Id;
00109
00110 double LongitudeRange[2];
00111 double LatitudeRange[2];
00112
00113
00114 vtkSmartPointer<vtkGeoTreeNode> Children[4];
00115 vtkGeoTreeNode * Parent;
00116 NodeStatus Status;
00117
00118
00119
00120 private:
00121 vtkGeoTreeNode(const vtkGeoTreeNode&);
00122 void operator=(const vtkGeoTreeNode&);
00123 };
00124
00125 #endif