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 -------------------------------------------------------------------------*/
34 #ifndef vtkGeoGraticule_h
35 #define vtkGeoGraticule_h
36 
37 #include "vtkGeovisCoreModule.h" // For export macro
38 #include "vtkPolyDataAlgorithm.h"
39 
40 class vtkPolyData;
41 
42 class VTKGEOVISCORE_EXPORT vtkGeoGraticule : public vtkPolyDataAlgorithm
43 {
44 public:
45  static vtkGeoGraticule* New();
46  void PrintSelf( ostream& os, vtkIndent indent ) override;
48 
50 
53  vtkSetVector2Macro(LatitudeBounds,double);
54  vtkGetVector2Macro(LatitudeBounds,double);
56 
58 
61  vtkSetVector2Macro(LongitudeBounds,double);
62  vtkGetVector2Macro(LongitudeBounds,double);
64 
65  enum LevelLimits {
66  LEVEL_MIN = 0,
67  LEVEL_MAX = 11,
68  NUMBER_OF_LEVELS = ( LEVEL_MAX - LEVEL_MIN + 1 )
69  };
70 
72 
75  vtkSetClampMacro(LatitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
76  vtkGetMacro(LatitudeLevel,int);
78 
80 
83  vtkSetClampMacro(LongitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
84  vtkGetMacro(LongitudeLevel,int);
86 
90  static double GetLatitudeDelta(int level)
91  { return LatitudeLevelTics[level]; }
92 
96  static double GetLongitudeDelta(int level)
97  { return LongitudeLevelTics[level]; }
98 
100 
106  vtkSetMacro(GeometryType,int);
107  vtkGetMacro(GeometryType,int);
109 
111  POLYLINES = 0x1,
112  QUADRILATERALS = 0x2
113  };
114 
115 protected:
116  vtkGeoGraticule();
117  ~vtkGeoGraticule() override;
118 
120  double LatitudeBounds[2];
121  double LongitudeBounds[2];
124 
126 
129  static double LatitudeLevelTics[NUMBER_OF_LEVELS];
130  static double LongitudeLevelTics[NUMBER_OF_LEVELS];
132 
134 
135  void GenerateGraticule( vtkPolyData* output, double latbds[2], double lngbds[2] );
136  int ComputeLineLevel( int ticId, int baseLevel, const double* levelIncrements );
137 
138 private:
139  vtkGeoGraticule( const vtkGeoGraticule& ) = delete;
140  void operator = ( const vtkGeoGraticule& ) = delete;
141 };
142 
143 #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:79
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
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.