VTK
vtkGeoGraticule.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeoGraticule.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  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
37 #ifndef vtkGeoGraticule_h
38 #define vtkGeoGraticule_h
39 
40 #include "vtkGeovisCoreModule.h" // For export macro
41 #include "vtkPolyDataAlgorithm.h"
42 
43 class vtkPolyData;
44 
45 #if !defined(VTK_LEGACY_REMOVE)
46 class VTKGEOVISCORE_EXPORT vtkGeoGraticule : public vtkPolyDataAlgorithm
47 {
48 public:
49  static vtkGeoGraticule* New();
50  void PrintSelf( ostream& os, vtkIndent indent ) override;
52 
54 
57  vtkSetVector2Macro(LatitudeBounds,double);
58  vtkGetVector2Macro(LatitudeBounds,double);
60 
62 
65  vtkSetVector2Macro(LongitudeBounds,double);
66  vtkGetVector2Macro(LongitudeBounds,double);
68 
69  enum LevelLimits {
70  LEVEL_MIN = 0,
71  LEVEL_MAX = 11,
72  NUMBER_OF_LEVELS = ( LEVEL_MAX - LEVEL_MIN + 1 )
73  };
74 
76 
79  vtkSetClampMacro(LatitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
80  vtkGetMacro(LatitudeLevel,int);
82 
84 
87  vtkSetClampMacro(LongitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
88  vtkGetMacro(LongitudeLevel,int);
90 
94  static double GetLatitudeDelta(int level)
95  { return LatitudeLevelTics[level]; }
96 
100  static double GetLongitudeDelta(int level)
101  { return LongitudeLevelTics[level]; }
102 
104 
110  vtkSetMacro(GeometryType,int);
111  vtkGetMacro(GeometryType,int);
113 
115  POLYLINES = 0x1,
116  QUADRILATERALS = 0x2
117  };
118 
119 protected:
120  vtkGeoGraticule();
121  ~vtkGeoGraticule() override;
122 
124  double LatitudeBounds[2];
125  double LongitudeBounds[2];
128 
130 
133  static double LatitudeLevelTics[NUMBER_OF_LEVELS];
134  static double LongitudeLevelTics[NUMBER_OF_LEVELS];
136 
138 
139  void GenerateGraticule( vtkPolyData* output, double latbds[2], double lngbds[2] );
140  int ComputeLineLevel( int ticId, int baseLevel, const double* levelIncrements );
141 
142 private:
143  vtkGeoGraticule( const vtkGeoGraticule& ) = delete;
144  void operator = ( const vtkGeoGraticule& ) = delete;
145 };
146 
147 #endif //VTK_LEGACY_REMOVE
148 #endif // vtkGeoGraticule_h
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
static double GetLatitudeDelta(int level)
The latitude delta at a certain frequency level.
Create a polygonal lat-long grid.
Store zero or more vtkInformation instances.
static double GetLongitudeDelta(int level)
The longitude delta at a certain frequency level.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.