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 -------------------------------------------------------------------------*/
35 #ifndef __vtkGeoTerrain_h
36 #define __vtkGeoTerrain_h
37 
38 #include "vtkObject.h"
39 
40 class vtkAssembly;
41 class vtkCollection;
43 class vtkGeoCamera;
45 class vtkGeoSource;
46 class vtkGeoTerrainNode;
47 class vtkRenderer;
48 
50 {
51 public:
52  static vtkGeoTerrain *New();
53  vtkTypeMacro(vtkGeoTerrain,vtkObject);
54  virtual void PrintSelf(ostream& os, vtkIndent indent);
55 
57 
59  { return this->GeoSource; }
60  virtual void SetSource(vtkGeoSource* source);
62 
64  void SaveDatabase(const char* path, int depth);
65 
67 
71  void AddActors(
72  vtkRenderer* ren,
73  vtkAssembly* assembly,
74  vtkCollection* imageReps);
76 
78 
80  vtkSetVector3Macro(Origin, double);
81  vtkGetVector3Macro(Origin, double);
83 
85 
86  vtkSetClampMacro(MaxLevel, int, 0, VTK_INT_MAX);
87  vtkGetMacro(MaxLevel, int);
89 
90 protected:
91  vtkGeoTerrain();
92  ~vtkGeoTerrain();
93 
94  virtual void SetGeoSource(vtkGeoSource* source);
98 
100  void Initialize();
101 
103  virtual void InitializeNodeAnalysis(vtkRenderer* ren);
104 
107  virtual bool NodeInViewport(vtkGeoTerrainNode* node);
108 
111  virtual int EvaluateNode(vtkGeoTerrainNode* node);
112 
114  void PrintTree(ostream & os, vtkIndent indent, vtkGeoTerrainNode* node);
115 
116  double Origin[3];
118  virtual void SetGeoCamera(vtkGeoCamera* camera);
120  int MaxLevel;
121 
122 private:
123  vtkGeoTerrain(const vtkGeoTerrain&); // Not implemented
124  void operator=(const vtkGeoTerrain&); // Not implemented
125 };
126 
127 #endif