VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGlobeSource.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 00039 #ifndef __vtkGlobeSource_h 00040 #define __vtkGlobeSource_h 00041 00042 #include "vtkGeovisCoreModule.h" // For export macro 00043 #include "vtkPolyDataAlgorithm.h" 00044 00045 class vtkCellArray; 00046 class vtkFloatArray; 00047 00048 00049 class VTKGEOVISCORE_EXPORT vtkGlobeSource : public vtkPolyDataAlgorithm 00050 { 00051 public: 00052 vtkTypeMacro(vtkGlobeSource,vtkPolyDataAlgorithm); 00053 void PrintSelf(ostream& os, vtkIndent indent); 00054 00055 00057 00059 vtkSetVector3Macro(Origin, double); 00061 00063 00064 vtkSetClampMacro(StartLongitude,double,-180.0,180.0); 00065 vtkSetClampMacro(EndLongitude,double,-180.0,180.0); 00066 vtkSetClampMacro(StartLatitude,double,-90.0,90.0); 00067 vtkSetClampMacro(EndLatitude,double,-90.0,90.0); 00069 00071 00073 vtkSetClampMacro(LongitudeResolution,int,3,100); 00074 vtkGetMacro(LongitudeResolution,int); 00076 00078 00080 vtkSetClampMacro(LatitudeResolution,int,3,100); 00081 vtkGetMacro(LatitudeResolution,int); 00083 00085 00086 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX); 00087 vtkGetMacro(Radius,double); 00089 00091 vtkSetMacro(AutoCalculateCurtainHeight, bool); 00092 vtkGetMacro(AutoCalculateCurtainHeight, bool); 00093 vtkBooleanMacro(AutoCalculateCurtainHeight, bool); 00095 00097 00098 vtkSetClampMacro(CurtainHeight,double,0.0,VTK_DOUBLE_MAX); 00099 vtkGetMacro(CurtainHeight,double); 00101 00103 00109 vtkSetMacro(QuadrilateralTessellation,int); 00110 vtkGetMacro(QuadrilateralTessellation,int); 00111 vtkBooleanMacro(QuadrilateralTessellation,int); 00113 00117 static vtkGlobeSource *New(); 00118 00120 00122 static void ComputeGlobePoint( 00123 double theta, double phi, double radius, double* point, double* normal = 0); 00125 00127 00129 static void ComputeLatitudeLongitude( 00130 double* x, double& theta, double& phi); 00132 00133 protected: 00134 vtkGlobeSource(); 00135 ~vtkGlobeSource() {} 00136 00137 int RequestData( 00138 vtkInformation *, 00139 vtkInformationVector **, 00140 vtkInformationVector *); 00141 int RequestInformation( 00142 vtkInformation *, 00143 vtkInformationVector **, 00144 vtkInformationVector *); 00145 00146 void AddPoint( 00147 double theta, double phi, double radius, 00148 vtkPoints* newPoints, vtkFloatArray* newNormals, 00149 vtkFloatArray* newLongitudeArray, vtkFloatArray* newLatitudeArray, 00150 vtkDoubleArray* newLatLongArray); 00151 00152 00153 double Origin[3]; 00154 double Radius; 00155 00156 bool AutoCalculateCurtainHeight; 00157 double CurtainHeight; 00158 00159 int LongitudeResolution; 00160 int LatitudeResolution; 00161 00162 double StartLongitude; 00163 double EndLongitude; 00164 double StartLatitude; 00165 double EndLatitude; 00166 00167 int QuadrilateralTessellation; 00168 00169 private: 00170 vtkGlobeSource(const vtkGlobeSource&); // Not implemented. 00171 void operator=(const vtkGlobeSource&); // Not implemented. 00172 }; 00173 00174 #endif