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