VTK
vtkGeoTerrainNode.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeoTerrainNode.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 
28 #ifndef vtkGeoTerrainNode_h
29 #define vtkGeoTerrainNode_h
30 
31 #include "vtkGeovisCoreModule.h" // For export macro
32 #include "vtkGeoTreeNode.h"
33 #include "vtkSmartPointer.h" // for SP
34 
35 class vtkPolyData;
36 
37 class VTKGEOVISCORE_EXPORT vtkGeoTerrainNode : public vtkGeoTreeNode
38 {
39 public:
40  static vtkGeoTerrainNode *New();
42  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
43 
45 
49  vtkGeoTerrainNode* GetChild(int idx);
50  vtkGeoTerrainNode* GetParent();
52 
57  double GetAltitude(double longitude, double latitude);
58 
60 
64  vtkPolyData* GetModel();
65  void SetModel(vtkPolyData* model);
67 
69 
72  void UpdateBoundingSphere();
73  vtkGetMacro(BoundingSphereRadius, double);
74  vtkGetVector3Macro(BoundingSphereCenter, double);
76 
77  vtkGetVector3Macro(CornerNormal00,double);
78  vtkGetVector3Macro(CornerNormal01,double);
79  vtkGetVector3Macro(CornerNormal10,double);
80  vtkGetVector3Macro(CornerNormal11,double);
81 
83 
87  vtkGetVector4Macro(ProjectionBounds,double);
88  vtkSetVector4Macro(ProjectionBounds,double);
90 
92 
95  vtkGetMacro(GraticuleLevel,int);
96  vtkSetMacro(GraticuleLevel,int);
98 
100 
104  vtkGetMacro(Error,double);
105  vtkSetMacro(Error,double);
107 
109 
113  vtkGetMacro(Coverage,float);
114  vtkSetMacro(Coverage,float);
116 
118 
121  void ShallowCopy(vtkGeoTreeNode *src) VTK_OVERRIDE;
122  void DeepCopy(vtkGeoTreeNode *src) VTK_OVERRIDE;
124 
129  bool HasData() VTK_OVERRIDE;
130 
136  void DeleteData() VTK_OVERRIDE;
137 
138 protected:
140  ~vtkGeoTerrainNode() VTK_OVERRIDE;
141 
143 
144  double BoundingSphereRadius;
145  double BoundingSphereCenter[3];
146 
147  // I hate having to store this, but it is the easiest
148  // way to determine if a node is not visible because
149  // it is on the other side of the earth.
150  double CornerNormal00[3];
151  double CornerNormal01[3];
152  double CornerNormal10[3];
153  double CornerNormal11[3];
154 
155  double ProjectionBounds[4];
156  int GraticuleLevel;
157  double Error;
158  float Coverage;
159 
160 private:
161  vtkGeoTerrainNode(const vtkGeoTerrainNode&) VTK_DELETE_FUNCTION;
162  void operator=(const vtkGeoTerrainNode&) VTK_DELETE_FUNCTION;
163 };
164 
165 #endif
virtual void ShallowCopy(vtkGeoTreeNode *src)
Shallow and Deep copy.
virtual bool HasData()
Returns whether this node has valid data associated with it, or if it is an "empty" node...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Hold a reference to a vtkObjectBase instance.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
a simple class to control print indentation
Definition: vtkIndent.h:33
static vtkGeoTreeNode * New()
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Stores data for a patch of the globe.
virtual void DeepCopy(vtkGeoTreeNode *src)
Shallow and Deep copy.