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 
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 
82  { this->Parent = node; }
84 
86 
89  { this->Older = node; }
91  { return this->Older; }
93  { this->Newer = node; }
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 
130  { return this->Children[idx]; }
132 
134 
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
void SetNewer(vtkGeoTreeNode *node)
virtual bool HasData()
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkGeoTreeNode * GetNewer()
void SetParent(vtkGeoTreeNode *node)
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
vtkGeoTreeNode * GetOlder()
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
vtkGeoTreeNode * GetParentTreeNode()
NodeStatus Status
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkGeoTreeNode * Parent
vtkGeoTreeNode * Newer
#define VTKGEOVISCORE_EXPORT
Stores data for a patch of the globe.
unsigned long Id
virtual void DeleteData()
void SetOlder(vtkGeoTreeNode *node)
vtkGeoTreeNode * GetChildTreeNode(int idx)
static vtkObject * New()
vtkGeoTreeNode * Older