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 "vtkObject.h"
40 #include "vtkSmartPointer.h" // for SP
41 
42 class vtkPolyData;
43 
45 {
46 public:
47  static vtkGeoTreeNode *New();
48  vtkTypeMacro(vtkGeoTreeNode, vtkObject);
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
54  vtkSetMacro(Id,unsigned long);
55  vtkGetMacro(Id,unsigned long);
57 
59 
60  vtkSetMacro(Level, int);
61  vtkGetMacro(Level, int);
63 
65 
66  vtkSetVector2Macro(LongitudeRange,double);
67  vtkGetVector2Macro(LongitudeRange,double);
68  vtkSetVector2Macro(LatitudeRange,double);
69  vtkGetVector2Macro(LatitudeRange,double);
71 
74  void SetChild(vtkGeoTreeNode* node, int idx);
75 
77 
81  { this->Parent = node; }
83 
85 
88  { this->Older = node; }
90  { return this->Older; }
92  { this->Newer = node; }
94  { return this->Newer; }
96 
98 
100  virtual bool HasData()
101  { return false; }
103 
105 
108  virtual void DeleteData()
109  { }
111 
113  int GetWhichChildAreYou();
114 
118  bool IsDescendantOf(vtkGeoTreeNode* elder);
119 
123  int CreateChildren();
124 
126 
129  { return this->Children[idx]; }
131 
133 
137  { return this->Parent; }
139 
140 //BTX
142  {
144  PROCESSING
145  };
146 
147  NodeStatus GetStatus();
148  void SetStatus(NodeStatus status);
149 //ETX
150 
152 
154  virtual void ShallowCopy(vtkGeoTreeNode *src);
155  virtual void DeepCopy(vtkGeoTreeNode *src);
157 
158 protected:
159  vtkGeoTreeNode();
160  ~vtkGeoTreeNode();
161 
162  int Level;
163  unsigned long Id;
164 
165  double LongitudeRange[2];
166  double LatitudeRange[2];
167 
168  //BTX
174  //ETX
175 
176 private:
177  vtkGeoTreeNode(const vtkGeoTreeNode&); // Not implemented.
178  void operator=(const vtkGeoTreeNode&); // Not implemented.
179 };
180 
181 #endif
void SetNewer(vtkGeoTreeNode *node)
virtual bool HasData()
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkGeoTreeNode * GetNewer()
void SetParent(vtkGeoTreeNode *node)
vtkGeoTreeNode * GetOlder()
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
vtkGeoTreeNode * GetParentTreeNode()
NodeStatus Status
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkGeoTreeNode * Parent
vtkGeoTreeNode * Newer
#define VTK_GEOVIS_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