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);
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 
127 
134 
141 
148  { return this->Children[idx]; }
149 
156  { return this->Parent; }
157 
159  {
161  PROCESSING
162  };
163 
165  void SetStatus(NodeStatus status);
166 
168 
172  virtual void ShallowCopy(vtkGeoTreeNode *src);
173  virtual void DeepCopy(vtkGeoTreeNode *src);
175 
176 protected:
179 
180  int Level;
181  unsigned long Id;
182 
183  double LongitudeRange[2];
184  double LatitudeRange[2];
185 
191 
192 private:
193  vtkGeoTreeNode(const vtkGeoTreeNode&) VTK_DELETE_FUNCTION;
194  void operator=(const vtkGeoTreeNode&) VTK_DELETE_FUNCTION;
195 };
196 
197 #endif
vtkGeoTreeNode::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkGeoTreeNode::GetOlder
vtkGeoTreeNode * GetOlder()
Definition: vtkGeoTreeNode.h:101
vtkGeoTreeNode::Status
NodeStatus Status
Definition: vtkGeoTreeNode.h:188
vtkGeoTreeNode::~vtkGeoTreeNode
~vtkGeoTreeNode()
vtkGeoTreeNode::SetOlder
void SetOlder(vtkGeoTreeNode *node)
Manage links to older and newer tree nodes.
Definition: vtkGeoTreeNode.h:99
vtkGeoTreeNode::GetChildTreeNode
vtkGeoTreeNode * GetChildTreeNode(int idx)
Get the child as a vtkGeoTreeNode.
Definition: vtkGeoTreeNode.h:147
vtkGeoTreeNode::IsDescendantOf
bool IsDescendantOf(vtkGeoTreeNode *elder)
This method returns true if this node descends from the elder node.
vtkGeoTreeNode
Stores data for a patch of the globe.
Definition: vtkGeoTreeNode.h:47
vtkSmartPointer< vtkGeoTreeNode >
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkGeoTreeNode::Parent
vtkGeoTreeNode * Parent
Definition: vtkGeoTreeNode.h:187
vtkGeoTreeNode::SetParent
void SetParent(vtkGeoTreeNode *node)
When we merge children to a lower resolution parent, we need this reference.
Definition: vtkGeoTreeNode.h:92
vtkGeoTreeNode::GetParentTreeNode
vtkGeoTreeNode * GetParentTreeNode()
Get the parent as a vtkGeoTreeNode.
Definition: vtkGeoTreeNode.h:155
vtkGeoTreeNode::NodeStatus
NodeStatus
Definition: vtkGeoTreeNode.h:159
vtkGeoTreeNode::Level
int Level
Definition: vtkGeoTreeNode.h:180
vtkGeoTreeNode::DeleteData
virtual void DeleteData()
Deletes the data associated with the node to make this an "empty" node.
Definition: vtkGeoTreeNode.h:120
vtkGeoTreeNode::GetStatus
NodeStatus GetStatus()
vtkGeoTreeNode::HasData
virtual bool HasData()
Returns whether this node has valid data associated with it, or if it is an "empty" node.
Definition: vtkGeoTreeNode.h:112
vtkGeoTreeNode::GetNewer
vtkGeoTreeNode * GetNewer()
Definition: vtkGeoTreeNode.h:105
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkSmartPointer.h
vtkGeoTreeNode::SetChild
void SetChild(vtkGeoTreeNode *node, int idx)
Get a child of this node.
vtkGeoTreeNode::GetWhichChildAreYou
int GetWhichChildAreYou()
Get this nodes child index in node's parent.
vtkGeoTreeNode::SetStatus
void SetStatus(NodeStatus status)
vtkObject.h
vtkGeoTreeNode::ShallowCopy
virtual void ShallowCopy(vtkGeoTreeNode *src)
Shallow and Deep copy.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGeoTreeNode::CreateChildren
int CreateChildren()
Create children of the same type as parent.
vtkGeoTreeNode::vtkGeoTreeNode
vtkGeoTreeNode()
vtkGeoTreeNode::SetNewer
void SetNewer(vtkGeoTreeNode *node)
Definition: vtkGeoTreeNode.h:103
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkGeoTreeNode::New
static vtkGeoTreeNode * New()
vtkGeoTreeNode::DeepCopy
virtual void DeepCopy(vtkGeoTreeNode *src)
vtkGeoTreeNode::Older
vtkGeoTreeNode * Older
Definition: vtkGeoTreeNode.h:189
vtkGeoTreeNode::Id
unsigned long Id
Definition: vtkGeoTreeNode.h:181
vtkGeoTreeNode::NONE
@ NONE
Definition: vtkGeoTreeNode.h:160
vtkGeoTreeNode::Newer
vtkGeoTreeNode * Newer
Definition: vtkGeoTreeNode.h:190