VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Geovis/Core/vtkGlobeSource.h
Go to the documentation of this file.
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 
00142   void AddPoint(
00143     double theta, double phi, double radius,
00144     vtkPoints* newPoints, vtkFloatArray* newNormals,
00145     vtkFloatArray* newLongitudeArray, vtkFloatArray* newLatitudeArray,
00146     vtkDoubleArray* newLatLongArray);
00147 
00148 
00149   double Origin[3];
00150   double Radius;
00151 
00152   bool   AutoCalculateCurtainHeight;
00153   double CurtainHeight;
00154 
00155   int LongitudeResolution;
00156   int LatitudeResolution;
00157 
00158   double StartLongitude;
00159   double EndLongitude;
00160   double StartLatitude;
00161   double EndLatitude;
00162 
00163   int QuadrilateralTessellation;
00164 
00165 private:
00166   vtkGlobeSource(const vtkGlobeSource&);  // Not implemented.
00167   void operator=(const vtkGlobeSource&);  // Not implemented.
00168 };
00169 
00170 #endif