VTK
dox/Geovis/vtkGeoTerrain.h
Go to the documentation of this file.
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 "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&); // Not implemented
00124   void operator=(const vtkGeoTerrain&); // Not implemented
00125 };
00126 
00127 #endif