VTK
vtkGeoMath.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeoMath.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 -------------------------------------------------------------------------*/
28 #ifndef vtkGeoMath_h
29 #define vtkGeoMath_h
30 
31 #include "vtkInfovisLayoutModule.h" // For export macro
32 #include "vtkObject.h"
33 
34 class VTKINFOVISLAYOUT_EXPORT vtkGeoMath : public vtkObject
35 {
36 public:
37  static vtkGeoMath *New();
38  vtkTypeMacro(vtkGeoMath, vtkObject);
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
44  static double EarthRadiusMeters() {return 6356750.0;}
45 
49  static double DistanceSquared(double pt0[3], double pt1[3]);
50 
57  static void LongLatAltToRect(double lla[3], double rect[3]);
58 
59 protected:
60  vtkGeoMath();
61  ~vtkGeoMath() override;
62 
63 private:
64  vtkGeoMath(const vtkGeoMath&) = delete;
65  void operator=(const vtkGeoMath&) = delete;
66 };
67 
68 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
static double EarthRadiusMeters()
Returns the average radius of the earth in meters.
Definition: vtkGeoMath.h:44
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Useful geographic calculations.
Definition: vtkGeoMath.h:34