dotnet/NETGeographicLib/CircularEngine.cpp
Go to the documentation of this file.
1 
11 #include "stdafx.h"
13 #include "CircularEngine.h"
14 #include "NETGeographicLib.h"
15 
16 using namespace NETGeographicLib;
17 
18 //*****************************************************************************
20 {
21  try
22  {
24  }
25  catch ( GeographicLib::GeographicErr err )
26  {
27  throw gcnew GeographicErr( err.what() );
28  }
29  catch ( std::bad_alloc )
30  {
31  throw gcnew GeographicErr( "Failed to allocate memory for a GeographicLib::CircularEngine" );
32  }
33 }
34 
35 //*****************************************************************************
37 {
38  if ( m_pCircularEngine != NULL )
39  {
40  delete m_pCircularEngine;
42  }
43 }
44 
45 //*****************************************************************************
46 double CircularEngine::LongitudeSum(double coslon, double sinlon)
47 {
48  return m_pCircularEngine->operator()( coslon, sinlon );
49 }
50 
51 //*****************************************************************************
53 {
54  return m_pCircularEngine->operator()( lon );
55 }
56 
57 //*****************************************************************************
58 double CircularEngine::LongitudeSum(double coslon, double sinlon,
59  [System::Runtime::InteropServices::Out] double% gradx,
60  [System::Runtime::InteropServices::Out] double% grady,
61  [System::Runtime::InteropServices::Out] double% gradz)
62 {
63  double lgradx, lgrady, lgradz;
64  double output = m_pCircularEngine->operator()( coslon, sinlon, lgradx, lgrady, lgradz );
65  gradx = lgradx;
66  grady = lgrady;
67  gradz = lgradz;
68  return output;
69 }
70 
71 //*****************************************************************************
73  [System::Runtime::InteropServices::Out] double% gradx,
74  [System::Runtime::InteropServices::Out] double% grady,
75  [System::Runtime::InteropServices::Out] double% gradz)
76 {
77  double lgradx, lgrady, lgradz;
78  double output = m_pCircularEngine->operator()( lon, lgradx, lgrady, lgradz );
79  gradx = lgradx;
80  grady = lgrady;
81  gradz = lgradz;
82  return output;
83 }
Header for NETGeographicLib::NETGeographicLib objects.
Exception class for NETGeographicLib.
double LongitudeSum(double coslon, double sinlon)
Scalar Scalar * c
Definition: benchVecAdd.cpp:17
CircularEngine(const GeographicLib::CircularEngine &c)
Header for NETGeographicLib::CircularEngine class.
#define NULL
Definition: ccolamd.c:609
Header for GeographicLib::CircularEngine class.
Spherical harmonic sums for a circle.
Exception handling for GeographicLib.
Definition: Constants.hpp:389
static const double lon
.NET wrapper for GeographicLib::CircularEngine.
const GeographicLib::CircularEngine * m_pCircularEngine


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:47