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 "vtkPolyDataAlgorithm.h"
43 
44 class vtkCellArray;
45 class vtkFloatArray;
46 
47 
49 {
50 public:
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
54 
55  // Descrpition:
56  // This world point will be shifted to 0,0,0.
57  // Used to avoid picking bug caused by rendering errors with large offsets.
58  vtkSetVector3Macro(Origin, double);
59 
61 
62  vtkSetClampMacro(StartLongitude,double,-180.0,180.0);
63  vtkSetClampMacro(EndLongitude,double,-180.0,180.0);
64  vtkSetClampMacro(StartLatitude,double,-90.0,90.0);
65  vtkSetClampMacro(EndLatitude,double,-90.0,90.0);
67 
69 
71  vtkSetClampMacro(LongitudeResolution,int,3,100);
72  vtkGetMacro(LongitudeResolution,int);
74 
76 
78  vtkSetClampMacro(LatitudeResolution,int,3,100);
79  vtkGetMacro(LatitudeResolution,int);
81 
83 
84  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
85  vtkGetMacro(Radius,double);
87 
89  vtkSetMacro(AutoCalculateCurtainHeight, bool);
90  vtkGetMacro(AutoCalculateCurtainHeight, bool);
91  vtkBooleanMacro(AutoCalculateCurtainHeight, bool);
93 
95 
96  vtkSetClampMacro(CurtainHeight,double,0.0,VTK_DOUBLE_MAX);
97  vtkGetMacro(CurtainHeight,double);
99 
101 
107  vtkSetMacro(QuadrilateralTessellation,int);
108  vtkGetMacro(QuadrilateralTessellation,int);
109  vtkBooleanMacro(QuadrilateralTessellation,int);
111 
115  static vtkGlobeSource *New();
116 
118 
120  static void ComputeGlobePoint(
121  double theta, double phi, double radius, double* point, double* normal = 0);
123 
125 
127  static void ComputeLatitudeLongitude(
128  double* x, double& theta, double& phi);
130 
131 protected:
132  vtkGlobeSource();
134 
135  int RequestData(
136  vtkInformation *,
139  int RequestInformation(
140  vtkInformation *,
143 
144  void AddPoint(
145  double theta, double phi, double radius,
146  vtkPoints* newPoints, vtkFloatArray* newNormals,
147  vtkFloatArray* newLongitudeArray, vtkFloatArray* newLatitudeArray,
148  vtkDoubleArray* newLatLongArray);
149 
150 
151  double Origin[3];
152  double Radius;
153 
156 
159 
161  double EndLongitude;
163  double EndLatitude;
164 
166 
167 private:
168  vtkGlobeSource(const vtkGlobeSource&); // Not implemented.
169  void operator=(const vtkGlobeSource&); // Not implemented.
170 };
171 
172 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:133
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
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:37
int QuadrilateralTessellation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_GEOVIS_EXPORT
object to represent cell connectivity
Definition: vtkCellArray.h:48
Store zero or more vtkInformation instances.
Sphere patch with Lat/Long scalar array.
represent and manipulate 3D points
Definition: vtkPoints.h:38
bool AutoCalculateCurtainHeight