00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00039 #ifndef __vtkGlobeSource_h
00040 #define __vtkGlobeSource_h
00041
00042 #include "vtkPolyDataAlgorithm.h"
00043
00044 class vtkCellArray;
00045 class vtkFloatArray;
00046
00047
00048 class VTK_GEOVIS_EXPORT vtkGlobeSource : public vtkPolyDataAlgorithm
00049 {
00050 public:
00051 vtkTypeMacro(vtkGlobeSource,vtkPolyDataAlgorithm);
00052 void PrintSelf(ostream& os, vtkIndent indent);
00053
00054
00055
00056
00057
00058 vtkSetVector3Macro(Origin, double);
00059
00061
00062 vtkSetClampMacro(StartLongitude,double,-180.0,180.0);
00063 vtkSetClampMacro(EndLongitude,double,-180.0,180.0);
00064 vtkSetClampMacro(StartLatitude,double,-90.0,90.0);
00065 vtkSetClampMacro(EndLatitude,double,-90.0,90.0);
00067
00069
00071 vtkSetClampMacro(LongitudeResolution,int,3,100);
00072 vtkGetMacro(LongitudeResolution,int);
00074
00076
00078 vtkSetClampMacro(LatitudeResolution,int,3,100);
00079 vtkGetMacro(LatitudeResolution,int);
00081
00083
00084 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
00085 vtkGetMacro(Radius,double);
00087
00089 vtkSetMacro(AutoCalculateCurtainHeight, bool);
00090 vtkGetMacro(AutoCalculateCurtainHeight, bool);
00091 vtkBooleanMacro(AutoCalculateCurtainHeight, bool);
00093
00095
00096 vtkSetClampMacro(CurtainHeight,double,0.0,VTK_DOUBLE_MAX);
00097 vtkGetMacro(CurtainHeight,double);
00099
00101
00107 vtkSetMacro(QuadrilateralTessellation,int);
00108 vtkGetMacro(QuadrilateralTessellation,int);
00109 vtkBooleanMacro(QuadrilateralTessellation,int);
00111
00115 static vtkGlobeSource *New();
00116
00118
00120 static void ComputeGlobePoint(
00121 double theta, double phi, double radius, double* point, double* normal = 0);
00123
00125
00127 static void ComputeLatitudeLongitude(
00128 double* x, double& theta, double& phi);
00130
00131 protected:
00132 vtkGlobeSource();
00133 ~vtkGlobeSource() {}
00134
00135 int RequestData(
00136 vtkInformation *,
00137 vtkInformationVector **,
00138 vtkInformationVector *);
00139 int RequestInformation(
00140 vtkInformation *,
00141 vtkInformationVector **,
00142 vtkInformationVector *);
00143
00144 void AddPoint(
00145 double theta, double phi, double radius,
00146 vtkPoints* newPoints, vtkFloatArray* newNormals,
00147 vtkFloatArray* newLongitudeArray, vtkFloatArray* newLatitudeArray,
00148 vtkDoubleArray* newLatLongArray);
00149
00150
00151 double Origin[3];
00152 double Radius;
00153
00154 bool AutoCalculateCurtainHeight;
00155 double CurtainHeight;
00156
00157 int LongitudeResolution;
00158 int LatitudeResolution;
00159
00160 double StartLongitude;
00161 double EndLongitude;
00162 double StartLatitude;
00163 double EndLatitude;
00164
00165 int QuadrilateralTessellation;
00166
00167 private:
00168 vtkGlobeSource(const vtkGlobeSource&);
00169 void operator=(const vtkGlobeSource&);
00170 };
00171
00172 #endif