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 
37 #ifndef vtkGlobeSource_h
38 #define vtkGlobeSource_h
39 
40 #include "vtkGeovisCoreModule.h" // For export macro
41 #include "vtkPolyDataAlgorithm.h"
42 
43 class vtkCellArray;
44 class vtkFloatArray;
45 
46 
47 #if !defined(VTK_LEGACY_REMOVE)
48 class VTKGEOVISCORE_EXPORT vtkGlobeSource : public vtkPolyDataAlgorithm
49 {
50 public:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
54 
56 
60  vtkSetVector3Macro(Origin, double);
62 
64 
67  vtkSetClampMacro(StartLongitude,double,-180.0,180.0);
68  vtkSetClampMacro(EndLongitude,double,-180.0,180.0);
69  vtkSetClampMacro(StartLatitude,double,-90.0,90.0);
70  vtkSetClampMacro(EndLatitude,double,-90.0,90.0);
72 
74 
78  vtkSetClampMacro(LongitudeResolution,int,3,100);
79  vtkGetMacro(LongitudeResolution,int);
81 
83 
87  vtkSetClampMacro(LatitudeResolution,int,3,100);
88  vtkGetMacro(LatitudeResolution,int);
90 
92 
95  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
96  vtkGetMacro(Radius,double);
98 
100  vtkSetMacro(AutoCalculateCurtainHeight, bool);
101  vtkGetMacro(AutoCalculateCurtainHeight, bool);
102  vtkBooleanMacro(AutoCalculateCurtainHeight, bool);
104 
106 
109  vtkSetClampMacro(CurtainHeight,double,0.0,VTK_DOUBLE_MAX);
110  vtkGetMacro(CurtainHeight,double);
112 
114 
122  vtkSetMacro(QuadrilateralTessellation,vtkTypeBool);
123  vtkGetMacro(QuadrilateralTessellation,vtkTypeBool);
124  vtkBooleanMacro(QuadrilateralTessellation,vtkTypeBool);
126 
132  static vtkGlobeSource *New();
133 
138  static void ComputeGlobePoint(
139  double theta, double phi, double radius, double* point, double* normal = nullptr);
140 
145  static void ComputeLatitudeLongitude(
146  double* x, double& theta, double& phi);
147 
148 protected:
149  vtkGlobeSource();
150  ~vtkGlobeSource() override {}
151 
152  int RequestData(
153  vtkInformation *,
155  vtkInformationVector *) override;
156 
157  void AddPoint(
158  double theta, double phi, double radius,
159  vtkPoints* newPoints, vtkFloatArray* newNormals,
160  vtkFloatArray* newLongitudeArray, vtkFloatArray* newLatitudeArray,
161  vtkDoubleArray* newLatLongArray);
162 
163 
164  double Origin[3];
165  double Radius;
166 
169 
172 
174  double EndLongitude;
176  double EndLatitude;
177 
179 
180 private:
181  vtkGlobeSource(const vtkGlobeSource&) = delete;
182  void operator=(const vtkGlobeSource&) = delete;
183 };
184 
185 #endif //VTK_LEGACY_REMOVE
186 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
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:35
~vtkGlobeSource() override
dynamic, self-adjusting array of double
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
object to represent cell connectivity
Definition: vtkCellArray.h:44
Store zero or more vtkInformation instances.
Sphere patch with Lat/Long scalar array.
vtkTypeBool QuadrilateralTessellation
represent and manipulate 3D points
Definition: vtkPoints.h:33
bool AutoCalculateCurtainHeight
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.