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
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkGlobeSource::QuadrilateralTessellation
vtkTypeBool QuadrilateralTessellation
Definition: vtkGlobeSource.h:178
vtkFloatArray
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:35
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGlobeSource
Sphere patch with Lat/Long scalar array.
Definition: vtkGlobeSource.h:48
vtkPolyDataAlgorithm.h
vtkX3D::point
Definition: vtkX3D.h:236
vtkGlobeSource::EndLatitude
double EndLatitude
Definition: vtkGlobeSource.h:176
vtkGlobeSource::StartLatitude
double StartLatitude
Definition: vtkGlobeSource.h:175
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkGlobeSource::LatitudeResolution
int LatitudeResolution
Definition: vtkGlobeSource.h:171
vtkGlobeSource::CurtainHeight
double CurtainHeight
Definition: vtkGlobeSource.h:168
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:44
vtkGlobeSource::StartLongitude
double StartLongitude
Definition: vtkGlobeSource.h:173
vtkGlobeSource::AutoCalculateCurtainHeight
bool AutoCalculateCurtainHeight
Definition: vtkGlobeSource.h:167
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkGlobeSource::Radius
double Radius
Definition: vtkGlobeSource.h:165
vtkGlobeSource::~vtkGlobeSource
~vtkGlobeSource() override
Definition: vtkGlobeSource.h:150
vtkGlobeSource::EndLongitude
double EndLongitude
Definition: vtkGlobeSource.h:174
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:35
vtkGlobeSource::LongitudeResolution
int LongitudeResolution
Definition: vtkGlobeSource.h:170
vtkX3D::radius
Definition: vtkX3D.h:252
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41