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
45
46class vtkCellArray;
47class vtkFloatArray;
48
49
50class VTKGEOVISCORE_EXPORT vtkGlobeSource : public vtkPolyDataAlgorithm
51{
52public:
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
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
150protected:
153
158
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
179
181
182private:
183 vtkGlobeSource(const vtkGlobeSource&) VTK_DELETE_FUNCTION;
184 void operator=(const vtkGlobeSource&) VTK_DELETE_FUNCTION;
185};
186
187#endif
object to represent cell connectivity
Definition: vtkCellArray.h:51
dynamic, self-adjusting array of double
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
Sphere patch with Lat/Long scalar array.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
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...
bool AutoCalculateCurtainHeight
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void AddPoint(double theta, double phi, double radius, vtkPoints *newPoints, vtkFloatArray *newNormals, vtkFloatArray *newLongitudeArray, vtkFloatArray *newLatitudeArray, vtkDoubleArray *newLatLongArray)
static void ComputeLatitudeLongitude(double *x, double &theta, double &phi)
Calculates the spherical coordinates theta and phi based on the point on a sphere.
int QuadrilateralTessellation
static vtkGlobeSource * New()
Construct sphere with radius=0.5 and default resolution 8 in both latitude and longitude directions.
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:40
Superclass for algorithms that produce only polydata as output.
@ point
Definition: vtkX3D.h:236
@ radius
Definition: vtkX3D.h:252
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163