16 template <
class GeodType>
25 _earth.GenInverse(_lat1, _lon1, lat, lon, _mask,
26 s12, t, t, t, t, t, S12);
30 _crossings += transit(_lon1, lon);
37 template <
class GeodType>
41 _earth.GenDirect(_lat1, _lon1, azi,
false, s, _mask,
42 lat, lon, t, t, t, t, t, S12);
46 _crossings += transitdirect(_lon1, lon);
54 template <
class GeodType>
66 perimeter = _perimetersum();
69 _earth.GenInverse(_lat1, _lon1, _lat0, _lon0, _mask,
70 s12, t, t, t, t, t, S12);
71 perimeter = _perimetersum(s12);
74 int crossings = _crossings + transit(_lon1, _lon0);
76 tempsum += (tempsum < 0 ? 1 : -1) * _area0/2;
83 if (tempsum > _area0/2)
85 else if (tempsum <= -_area0/2)
88 if (tempsum >= _area0)
97 template <
class GeodType>
108 perimeter = _perimetersum();
109 real tempsum = _polyline ? 0 : _areasum();
110 int crossings = _crossings;
111 unsigned num = _num + 1;
112 for (
int i = 0;
i < (_polyline ? 1 : 2); ++
i) {
114 _earth.GenInverse(
i == 0 ? _lat1 : lat,
i == 0 ? _lon1 : lon,
115 i != 0 ? _lat0 : lat,
i != 0 ? _lon0 : lon,
116 _mask, s12, t, t, t, t, t, S12);
120 crossings += transit(
i == 0 ? _lon1 : lon,
121 i != 0 ? _lon0 : lon);
129 tempsum += (tempsum < 0 ? 1 : -1) * _area0/2;
136 if (tempsum > _area0/2)
138 else if (tempsum <= -_area0/2)
141 if (tempsum >= _area0)
143 else if (tempsum < 0)
150 template <
class GeodType>
161 unsigned num = _num + 1;
162 perimeter = _perimetersum() +
s;
166 real tempsum = _areasum();
167 int crossings = _crossings;
170 _earth.GenDirect(_lat1, _lon1, azi,
false, s, _mask,
171 lat, lon, t, t, t, t, t, S12);
173 crossings += transitdirect(_lon1, lon);
175 _earth.GenInverse(lat, lon, _lat0, _lon0, _mask,
176 s12, t, t, t, t, t, S12);
179 crossings += transit(lon, _lon0);
183 tempsum += (tempsum < 0 ? 1 : -1) * _area0/2;
190 if (tempsum > _area0/2)
192 else if (tempsum <= -_area0/2)
195 if (tempsum >= _area0)
197 else if (tempsum < 0)
static T AngNormalize(T x)
unsigned TestEdge(real azi, real s, bool reverse, bool sign, real &perimeter, real &area) const
unsigned TestPoint(real lat, real lon, bool reverse, bool sign, real &perimeter, real &area) const
#define GEOGRAPHICLIB_EXPORT
void AddEdge(real azi, real s)
EIGEN_DEVICE_FUNC const SignReturnType sign() const
unsigned Compute(bool reverse, bool sign, real &perimeter, real &area) const
Namespace for GeographicLib.
void AddPoint(real lat, real lon)
Header for GeographicLib::PolygonAreaT class.
void reverse(const MatrixType &m)