VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGeoTerrainNode.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 /*------------------------------------------------------------------------- 00017 Copyright 2008 Sandia Corporation. 00018 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00019 the U.S. Government retains certain rights in this software. 00020 -------------------------------------------------------------------------*/ 00021 00030 #ifndef __vtkGeoTerrainNode_h 00031 #define __vtkGeoTerrainNode_h 00032 00033 #include "vtkGeoTreeNode.h" 00034 #include "vtkSmartPointer.h" // for SP 00035 00036 class vtkPolyData; 00037 00038 class VTK_GEOVIS_EXPORT vtkGeoTerrainNode : public vtkGeoTreeNode 00039 { 00040 public: 00041 static vtkGeoTerrainNode *New(); 00042 vtkTypeMacro(vtkGeoTerrainNode, vtkGeoTreeNode); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00046 00048 vtkGeoTerrainNode* GetChild(int idx); 00049 vtkGeoTerrainNode* GetParent(); 00051 00054 double GetAltitude(double longitude, double latitude); 00055 00057 00059 vtkPolyData* GetModel(); 00060 void SetModel(vtkPolyData* model); 00062 00064 00065 void UpdateBoundingSphere(); 00066 vtkGetMacro(BoundingSphereRadius, double); 00067 vtkGetVector3Macro(BoundingSphereCenter, double); 00069 00070 vtkGetVector3Macro(CornerNormal00,double); 00071 vtkGetVector3Macro(CornerNormal01,double); 00072 vtkGetVector3Macro(CornerNormal10,double); 00073 vtkGetVector3Macro(CornerNormal11,double); 00074 00076 00078 vtkGetVector4Macro(ProjectionBounds,double); 00079 vtkSetVector4Macro(ProjectionBounds,double); 00081 00083 00085 vtkGetMacro(GraticuleLevel,int); 00086 vtkSetMacro(GraticuleLevel,int); 00088 00090 00092 vtkGetMacro(Error,double); 00093 vtkSetMacro(Error,double); 00095 00097 00099 vtkGetMacro(Coverage,float); 00100 vtkSetMacro(Coverage,float); 00102 00104 00105 virtual void ShallowCopy(vtkGeoTreeNode *src); 00106 virtual void DeepCopy(vtkGeoTreeNode *src); 00108 00111 virtual bool HasData(); 00112 00116 virtual void DeleteData(); 00117 00118 protected: 00119 vtkGeoTerrainNode(); 00120 ~vtkGeoTerrainNode(); 00121 00122 //BTX 00123 vtkSmartPointer<vtkPolyData> Model; 00124 //ETX 00125 00126 double BoundingSphereRadius; 00127 double BoundingSphereCenter[3]; 00128 00129 // I hate having to store this, but it is the easiest 00130 // way to determine if a node is not visible because 00131 // it is on the other side of the earth. 00132 double CornerNormal00[3]; 00133 double CornerNormal01[3]; 00134 double CornerNormal10[3]; 00135 double CornerNormal11[3]; 00136 00137 double ProjectionBounds[4]; 00138 int GraticuleLevel; 00139 double Error; 00140 float Coverage; 00141 00142 private: 00143 vtkGeoTerrainNode(const vtkGeoTerrainNode&); // Not implemented. 00144 void operator=(const vtkGeoTerrainNode&); // Not implemented. 00145 }; 00146 00147 #endif