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 -------------------------------------------------------------------------*/
36 #ifndef __vtkGeoGraticule_h
37 #define __vtkGeoGraticule_h
38 
39 #include "vtkPolyDataAlgorithm.h"
40 
41 class vtkPolyData;
42 
44 {
45 public:
46  static vtkGeoGraticule* New();
47  virtual void PrintSelf( ostream& os, vtkIndent indent );
49 
51 
52  vtkSetVector2Macro(LatitudeBounds,double);
53  vtkGetVector2Macro(LatitudeBounds,double);
55 
57 
58  vtkSetVector2Macro(LongitudeBounds,double);
59  vtkGetVector2Macro(LongitudeBounds,double);
61 
62  //BTX
63  enum LevelLimits {
64  LEVEL_MIN = 0,
65  LEVEL_MAX = 11,
66  NUMBER_OF_LEVELS = ( LEVEL_MAX - LEVEL_MIN + 1 )
67  };
68  //ETX
69 
71 
72  vtkSetClampMacro(LatitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
73  vtkGetMacro(LatitudeLevel,int);
75 
77 
78  vtkSetClampMacro(LongitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
79  vtkGetMacro(LongitudeLevel,int);
81 
83 
84  static double GetLatitudeDelta(int level)
85  { return LatitudeLevelTics[level]; }
87 
89 
90  static double GetLongitudeDelta(int level)
91  { return LongitudeLevelTics[level]; }
93 
95 
98  vtkSetMacro(GeometryType,int);
99  vtkGetMacro(GeometryType,int);
101 
102  //BTX
104  POLYLINES = 0x1,
105  QUADRILATERALS = 0x2
106  };
107  //ETX
108 
109 protected:
110  vtkGeoGraticule();
111  virtual ~vtkGeoGraticule();
112 
114  double LatitudeBounds[2];
115  double LongitudeBounds[2];
118 
120 
121  static double LatitudeLevelTics[NUMBER_OF_LEVELS];
122  static double LongitudeLevelTics[NUMBER_OF_LEVELS];
124 
126 
127  void GenerateGraticule( vtkPolyData* output, double latbds[2], double lngbds[2] );
128  int ComputeLineLevel( int ticId, int baseLevel, const double* levelIncrements );
129 
130 private:
131  vtkGeoGraticule( const vtkGeoGraticule& ); // Not implemented.
132  void operator = ( const vtkGeoGraticule& ); // Not implemented.
133 };
134 
135 #endif // __vtkGeoGraticule_h