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 class VTKGEOVISCORE_EXPORT vtkGeoGraticule : public vtkPolyDataAlgorithm
46 {
47 public:
48  static vtkGeoGraticule* New();
49  virtual void PrintSelf( ostream& os, vtkIndent indent );
51 
53 
56  vtkSetVector2Macro(LatitudeBounds,double);
57  vtkGetVector2Macro(LatitudeBounds,double);
59 
61 
64  vtkSetVector2Macro(LongitudeBounds,double);
65  vtkGetVector2Macro(LongitudeBounds,double);
67 
68  enum LevelLimits {
69  LEVEL_MIN = 0,
70  LEVEL_MAX = 11,
71  NUMBER_OF_LEVELS = ( LEVEL_MAX - LEVEL_MIN + 1 )
72  };
73 
75 
78  vtkSetClampMacro(LatitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
79  vtkGetMacro(LatitudeLevel,int);
81 
83 
86  vtkSetClampMacro(LongitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
87  vtkGetMacro(LongitudeLevel,int);
89 
93  static double GetLatitudeDelta(int level)
94  { return LatitudeLevelTics[level]; }
95 
99  static double GetLongitudeDelta(int level)
100  { return LongitudeLevelTics[level]; }
101 
103 
109  vtkSetMacro(GeometryType,int);
110  vtkGetMacro(GeometryType,int);
112 
114  POLYLINES = 0x1,
115  QUADRILATERALS = 0x2
116  };
117 
118 protected:
119  vtkGeoGraticule();
120  virtual ~vtkGeoGraticule();
121 
123  double LatitudeBounds[2];
124  double LongitudeBounds[2];
127 
129 
132  static double LatitudeLevelTics[NUMBER_OF_LEVELS];
133  static double LongitudeLevelTics[NUMBER_OF_LEVELS];
135 
137 
138  void GenerateGraticule( vtkPolyData* output, double latbds[2], double lngbds[2] );
139  int ComputeLineLevel( int ticId, int baseLevel, const double* levelIncrements );
140 
141 private:
142  vtkGeoGraticule( const vtkGeoGraticule& ) VTK_DELETE_FUNCTION;
143  void operator = ( const vtkGeoGraticule& ) VTK_DELETE_FUNCTION;
144 };
145 
146 #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.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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.