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;
41  m_pCircularEngine = NULL;
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 }
c
Scalar Scalar * c
Definition: benchVecAdd.cpp:17
CircularEngine.hpp
Header for GeographicLib::CircularEngine class.
NETGeographicLib::CircularEngine::m_pCircularEngine
const GeographicLib::CircularEngine * m_pCircularEngine
Definition: CircularEngine.h:58
CircularEngine.h
Header for NETGeographicLib::CircularEngine class.
NETGeographicLib::GeographicErr
Exception class for NETGeographicLib.
Definition: NETGeographicLib.h:132
GeographicLib::GeographicErr
Exception handling for GeographicLib.
Definition: Constants.hpp:389
GeographicLib::CircularEngine
Spherical harmonic sums for a circle.
Definition: CircularEngine.hpp:52
stdafx.h
NETGeographicLib::CircularEngine::CircularEngine
CircularEngine(const GeographicLib::CircularEngine &c)
Definition: dotnet/NETGeographicLib/CircularEngine.cpp:19
NETGeographicLib.h
Header for NETGeographicLib::NETGeographicLib objects.
NETGeographicLib::CircularEngine
.NET wrapper for GeographicLib::CircularEngine.
Definition: CircularEngine.h:54
NETGeographicLib::CircularEngine::LongitudeSum
double LongitudeSum(double coslon, double sinlon)
Definition: dotnet/NETGeographicLib/CircularEngine.cpp:46
lon
static const double lon
Definition: testGeographicLib.cpp:34
NULL
#define NULL
Definition: ccolamd.c:609
NETGeographicLib
Definition: Accumulator.h:13


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:01:58