00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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 vtkGeoTreeNodeCache;
00045 class vtkGeoSource;
00046 class vtkGeoTerrainNode;
00047 class vtkRenderer;
00048
00049 class VTK_GEOVIS_EXPORT vtkGeoTerrain : public vtkObject
00050 {
00051 public:
00052 static vtkGeoTerrain *New();
00053 vtkTypeMacro(vtkGeoTerrain,vtkObject);
00054 virtual void PrintSelf(ostream& os, vtkIndent indent);
00055
00057
00058 virtual vtkGeoSource* GetSource()
00059 { return this->GeoSource; }
00060 virtual void SetSource(vtkGeoSource* source);
00062
00064 void SaveDatabase(const char* path, int depth);
00065
00067
00071 void AddActors(
00072 vtkRenderer* ren,
00073 vtkAssembly* assembly,
00074 vtkCollection* imageReps);
00076
00078
00080 vtkSetVector3Macro(Origin, double);
00081 vtkGetVector3Macro(Origin, double);
00083
00085
00086 vtkSetClampMacro(MaxLevel, int, 0, VTK_INT_MAX);
00087 vtkGetMacro(MaxLevel, int);
00089
00090 protected:
00091 vtkGeoTerrain();
00092 ~vtkGeoTerrain();
00093
00094 virtual void SetGeoSource(vtkGeoSource* source);
00095 vtkGeoSource* GeoSource;
00096 vtkGeoTerrainNode* Root;
00097 vtkGeoTreeNodeCache* Cache;
00098
00100 void Initialize();
00101
00103 virtual void InitializeNodeAnalysis(vtkRenderer* ren);
00104
00107 virtual bool NodeInViewport(vtkGeoTerrainNode* node);
00108
00111 virtual int EvaluateNode(vtkGeoTerrainNode* node);
00112
00114 void PrintTree(ostream & os, vtkIndent indent, vtkGeoTerrainNode* node);
00115
00116 double Origin[3];
00117 vtkExtractSelectedFrustum* Extractor;
00118 virtual void SetGeoCamera(vtkGeoCamera* camera);
00119 vtkGeoCamera* GeoCamera;
00120 int MaxLevel;
00121
00122 private:
00123 vtkGeoTerrain(const vtkGeoTerrain&);
00124 void operator=(const vtkGeoTerrain&);
00125 };
00126
00127 #endif