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
31#ifndef vtkGeoTerrainNode_h
32#define vtkGeoTerrainNode_h
33
34#include "vtkGeovisCoreModule.h" // For export macro
35#include "vtkGeoTreeNode.h"
36#include "vtkSmartPointer.h" // for SP
37
38class vtkPolyData;
39
40class VTKGEOVISCORE_EXPORT vtkGeoTerrainNode : public vtkGeoTreeNode
41{
42public:
45 void PrintSelf(ostream& os, vtkIndent indent);
46
48
55
60 double GetAltitude(double longitude, double latitude);
61
63
68 void SetModel(vtkPolyData* model);
70
72
76 vtkGetMacro(BoundingSphereRadius, double);
77 vtkGetVector3Macro(BoundingSphereCenter, double);
79
80 vtkGetVector3Macro(CornerNormal00,double);
81 vtkGetVector3Macro(CornerNormal01,double);
82 vtkGetVector3Macro(CornerNormal10,double);
83 vtkGetVector3Macro(CornerNormal11,double);
84
86
90 vtkGetVector4Macro(ProjectionBounds,double);
91 vtkSetVector4Macro(ProjectionBounds,double);
93
95
98 vtkGetMacro(GraticuleLevel,int);
99 vtkSetMacro(GraticuleLevel,int);
101
103
107 vtkGetMacro(Error,double);
108 vtkSetMacro(Error,double);
110
112
116 vtkGetMacro(Coverage,float);
117 vtkSetMacro(Coverage,float);
119
121
124 virtual void ShallowCopy(vtkGeoTreeNode *src);
125 virtual void DeepCopy(vtkGeoTreeNode *src);
127
132 virtual bool HasData();
133
139 virtual void DeleteData();
140
141protected:
144
146
148 double BoundingSphereCenter[3];
149
150 // I hate having to store this, but it is the easiest
151 // way to determine if a node is not visible because
152 // it is on the other side of the earth.
153 double CornerNormal00[3];
154 double CornerNormal01[3];
155 double CornerNormal10[3];
156 double CornerNormal11[3];
157
158 double ProjectionBounds[4];
160 double Error;
161 float Coverage;
162
163private:
164 vtkGeoTerrainNode(const vtkGeoTerrainNode&) VTK_DELETE_FUNCTION;
165 void operator=(const vtkGeoTerrainNode&) VTK_DELETE_FUNCTION;
166};
167
168#endif
double GetAltitude(double longitude, double latitude)
Given, a long, lat position, return altitude in meters relative to sea level.
void UpdateBoundingSphere()
Bounding sphere is precomputed for faster updates of terrain.
virtual void DeleteData()
Deletes the data associated with the node to make this an "empty" node.
virtual void ShallowCopy(vtkGeoTreeNode *src)
Shallow and Deep copy.
vtkGeoTerrainNode * GetChild(int idx)
Every subclass implements these methods returning the specific type.
vtkGeoTerrainNode * GetParent()
vtkPolyData * GetModel()
Get the terrrain model.
virtual void DeepCopy(vtkGeoTreeNode *src)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void SetModel(vtkPolyData *model)
static vtkGeoTerrainNode * New()
virtual bool HasData()
Returns whether this node has valid data associated with it, or if it is an "empty" node.
vtkSmartPointer< vtkPolyData > Model
Stores data for a patch of the globe.
a simple class to control print indentation
Definition: vtkIndent.h:40
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.