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 "vtkGeovisCoreModule.h" // For export macro 00034 #include "vtkGeoTreeNode.h" 00035 #include "vtkSmartPointer.h" // for SP 00036 00037 class vtkPolyData; 00038 00039 class VTKGEOVISCORE_EXPORT vtkGeoTerrainNode : public vtkGeoTreeNode 00040 { 00041 public: 00042 static vtkGeoTerrainNode *New(); 00043 vtkTypeMacro(vtkGeoTerrainNode, vtkGeoTreeNode); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00049 vtkGeoTerrainNode* GetChild(int idx); 00050 vtkGeoTerrainNode* GetParent(); 00052 00055 double GetAltitude(double longitude, double latitude); 00056 00058 00060 vtkPolyData* GetModel(); 00061 void SetModel(vtkPolyData* model); 00063 00065 00066 void UpdateBoundingSphere(); 00067 vtkGetMacro(BoundingSphereRadius, double); 00068 vtkGetVector3Macro(BoundingSphereCenter, double); 00070 00071 vtkGetVector3Macro(CornerNormal00,double); 00072 vtkGetVector3Macro(CornerNormal01,double); 00073 vtkGetVector3Macro(CornerNormal10,double); 00074 vtkGetVector3Macro(CornerNormal11,double); 00075 00077 00079 vtkGetVector4Macro(ProjectionBounds,double); 00080 vtkSetVector4Macro(ProjectionBounds,double); 00082 00084 00086 vtkGetMacro(GraticuleLevel,int); 00087 vtkSetMacro(GraticuleLevel,int); 00089 00091 00093 vtkGetMacro(Error,double); 00094 vtkSetMacro(Error,double); 00096 00098 00100 vtkGetMacro(Coverage,float); 00101 vtkSetMacro(Coverage,float); 00103 00105 00106 virtual void ShallowCopy(vtkGeoTreeNode *src); 00107 virtual void DeepCopy(vtkGeoTreeNode *src); 00109 00112 virtual bool HasData(); 00113 00117 virtual void DeleteData(); 00118 00119 protected: 00120 vtkGeoTerrainNode(); 00121 ~vtkGeoTerrainNode(); 00122 00123 //BTX 00124 vtkSmartPointer<vtkPolyData> Model; 00125 //ETX 00126 00127 double BoundingSphereRadius; 00128 double BoundingSphereCenter[3]; 00129 00130 // I hate having to store this, but it is the easiest 00131 // way to determine if a node is not visible because 00132 // it is on the other side of the earth. 00133 double CornerNormal00[3]; 00134 double CornerNormal01[3]; 00135 double CornerNormal10[3]; 00136 double CornerNormal11[3]; 00137 00138 double ProjectionBounds[4]; 00139 int GraticuleLevel; 00140 double Error; 00141 float Coverage; 00142 00143 private: 00144 vtkGeoTerrainNode(const vtkGeoTerrainNode&); // Not implemented. 00145 void operator=(const vtkGeoTerrainNode&); // Not implemented. 00146 }; 00147 00148 #endif