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 #if !defined(VTK_LEGACY_REMOVE)
43 class VTKGEOVISCORE_EXPORT vtkGeoGraticule : public vtkPolyDataAlgorithm
44 {
45 public:
46  static vtkGeoGraticule* New();
47  void PrintSelf( ostream& os, vtkIndent indent ) override;
49 
51 
54  vtkSetVector2Macro(LatitudeBounds,double);
55  vtkGetVector2Macro(LatitudeBounds,double);
57 
59 
62  vtkSetVector2Macro(LongitudeBounds,double);
63  vtkGetVector2Macro(LongitudeBounds,double);
65 
66  enum LevelLimits {
67  LEVEL_MIN = 0,
68  LEVEL_MAX = 11,
69  NUMBER_OF_LEVELS = ( LEVEL_MAX - LEVEL_MIN + 1 )
70  };
71 
73 
76  vtkSetClampMacro(LatitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
77  vtkGetMacro(LatitudeLevel,int);
79 
81 
84  vtkSetClampMacro(LongitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
85  vtkGetMacro(LongitudeLevel,int);
87 
91  static double GetLatitudeDelta(int level)
92  { return LatitudeLevelTics[level]; }
93 
97  static double GetLongitudeDelta(int level)
98  { return LongitudeLevelTics[level]; }
99 
101 
107  vtkSetMacro(GeometryType,int);
108  vtkGetMacro(GeometryType,int);
110 
112  POLYLINES = 0x1,
113  QUADRILATERALS = 0x2
114  };
115 
116 protected:
117  vtkGeoGraticule();
118  ~vtkGeoGraticule() override;
119 
121  double LatitudeBounds[2];
122  double LongitudeBounds[2];
125 
127 
130  static double LatitudeLevelTics[NUMBER_OF_LEVELS];
131  static double LongitudeLevelTics[NUMBER_OF_LEVELS];
133 
135 
136  void GenerateGraticule( vtkPolyData* output, double latbds[2], double lngbds[2] );
137  int ComputeLineLevel( int ticId, int baseLevel, const double* levelIncrements );
138 
139 private:
140  vtkGeoGraticule( const vtkGeoGraticule& ) = delete;
141  void operator = ( const vtkGeoGraticule& ) = delete;
142 };
143 
144 #endif //VTK_LEGACY_REMOVE
145 #endif // vtkGeoGraticule_h
vtkGeoGraticule::LevelLimits
LevelLimits
Definition: vtkGeoGraticule.h:66
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkGeoGraticule::LongitudeLevel
int LongitudeLevel
Definition: vtkGeoGraticule.h:124
vtkGeoGraticule::GeometryType
int GeometryType
Definition: vtkGeoGraticule.h:120
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGeoGraticule::LatitudeLevel
int LatitudeLevel
Definition: vtkGeoGraticule.h:123
vtkGeoGraticule::GetLongitudeDelta
static double GetLongitudeDelta(int level)
The longitude delta at a certain frequency level.
Definition: vtkGeoGraticule.h:97
vtkGeoGraticule::GetLatitudeDelta
static double GetLatitudeDelta(int level)
The latitude delta at a certain frequency level.
Definition: vtkGeoGraticule.h:91
vtkPolyDataAlgorithm.h
vtkX3D::level
Definition: vtkX3D.h:395
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkGeoGraticule
Create a polygonal lat-long grid.
Definition: vtkGeoGraticule.h:43
vtkGeoGraticule::GeometryType
GeometryType
Definition: vtkGeoGraticule.h:111
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41