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 
37 #ifndef vtkGeoTreeNode_h
38 #define vtkGeoTreeNode_h
39 
40 #include "vtkGeovisCoreModule.h" // For export macro
41 #include "vtkObject.h"
42 #include "vtkSmartPointer.h" // for SP
43 
44 class vtkPolyData;
45 
46 class VTKGEOVISCORE_EXPORT vtkGeoTreeNode : public vtkObject
47 {
48 public:
49  static vtkGeoTreeNode *New();
50  vtkTypeMacro(vtkGeoTreeNode, vtkObject);
51  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
52 
54 
59  vtkSetMacro(Id,unsigned long);
60  vtkGetMacro(Id,unsigned long);
62 
64 
67  vtkSetMacro(Level, int);
68  vtkGetMacro(Level, int);
70 
72 
75  vtkSetVector2Macro(LongitudeRange,double);
76  vtkGetVector2Macro(LongitudeRange,double);
77  vtkSetVector2Macro(LatitudeRange,double);
78  vtkGetVector2Macro(LatitudeRange,double);
80 
85  void SetChild(vtkGeoTreeNode* node, int idx);
86 
93  { this->Parent = node; }
94 
100  { this->Older = node; }
102  { return this->Older; }
104  { this->Newer = node; }
106  { return this->Newer; }
107 
112  virtual bool HasData()
113  { return false; }
114 
120  virtual void DeleteData()
121  { }
122 
126  int GetWhichChildAreYou();
127 
133  bool IsDescendantOf(vtkGeoTreeNode* elder);
134 
140  int CreateChildren();
141 
148  { return this->Children[idx]; }
149 
156  { return this->Parent; }
157 
159  {
161  PROCESSING
162  };
163 
164  NodeStatus GetStatus();
165  void SetStatus(NodeStatus status);
166 
168 
172  virtual void ShallowCopy(vtkGeoTreeNode *src);
173  virtual void DeepCopy(vtkGeoTreeNode *src);
175 
176 protected:
177  vtkGeoTreeNode();
178  ~vtkGeoTreeNode() VTK_OVERRIDE;
179 
180  int Level;
181  unsigned long Id;
182 
183  double LongitudeRange[2];
184  double LatitudeRange[2];
185 
187  vtkGeoTreeNode * Parent;
188  NodeStatus Status;
191 
192 private:
193  vtkGeoTreeNode(const vtkGeoTreeNode&) VTK_DELETE_FUNCTION;
194  void operator=(const vtkGeoTreeNode&) VTK_DELETE_FUNCTION;
195 };
196 
197 #endif
void SetNewer(vtkGeoTreeNode *node)
virtual bool HasData()
Returns whether this node has valid data associated with it, or if it is an "empty" node...
abstract base class for most VTK objects
Definition: vtkObject.h:59
vtkGeoTreeNode * GetNewer()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetParent(vtkGeoTreeNode *node)
When we merge children to a lower resolution parent, we need this reference.
vtkGeoTreeNode * GetOlder()
Hold a reference to a vtkObjectBase instance.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkGeoTreeNode * GetParentTreeNode()
Get the parent as a vtkGeoTreeNode.
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Stores data for a patch of the globe.
virtual void DeleteData()
Deletes the data associated with the node to make this an "empty" node.
void SetOlder(vtkGeoTreeNode *node)
Manage links to older and newer tree nodes.
vtkGeoTreeNode * GetChildTreeNode(int idx)
Get the child as a vtkGeoTreeNode.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...