VTK
vtkGeoTerrain.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeoTerrain.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  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
33 #ifndef vtkGeoTerrain_h
34 #define vtkGeoTerrain_h
35 
36 #include "vtkGeovisCoreModule.h" // For export macro
37 #include "vtkObject.h"
38 
39 class vtkAssembly;
40 class vtkCollection;
42 class vtkGeoCamera;
44 class vtkGeoSource;
45 class vtkGeoTerrainNode;
46 class vtkRenderer;
47 
48 #if !defined(VTK_LEGACY_REMOVE)
49 class VTKGEOVISCORE_EXPORT vtkGeoTerrain : public vtkObject
50 {
51 public:
52  static vtkGeoTerrain *New();
53  vtkTypeMacro(vtkGeoTerrain,vtkObject);
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
60  { return this->GeoSource; }
61  virtual void SetSource(vtkGeoSource* source);
62 
66  void SaveDatabase(const char* path, int depth);
67 
74  void AddActors(
75  vtkRenderer* ren,
76  vtkAssembly* assembly,
77  vtkCollection* imageReps);
78 
80 
84  vtkSetVector3Macro(Origin, double);
85  vtkGetVector3Macro(Origin, double);
87 
89 
92  vtkSetClampMacro(MaxLevel, int, 0, VTK_INT_MAX);
93  vtkGetMacro(MaxLevel, int);
95 
96 protected:
97  vtkGeoTerrain();
98  ~vtkGeoTerrain() override;
99 
100  virtual void SetGeoSource(vtkGeoSource* source);
104 
108  void Initialize();
109 
113  virtual void InitializeNodeAnalysis(vtkRenderer* ren);
114 
119  virtual bool NodeInViewport(vtkGeoTerrainNode* node);
120 
125  virtual int EvaluateNode(vtkGeoTerrainNode* node);
126 
130  void PrintTree(ostream & os, vtkIndent indent, vtkGeoTerrainNode* node);
131 
132  double Origin[3];
134  virtual void SetGeoCamera(vtkGeoCamera* camera);
136  int MaxLevel;
137 
138 private:
139  vtkGeoTerrain(const vtkGeoTerrain&) = delete;
140  void operator=(const vtkGeoTerrain&) = delete;
141 };
142 
143 #endif //VTK_LEGACY_REMOVE
144 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
A 3D terrain model for the globe.
Definition: vtkGeoTerrain.h:49
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_INT_MAX
Definition: vtkType.h:159
A multi-resolution geographic data source.
Definition: vtkGeoSource.h:55
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkGeoCamera * GeoCamera
virtual vtkGeoSource * GetSource()
The source used to obtain geometry patches.
Definition: vtkGeoTerrain.h:59
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGeoTreeNodeCache * Cache
Returns the portion of the input dataset that lies within a selection frustum.
vtkGeoSource * GeoSource
create hierarchies of vtkProp3Ds (transformable props)
Definition: vtkAssembly.h:75
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkGeoTerrainNode * Root
create and manipulate ordered lists of objects
Definition: vtkCollection.h:51
vtkExtractSelectedFrustum * Extractor
Manages a list of vtkGeoTreeNodes.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Geo interface to a camera.
Definition: vtkGeoCamera.h:84