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 
39 #ifndef vtkGlobeSource_h
40 #define vtkGlobeSource_h
41 
42 #include "vtkGeovisCoreModule.h" // For export macro
43 #include "vtkPolyDataAlgorithm.h"
44 
45 class vtkCellArray;
46 class vtkFloatArray;
47 
48 
50 {
51 public:
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
55 
57 
59  vtkSetVector3Macro(Origin, double);
61 
63 
64  vtkSetClampMacro(StartLongitude,double,-180.0,180.0);
65  vtkSetClampMacro(EndLongitude,double,-180.0,180.0);
66  vtkSetClampMacro(StartLatitude,double,-90.0,90.0);
67  vtkSetClampMacro(EndLatitude,double,-90.0,90.0);
69 
71 
73  vtkSetClampMacro(LongitudeResolution,int,3,100);
74  vtkGetMacro(LongitudeResolution,int);
76 
78 
80  vtkSetClampMacro(LatitudeResolution,int,3,100);
81  vtkGetMacro(LatitudeResolution,int);
83 
85 
86  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
87  vtkGetMacro(Radius,double);
89 
91  vtkSetMacro(AutoCalculateCurtainHeight, bool);
92  vtkGetMacro(AutoCalculateCurtainHeight, bool);
93  vtkBooleanMacro(AutoCalculateCurtainHeight, bool);
95 
97 
98  vtkSetClampMacro(CurtainHeight,double,0.0,VTK_DOUBLE_MAX);
99  vtkGetMacro(CurtainHeight,double);
101 
103 
109  vtkSetMacro(QuadrilateralTessellation,int);
110  vtkGetMacro(QuadrilateralTessellation,int);
111  vtkBooleanMacro(QuadrilateralTessellation,int);
113 
117  static vtkGlobeSource *New();
118 
120 
122  static void ComputeGlobePoint(
123  double theta, double phi, double radius, double* point, double* normal = 0);
125 
127 
129  static void ComputeLatitudeLongitude(
130  double* x, double& theta, double& phi);
132 
133 protected:
134  vtkGlobeSource();
136 
137  int RequestData(
138  vtkInformation *,
141 
142  void AddPoint(
143  double theta, double phi, double radius,
144  vtkPoints* newPoints, vtkFloatArray* newNormals,
145  vtkFloatArray* newLongitudeArray, vtkFloatArray* newLatitudeArray,
146  vtkDoubleArray* newLatLongArray);
147 
148 
149  double Origin[3];
150  double Radius;
151 
154 
157 
159  double EndLongitude;
161  double EndLatitude;
162 
164 
165 private:
166  vtkGlobeSource(const vtkGlobeSource&); // Not implemented.
167  void operator=(const vtkGlobeSource&); // Not implemented.
168 };
169 
170 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:142
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:45
dynamic, self-adjusting array of double
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:38
int QuadrilateralTessellation
#define VTKGEOVISCORE_EXPORT
object to represent cell connectivity
Definition: vtkCellArray.h:49
Store zero or more vtkInformation instances.
Sphere patch with Lat/Long scalar array.
represent and manipulate 3D points
Definition: vtkPoints.h:38
bool AutoCalculateCurtainHeight