VTK
vtkGlobeSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGlobeSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 /*-------------------------------------------------------------------------
17  Copyright 2008 Sandia Corporation.
18  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
19  the U.S. Government retains certain rights in this software.
20 -------------------------------------------------------------------------*/
21 
40 #ifndef vtkGlobeSource_h
41 #define vtkGlobeSource_h
42 
43 #include "vtkGeovisCoreModule.h" // For export macro
44 #include "vtkPolyDataAlgorithm.h"
45 
46 class vtkCellArray;
47 class vtkFloatArray;
48 
49 
50 class VTKGEOVISCORE_EXPORT vtkGlobeSource : public vtkPolyDataAlgorithm
51 {
52 public:
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
56 
58 
62  vtkSetVector3Macro(Origin, double);
64 
66 
69  vtkSetClampMacro(StartLongitude,double,-180.0,180.0);
70  vtkSetClampMacro(EndLongitude,double,-180.0,180.0);
71  vtkSetClampMacro(StartLatitude,double,-90.0,90.0);
72  vtkSetClampMacro(EndLatitude,double,-90.0,90.0);
74 
76 
80  vtkSetClampMacro(LongitudeResolution,int,3,100);
81  vtkGetMacro(LongitudeResolution,int);
83 
85 
89  vtkSetClampMacro(LatitudeResolution,int,3,100);
90  vtkGetMacro(LatitudeResolution,int);
92 
94 
97  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
98  vtkGetMacro(Radius,double);
100 
102  vtkSetMacro(AutoCalculateCurtainHeight, bool);
103  vtkGetMacro(AutoCalculateCurtainHeight, bool);
104  vtkBooleanMacro(AutoCalculateCurtainHeight, bool);
106 
108 
111  vtkSetClampMacro(CurtainHeight,double,0.0,VTK_DOUBLE_MAX);
112  vtkGetMacro(CurtainHeight,double);
114 
116 
124  vtkSetMacro(QuadrilateralTessellation,int);
125  vtkGetMacro(QuadrilateralTessellation,int);
126  vtkBooleanMacro(QuadrilateralTessellation,int);
128 
134  static vtkGlobeSource *New();
135 
140  static void ComputeGlobePoint(
141  double theta, double phi, double radius, double* point, double* normal = 0);
142 
147  static void ComputeLatitudeLongitude(
148  double* x, double& theta, double& phi);
149 
150 protected:
151  vtkGlobeSource();
153 
154  int RequestData(
155  vtkInformation *,
158 
159  void AddPoint(
160  double theta, double phi, double radius,
161  vtkPoints* newPoints, vtkFloatArray* newNormals,
162  vtkFloatArray* newLongitudeArray, vtkFloatArray* newLatitudeArray,
163  vtkDoubleArray* newLatLongArray);
164 
165 
166  double Origin[3];
167  double Radius;
168 
171 
174 
176  double EndLongitude;
178  double EndLatitude;
179 
181 
182 private:
183  vtkGlobeSource(const vtkGlobeSource&) VTK_DELETE_FUNCTION;
184  void operator=(const vtkGlobeSource&) VTK_DELETE_FUNCTION;
185 };
186 
187 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:41
dynamic, self-adjusting array of double
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
int QuadrilateralTessellation
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
object to represent cell connectivity
Definition: vtkCellArray.h:50
Store zero or more vtkInformation instances.
Sphere patch with Lat/Long scalar array.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
represent and manipulate 3D points
Definition: vtkPoints.h:39
bool AutoCalculateCurtainHeight
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.