VTK  9.3.20240419
vtkGeoMath.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
12 #ifndef vtkGeoMath_h
13 #define vtkGeoMath_h
14 
15 #include "vtkInfovisLayoutModule.h" // For export macro
16 #include "vtkObject.h"
17 
18 VTK_ABI_NAMESPACE_BEGIN
19 class VTKINFOVISLAYOUT_EXPORT vtkGeoMath : public vtkObject
20 {
21 public:
22  static vtkGeoMath* New();
23  vtkTypeMacro(vtkGeoMath, vtkObject);
24  void PrintSelf(ostream& os, vtkIndent indent) override;
25 
29  static double EarthRadiusMeters() { return 6356750.0; }
30 
34  static double DistanceSquared(double pt0[3], double pt1[3]);
35 
42  static void LongLatAltToRect(double longLatAlt[3], double rect[3]);
43 
44 protected:
46  ~vtkGeoMath() override;
47 
48 private:
49  vtkGeoMath(const vtkGeoMath&) = delete;
50  void operator=(const vtkGeoMath&) = delete;
51 };
52 
53 VTK_ABI_NAMESPACE_END
54 #endif
Useful geographic calculations.
Definition: vtkGeoMath.h:20
static double DistanceSquared(double pt0[3], double pt1[3])
Returns the squared distance between two points.
~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 void LongLatAltToRect(double longLatAlt[3], double rect[3])
Converts a (longitude, latitude, altitude) triple to world coordinates where the center of the earth ...
static double EarthRadiusMeters()
Returns the average radius of the earth in meters.
Definition: vtkGeoMath.h:29
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:162