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