VTK
vtkGeoTreeNode.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeoTreeNode.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 /*-------------------------------------------------------------------------
17  Copyright 2008 Sandia Corporation.
18  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
19  the U.S. Government retains certain rights in this software.
20 -------------------------------------------------------------------------*/
21 
36 #ifndef __vtkGeoTreeNode_h
37 #define __vtkGeoTreeNode_h
38 
39 #include "vtkGeovisCoreModule.h" // For export macro
40 #include "vtkObject.h"
41 #include "vtkSmartPointer.h" // for SP
42 
43 class vtkPolyData;
44 
45 class VTKGEOVISCORE_EXPORT vtkGeoTreeNode : public vtkObject
46 {
47 public:
48  static vtkGeoTreeNode *New();
49  vtkTypeMacro(vtkGeoTreeNode, vtkObject);
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
55  vtkSetMacro(Id,unsigned long);
56  vtkGetMacro(Id,unsigned long);
58 
60 
61  vtkSetMacro(Level, int);
62  vtkGetMacro(Level, int);
64 
66 
67  vtkSetVector2Macro(LongitudeRange,double);
68  vtkGetVector2Macro(LongitudeRange,double);
69  vtkSetVector2Macro(LatitudeRange,double);
70  vtkGetVector2Macro(LatitudeRange,double);
72 
75  void SetChild(vtkGeoTreeNode* node, int idx);
76 
78 
81  void SetParent(vtkGeoTreeNode* node)
82  { this->Parent = node; }
84 
86 
88  void SetOlder(vtkGeoTreeNode* node)
89  { this->Older = node; }
90  vtkGeoTreeNode* GetOlder()
91  { return this->Older; }
92  void SetNewer(vtkGeoTreeNode* node)
93  { this->Newer = node; }
94  vtkGeoTreeNode* GetNewer()
95  { return this->Newer; }
97 
99 
101  virtual bool HasData()
102  { return false; }
104 
106 
109  virtual void DeleteData()
110  { }
112 
114  int GetWhichChildAreYou();
115 
119  bool IsDescendantOf(vtkGeoTreeNode* elder);
120 
124  int CreateChildren();
125 
127 
129  vtkGeoTreeNode* GetChildTreeNode(int idx)
130  { return this->Children[idx]; }
132 
134 
137  vtkGeoTreeNode* GetParentTreeNode()
138  { return this->Parent; }
140 
141 //BTX
143  {
145  PROCESSING
146  };
147 
148  NodeStatus GetStatus();
149  void SetStatus(NodeStatus status);
150 //ETX
151 
153 
155  virtual void ShallowCopy(vtkGeoTreeNode *src);
156  virtual void DeepCopy(vtkGeoTreeNode *src);
158 
159 protected:
160  vtkGeoTreeNode();
161  ~vtkGeoTreeNode();
162 
163  int Level;
164  unsigned long Id;
165 
166  double LongitudeRange[2];
167  double LatitudeRange[2];
168 
169  //BTX
175  //ETX
176 
177 private:
178  vtkGeoTreeNode(const vtkGeoTreeNode&); // Not implemented.
179  void operator=(const vtkGeoTreeNode&); // Not implemented.
180 };
181 
182 #endif