00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00036 #ifndef __vtkGlobeSource_h
00037 #define __vtkGlobeSource_h
00038
00039 #include "vtkPolyDataAlgorithm.h"
00040
00041 class vtkCellArray;
00042 class vtkFloatArray;
00043
00044
00045 class VTK_GEOVIS_EXPORT vtkGlobeSource : public vtkPolyDataAlgorithm
00046 {
00047 public:
00048 vtkTypeMacro(vtkGlobeSource,vtkPolyDataAlgorithm);
00049 void PrintSelf(ostream& os, vtkIndent indent);
00050
00051
00052
00053
00054
00055 vtkSetVector3Macro(Origin, double);
00056
00058
00059 vtkSetClampMacro(StartLongitude,double,-180.0,180.0);
00060 vtkSetClampMacro(EndLongitude,double,-180.0,180.0);
00061 vtkSetClampMacro(StartLatitude,double,-90.0,90.0);
00062 vtkSetClampMacro(EndLatitude,double,-90.0,90.0);
00064
00066
00068 vtkSetClampMacro(LongitudeResolution,int,3,100);
00069 vtkGetMacro(LongitudeResolution,int);
00071
00073
00075 vtkSetClampMacro(LatitudeResolution,int,3,100);
00076 vtkGetMacro(LatitudeResolution,int);
00078
00080
00081 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
00082 vtkGetMacro(Radius,double);
00084
00085 vtkSetClampMacro(CurtainHeight,double,0.0,VTK_DOUBLE_MAX);
00086 vtkGetMacro(CurtainHeight,double);
00087
00089
00095 vtkSetMacro(QuadrilateralTessellation,int);
00096 vtkGetMacro(QuadrilateralTessellation,int);
00097 vtkBooleanMacro(QuadrilateralTessellation,int);
00099
00103 static vtkGlobeSource *New();
00104
00106
00108 static void ComputeGlobePoint(
00109 double theta, double phi, double radius, double* point, double* normal = 0);
00111
00113
00115 static void ComputeLatitudeLongitude(
00116 double* x, double& theta, double& phi);
00118
00119 protected:
00120 vtkGlobeSource();
00121 ~vtkGlobeSource() {}
00122
00123 int RequestData(
00124 vtkInformation *,
00125 vtkInformationVector **,
00126 vtkInformationVector *);
00127 int RequestInformation(
00128 vtkInformation *,
00129 vtkInformationVector **,
00130 vtkInformationVector *);
00131
00132 void AddPoint(
00133 double theta, double phi, double radius,
00134 vtkPoints* newPoints, vtkFloatArray* newNormals,
00135 vtkFloatArray* newLongitudeArray, vtkFloatArray* newLatitudeArray,
00136 vtkDoubleArray* newLatLongArray);
00137
00138
00139 double Origin[3];
00140 double Radius;
00141 double CurtainHeight;
00142 int LongitudeResolution;
00143 int LatitudeResolution;
00144 double StartLongitude;
00145 double EndLongitude;
00146 double StartLatitude;
00147 double EndLatitude;
00148 int QuadrilateralTessellation;
00149
00150 private:
00151 vtkGlobeSource(const vtkGlobeSource&);
00152 void operator=(const vtkGlobeSource&);
00153 };
00154
00155 #endif