VTK  9.1.0
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
34class VTKINFOVISLAYOUT_EXPORT vtkGeoMath : public vtkObject
35{
36public:
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 longLatAlt[3], double rect[3]);
58
59protected:
61 ~vtkGeoMath() override;
62
63private:
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.
~vtkGeoMath() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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:44
static vtkGeoMath * New()
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73