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 
148  double* x, double& theta, double& phi);
149 
150 protected:
153 
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:40
vtkFloatArray
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkGlobeSource::New
static vtkGlobeSource * New()
Construct sphere with radius=0.5 and default resolution 8 in both latitude and longitude directions.
vtkGlobeSource::QuadrilateralTessellation
int QuadrilateralTessellation
Definition: vtkGlobeSource.h:180
vtkGlobeSource
Sphere patch with Lat/Long scalar array.
Definition: vtkGlobeSource.h:51
vtkPolyDataAlgorithm.h
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkGlobeSource::EndLatitude
double EndLatitude
Definition: vtkGlobeSource.h:178
vtkGlobeSource::StartLatitude
double StartLatitude
Definition: vtkGlobeSource.h:177
vtkGlobeSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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:40
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:51
vtkGlobeSource::StartLongitude
double StartLongitude
Definition: vtkGlobeSource.h:175
vtkGlobeSource::ComputeGlobePoint
static void ComputeGlobePoint(double theta, double phi, double radius, double *point, double *normal=0)
Calculates the normal and point on a sphere with a specified radius at the spherical coordinates thet...
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:87
vtkGlobeSource::vtkGlobeSource
vtkGlobeSource()
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGlobeSource::Radius
double Radius
Definition: vtkGlobeSource.h:167
vtkGlobeSource::AddPoint
void AddPoint(double theta, double phi, double radius, vtkPoints *newPoints, vtkFloatArray *newNormals, vtkFloatArray *newLongitudeArray, vtkFloatArray *newLatitudeArray, vtkDoubleArray *newLatLongArray)
vtkGlobeSource::EndLongitude
double EndLongitude
Definition: vtkGlobeSource.h:176
vtkGlobeSource::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:42
vtkGlobeSource::LongitudeResolution
int LongitudeResolution
Definition: vtkGlobeSource.h:172
vtkGlobeSource::ComputeLatitudeLongitude
static void ComputeLatitudeLongitude(double *x, double &theta, double &phi)
Calculates the spherical coordinates theta and phi based on the point on a sphere.
vtkX3D::radius
@ radius
Definition: vtkX3D.h:252
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:45