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 
30 #ifndef __vtkGeoTerrainNode_h
31 #define __vtkGeoTerrainNode_h
32 
33 #include "vtkGeoTreeNode.h"
34 #include "vtkSmartPointer.h" // for SP
35 
36 class vtkPolyData;
37 
39 {
40 public:
41  static vtkGeoTerrainNode *New();
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
48  vtkGeoTerrainNode* GetChild(int idx);
49  vtkGeoTerrainNode* GetParent();
51 
54  double GetAltitude(double longitude, double latitude);
55 
57 
59  vtkPolyData* GetModel();
60  void SetModel(vtkPolyData* model);
62 
64 
65  void UpdateBoundingSphere();
66  vtkGetMacro(BoundingSphereRadius, double);
67  vtkGetVector3Macro(BoundingSphereCenter, double);
69 
70  vtkGetVector3Macro(CornerNormal00,double);
71  vtkGetVector3Macro(CornerNormal01,double);
72  vtkGetVector3Macro(CornerNormal10,double);
73  vtkGetVector3Macro(CornerNormal11,double);
74 
76 
78  vtkGetVector4Macro(ProjectionBounds,double);
79  vtkSetVector4Macro(ProjectionBounds,double);
81 
83 
85  vtkGetMacro(GraticuleLevel,int);
86  vtkSetMacro(GraticuleLevel,int);
88 
90 
92  vtkGetMacro(Error,double);
93  vtkSetMacro(Error,double);
95 
97 
99  vtkGetMacro(Coverage,float);
100  vtkSetMacro(Coverage,float);
102 
104 
105  virtual void ShallowCopy(vtkGeoTreeNode *src);
106  virtual void DeepCopy(vtkGeoTreeNode *src);
108 
111  virtual bool HasData();
112 
116  virtual void DeleteData();
117 
118 protected:
121 
122 //BTX
124 //ETX
125 
127  double BoundingSphereCenter[3];
128 
129  // I hate having to store this, but it is the easiest
130  // way to determine if a node is not visible because
131  // it is on the other side of the earth.
132  double CornerNormal00[3];
133  double CornerNormal01[3];
134  double CornerNormal10[3];
135  double CornerNormal11[3];
136 
137  double ProjectionBounds[4];
139  double Error;
140  float Coverage;
141 
142 private:
143  vtkGeoTerrainNode(const vtkGeoTerrainNode&); // Not implemented.
144  void operator=(const vtkGeoTerrainNode&); // Not implemented.
145 };
146 
147 #endif