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 #if !defined(VTK_LEGACY_REMOVE)
51 class VTKGEOVISCORE_EXPORT vtkGlobeSource : public vtkPolyDataAlgorithm
52 {
53 public:
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
57 
59 
63  vtkSetVector3Macro(Origin, double);
65 
67 
70  vtkSetClampMacro(StartLongitude,double,-180.0,180.0);
71  vtkSetClampMacro(EndLongitude,double,-180.0,180.0);
72  vtkSetClampMacro(StartLatitude,double,-90.0,90.0);
73  vtkSetClampMacro(EndLatitude,double,-90.0,90.0);
75 
77 
81  vtkSetClampMacro(LongitudeResolution,int,3,100);
82  vtkGetMacro(LongitudeResolution,int);
84 
86 
90  vtkSetClampMacro(LatitudeResolution,int,3,100);
91  vtkGetMacro(LatitudeResolution,int);
93 
95 
98  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
99  vtkGetMacro(Radius,double);
101 
103  vtkSetMacro(AutoCalculateCurtainHeight, bool);
104  vtkGetMacro(AutoCalculateCurtainHeight, bool);
105  vtkBooleanMacro(AutoCalculateCurtainHeight, bool);
107 
109 
112  vtkSetClampMacro(CurtainHeight,double,0.0,VTK_DOUBLE_MAX);
113  vtkGetMacro(CurtainHeight,double);
115 
117 
125  vtkSetMacro(QuadrilateralTessellation,vtkTypeBool);
126  vtkGetMacro(QuadrilateralTessellation,vtkTypeBool);
127  vtkBooleanMacro(QuadrilateralTessellation,vtkTypeBool);
129 
135  static vtkGlobeSource *New();
136 
141  static void ComputeGlobePoint(
142  double theta, double phi, double radius, double* point, double* normal = nullptr);
143 
148  static void ComputeLatitudeLongitude(
149  double* x, double& theta, double& phi);
150 
151 protected:
152  vtkGlobeSource();
153  ~vtkGlobeSource() override {}
154 
155  int RequestData(
156  vtkInformation *,
158  vtkInformationVector *) override;
159 
160  void AddPoint(
161  double theta, double phi, double radius,
162  vtkPoints* newPoints, vtkFloatArray* newNormals,
163  vtkFloatArray* newLongitudeArray, vtkFloatArray* newLatitudeArray,
164  vtkDoubleArray* newLatLongArray);
165 
166 
167  double Origin[3];
168  double Radius;
169 
172 
175 
177  double EndLongitude;
179  double EndLatitude;
180 
182 
183 private:
184  vtkGlobeSource(const vtkGlobeSource&) = delete;
185  void operator=(const vtkGlobeSource&) = delete;
186 };
187 
188 #endif //VTK_LEGACY_REMOVE
189 #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:41
~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:39
object to represent cell connectivity
Definition: vtkCellArray.h:50
Store zero or more vtkInformation instances.
Sphere patch with Lat/Long scalar array.
vtkTypeBool QuadrilateralTessellation
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.