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 class VTKGEOVISCORE_EXPORT vtkGlobeSource : public vtkPolyDataAlgorithm
48 {
49 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
53 
55 
59  vtkSetVector3Macro(Origin, double);
61 
63 
66  vtkSetClampMacro(StartLongitude,double,-180.0,180.0);
67  vtkSetClampMacro(EndLongitude,double,-180.0,180.0);
68  vtkSetClampMacro(StartLatitude,double,-90.0,90.0);
69  vtkSetClampMacro(EndLatitude,double,-90.0,90.0);
71 
73 
77  vtkSetClampMacro(LongitudeResolution,int,3,100);
78  vtkGetMacro(LongitudeResolution,int);
80 
82 
86  vtkSetClampMacro(LatitudeResolution,int,3,100);
87  vtkGetMacro(LatitudeResolution,int);
89 
91 
94  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
95  vtkGetMacro(Radius,double);
97 
99  vtkSetMacro(AutoCalculateCurtainHeight, bool);
100  vtkGetMacro(AutoCalculateCurtainHeight, bool);
101  vtkBooleanMacro(AutoCalculateCurtainHeight, bool);
103 
105 
108  vtkSetClampMacro(CurtainHeight,double,0.0,VTK_DOUBLE_MAX);
109  vtkGetMacro(CurtainHeight,double);
111 
113 
121  vtkSetMacro(QuadrilateralTessellation,vtkTypeBool);
122  vtkGetMacro(QuadrilateralTessellation,vtkTypeBool);
123  vtkBooleanMacro(QuadrilateralTessellation,vtkTypeBool);
125 
131  static vtkGlobeSource *New();
132 
137  static void ComputeGlobePoint(
138  double theta, double phi, double radius, double* point, double* normal = nullptr);
139 
144  static void ComputeLatitudeLongitude(
145  double* x, double& theta, double& phi);
146 
147 protected:
148  vtkGlobeSource();
149  ~vtkGlobeSource() override {}
150 
151  int RequestData(
152  vtkInformation *,
154  vtkInformationVector *) override;
155 
156  void AddPoint(
157  double theta, double phi, double radius,
158  vtkPoints* newPoints, vtkFloatArray* newNormals,
159  vtkFloatArray* newLongitudeArray, vtkFloatArray* newLatitudeArray,
160  vtkDoubleArray* newLatLongArray);
161 
162 
163  double Origin[3];
164  double Radius;
165 
168 
171 
173  double EndLongitude;
175  double EndLatitude;
176 
178 
179 private:
180  vtkGlobeSource(const vtkGlobeSource&) = delete;
181  void operator=(const vtkGlobeSource&) = delete;
182 };
183 
184 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:167
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.