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 #if !defined(VTK_LEGACY_REMOVE)
38 class VTKGEOVISCORE_EXPORT vtkGeoTerrainNode : public vtkGeoTreeNode
39 {
40 public:
41  static vtkGeoTerrainNode *New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
50  vtkGeoTerrainNode* GetChild(int idx);
51  vtkGeoTerrainNode* GetParent();
53 
58  double GetAltitude(double longitude, double latitude);
59 
61 
65  vtkPolyData* GetModel();
66  void SetModel(vtkPolyData* model);
68 
70 
73  void UpdateBoundingSphere();
74  vtkGetMacro(BoundingSphereRadius, double);
75  vtkGetVector3Macro(BoundingSphereCenter, double);
77 
78  vtkGetVector3Macro(CornerNormal00,double);
79  vtkGetVector3Macro(CornerNormal01,double);
80  vtkGetVector3Macro(CornerNormal10,double);
81  vtkGetVector3Macro(CornerNormal11,double);
82 
84 
88  vtkGetVector4Macro(ProjectionBounds,double);
89  vtkSetVector4Macro(ProjectionBounds,double);
91 
93 
96  vtkGetMacro(GraticuleLevel,int);
97  vtkSetMacro(GraticuleLevel,int);
99 
101 
105  vtkGetMacro(Error,double);
106  vtkSetMacro(Error,double);
108 
110 
114  vtkGetMacro(Coverage,float);
115  vtkSetMacro(Coverage,float);
117 
119 
122  void ShallowCopy(vtkGeoTreeNode *src) override;
123  void DeepCopy(vtkGeoTreeNode *src) override;
125 
130  bool HasData() override;
131 
137  void DeleteData() override;
138 
139 protected:
141  ~vtkGeoTerrainNode() override;
142 
144 
146  double BoundingSphereCenter[3];
147 
148  // I hate having to store this, but it is the easiest
149  // way to determine if a node is not visible because
150  // it is on the other side of the earth.
151  double CornerNormal00[3];
152  double CornerNormal01[3];
153  double CornerNormal10[3];
154  double CornerNormal11[3];
155 
156  double ProjectionBounds[4];
158  double Error;
159  float Coverage;
160 
161 private:
162  vtkGeoTerrainNode(const vtkGeoTerrainNode&) = delete;
163  void operator=(const vtkGeoTerrainNode&) = delete;
164 };
165 
166 #endif //VTK_LEGACY_REMOVE
167 #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.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkSmartPointer< vtkPolyData > Model
a simple class to control print indentation
Definition: vtkIndent.h:39
static vtkGeoTreeNode * New()
Stores data for a patch of the globe.
virtual void DeleteData()
Deletes the data associated with the node to make this an "empty" node.
virtual void DeepCopy(vtkGeoTreeNode *src)
Shallow and Deep copy.