VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGeoTerrain.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00035 #ifndef __vtkGeoTerrain_h 00036 #define __vtkGeoTerrain_h 00037 00038 #include "vtkGeovisCoreModule.h" // For export macro 00039 #include "vtkObject.h" 00040 00041 class vtkAssembly; 00042 class vtkCollection; 00043 class vtkExtractSelectedFrustum; 00044 class vtkGeoCamera; 00045 class vtkGeoTreeNodeCache; 00046 class vtkGeoSource; 00047 class vtkGeoTerrainNode; 00048 class vtkRenderer; 00049 00050 class VTKGEOVISCORE_EXPORT vtkGeoTerrain : public vtkObject 00051 { 00052 public: 00053 static vtkGeoTerrain *New(); 00054 vtkTypeMacro(vtkGeoTerrain,vtkObject); 00055 virtual void PrintSelf(ostream& os, vtkIndent indent); 00056 00058 00059 virtual vtkGeoSource* GetSource() 00060 { return this->GeoSource; } 00061 virtual void SetSource(vtkGeoSource* source); 00063 00065 void SaveDatabase(const char* path, int depth); 00066 00068 00072 void AddActors( 00073 vtkRenderer* ren, 00074 vtkAssembly* assembly, 00075 vtkCollection* imageReps); 00077 00079 00081 vtkSetVector3Macro(Origin, double); 00082 vtkGetVector3Macro(Origin, double); 00084 00086 00087 vtkSetClampMacro(MaxLevel, int, 0, VTK_INT_MAX); 00088 vtkGetMacro(MaxLevel, int); 00090 00091 protected: 00092 vtkGeoTerrain(); 00093 ~vtkGeoTerrain(); 00094 00095 virtual void SetGeoSource(vtkGeoSource* source); 00096 vtkGeoSource* GeoSource; 00097 vtkGeoTerrainNode* Root; 00098 vtkGeoTreeNodeCache* Cache; 00099 00101 void Initialize(); 00102 00104 virtual void InitializeNodeAnalysis(vtkRenderer* ren); 00105 00108 virtual bool NodeInViewport(vtkGeoTerrainNode* node); 00109 00112 virtual int EvaluateNode(vtkGeoTerrainNode* node); 00113 00115 void PrintTree(ostream & os, vtkIndent indent, vtkGeoTerrainNode* node); 00116 00117 double Origin[3]; 00118 vtkExtractSelectedFrustum* Extractor; 00119 virtual void SetGeoCamera(vtkGeoCamera* camera); 00120 vtkGeoCamera* GeoCamera; 00121 int MaxLevel; 00122 00123 private: 00124 vtkGeoTerrain(const vtkGeoTerrain&); // Not implemented 00125 void operator=(const vtkGeoTerrain&); // Not implemented 00126 }; 00127 00128 #endif