VTK  9.0.2
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:
61  ~vtkGeoMath() override;
62 
63 private:
64  vtkGeoMath(const vtkGeoMath&) = delete;
65  void operator=(const vtkGeoMath&) = delete;
66 };
67 
68 #endif
Useful geographic calculations.
Definition: vtkGeoMath.h:35
static double DistanceSquared(double pt0[3], double pt1[3])
Returns the squared distance between two points.
static void LongLatAltToRect(double lla[3], double rect[3])
Converts a (longitude, latitude, altitude) triple to world coordinates where the center of the earth ...
~vtkGeoMath() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkGeoMath * New()
static double EarthRadiusMeters()
Returns the average radius of the earth in meters.
Definition: vtkGeoMath.h:44
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:63