VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkGeoTerrain.h,v $ 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 "vtkObject.h" 00039 00040 class vtkAssembly; 00041 class vtkCollection; 00042 class vtkExtractSelectedFrustum; 00043 class vtkGeoCamera; 00044 class vtkGeoSource; 00045 class vtkGeoTerrainNode; 00046 class vtkRenderer; 00047 00048 class VTK_GEOVIS_EXPORT vtkGeoTerrain : public vtkObject 00049 { 00050 public: 00051 static vtkGeoTerrain *New(); 00052 vtkTypeRevisionMacro(vtkGeoTerrain,vtkObject); 00053 virtual void PrintSelf(ostream& os, vtkIndent indent); 00054 00056 00057 virtual vtkGeoSource* GetSource() 00058 { return this->GeoSource; } 00059 virtual void SetSource(vtkGeoSource* source); 00061 00063 void SaveDatabase(const char* path, int depth); 00064 00066 00070 void AddActors( 00071 vtkRenderer* ren, 00072 vtkAssembly* assembly, 00073 vtkCollection* imageReps); 00075 00077 00079 vtkSetVector3Macro(Origin, double); 00080 vtkGetVector3Macro(Origin, double); 00082 00084 00085 vtkSetClampMacro(MaxLevel, int, 0, VTK_INT_MAX); 00086 vtkGetMacro(MaxLevel, int); 00088 00089 protected: 00090 vtkGeoTerrain(); 00091 ~vtkGeoTerrain(); 00092 00093 virtual void SetGeoSource(vtkGeoSource* source); 00094 vtkGeoSource* GeoSource; 00095 vtkGeoTerrainNode* Root; 00096 00098 void Initialize(); 00099 00101 virtual void InitializeNodeAnalysis(vtkRenderer* ren); 00102 00105 virtual bool NodeInViewport(vtkGeoTerrainNode* node); 00106 00109 virtual int EvaluateNode(vtkGeoTerrainNode* node); 00110 00112 void PrintTree(ostream & os, vtkIndent indent, vtkGeoTerrainNode* node); 00113 00114 double Origin[3]; 00115 vtkExtractSelectedFrustum* Extractor; 00116 virtual void SetGeoCamera(vtkGeoCamera* camera); 00117 vtkGeoCamera* GeoCamera; 00118 int MaxLevel; 00119 00120 private: 00121 vtkGeoTerrain(const vtkGeoTerrain&); // Not implemented 00122 void operator=(const vtkGeoTerrain&); // Not implemented 00123 }; 00124 00125 #endif