NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
geometry_base_types.h
Go to the documentation of this file.
1 #ifndef SDK_GEOMETRY_BASE_TYPES_H_
10 #define SDK_GEOMETRY_BASE_TYPES_H_
11 
12 #include <base/inc/platform.h>
13 #include <base/inc/base_types.h>
14 #include <base/inc/float_util.h>
15 #include <cmath>
16 
17 #ifdef SDK_OS_POSIX
18 # include <stddef.h>
19 #endif
20 
21 #pragma push_macro("min")
22 #pragma push_macro("max")
23 #undef min
24 #undef max
25 
26 // NOTE: The SDK uses the following coordinate system:
27 // The Oy axis is directed from down to up,
28 // the Ox axis is directed from left to right (Cartesian coordinate system)
29 // Positive rotation angle means counterclockwise direction, negative - clockwise
30 
33 typedef struct SDKPointF2D {
34  float x; // x coordinate
35  float y; // y coordinate
36 
37 #if defined(__cplusplus)
38  typedef SDKPointF2D MyType;
39  typedef float coordinate_type;
40  enum DimensionCount_ { dimension_count = 2 };
41 
42  static coordinate_type bad_coordinate() {
43  return IEEE754_2008::flt_NaN();
44  }
45 
49  template <size_t K>
50  coordinate_type get() const {
51  // The expression (1 / int(K < dimension_count)
52  // cause a division by zero compiler error
53  // in case of (K >= dimension_count) but always true
54  // in the opposite case.
55  if (1 / int(K < dimension_count)) {
56  if (K == 0)
57  return this->x;
58  else //if (K == 1)
59  return this->y;
60  }
61  return 0;
62  }
63 
67  template <size_t K>
68  void set(coordinate_type const v) {
69  if (1 / int(K < dimension_count)) {
70  if (K == 0)
71  this->x = v;
72  else //if (K == 1)
73  this->y = v;
74  }
75  }
76 
77  template <size_t K>
78  friend coordinate_type get(const MyType& p) {
79  return p.get<K>();
80  }
81 
82  template <size_t K>
83  friend void set(const MyType& p, coordinate_type const v) {
84  p.set<K>(v);
85  }
86 
87  double Length(const MyType& p) const noexcept {
88  return Length(p.x, p.y);
89  }
90 
91  double Length(double x2, double y2) const noexcept {
92  x2 -= x; y2 -= y;
93  using std::sqrt;
94  return sqrt(x2*x2 + y2*y2);
95  }
96 #endif
97 } SDKPointF2D;
98 
101 typedef struct SDKPointF3D {
102  float x; // x coordinate
103  float y; // y coordinate
104  float z; // z coordinate
105 
106 #if defined(__cplusplus)
107  typedef SDKPointF3D MyType;
108  typedef float coordinate_type;
109  enum DimensionCount_ { dimension_count = 3 };
110 
111  static coordinate_type bad_coordinate() {
112  return IEEE754_2008::flt_NaN();
113  }
114 
118  template <size_t K>
119  coordinate_type get() const {
120  if (1 / int(K < dimension_count)) {
121  if (K == 0)
122  return this->x;
123  else if (K == 1)
124  return this->y;
125  else //if (K == 2)
126  return this->z;
127  }
128  return 0;
129  }
130 
134  template <size_t K>
135  void set(coordinate_type const v) {
136  if (1 / int(K < dimension_count)) {
137  if (K == 0)
138  this->x = v;
139  else if (K == 1)
140  this->y = v;
141  else //if (K == 2)
142  this->z = v;
143  }
144  }
145 
146  template <size_t K>
147  friend coordinate_type get(const MyType& p) {
148  return p.get<K>();
149  }
150 
151  template <size_t K>
152  friend void set(const MyType& p, coordinate_type const v) {
153  p.set<K>(v);
154  }
155 
156  double Length(const MyType& p) const noexcept {
157  return Length(p.x, p.y, p.z);
158  }
159 
160  double Length(double x2, double y2, double z2) const noexcept {
161  x2 -= x; y2 -= y; z2 -= z;
162  using std::sqrt;
163  return sqrt(x2*x2 + y2*y2 + z2*z2);
164  }
165 #endif
166 } SDKPointF3D;
167 
171 
175 
178 typedef struct SDKPointI2D {
179  SDKInt32 x; // x coordinate
180  SDKInt32 y; // y coordinate
181 
182 #if defined(__cplusplus)
183  typedef SDKPointI2D MyType;
184  typedef SDKInt32 coordinate_type;
185  enum DimensionCount_ { dimension_count = 2 };
186 
187  static coordinate_type bad_coordinate() {
188  return SDK_MIN_INT32;
189  }
190 
194  template <size_t K>
195  coordinate_type get() const {
196  if (1 / int(K < dimension_count)) {
197  if (K == 0)
198  return this->x;
199  else //if (K == 1)
200  return this->y;
201  }
202  return 0;
203  }
204 
208  template <size_t K>
209  void set(coordinate_type const v) {
210  if (1 / int(K < dimension_count)) {
211  if (K == 0)
212  this->x = v;
213  else //if (K == 1)
214  this->y = v;
215  }
216  }
217 
218  template <size_t K>
219  friend coordinate_type get(const MyType& p) {
220  return p.get<K>();
221  }
222 
223  template <size_t K>
224  friend void set(const MyType& p, coordinate_type const v) {
225  p.set<K>(v);
226  }
227 
228  double Length(const MyType& p) const noexcept {
229  return Length(p.x, p.y);
230  }
231 
232  double Length(double x2, double y2) const noexcept {
233  x2 -= x; y2 -= y;
234  using std::sqrt;
235  return sqrt(x2*x2 + y2*y2);
236  }
237 #endif
238 } SDKPointI2D;
239 
242 typedef struct SDKPointD2D {
243  double x; // x coordinate
244  double y; // y coordinate
245 
246 #if defined(__cplusplus)
247  typedef SDKPointD2D MyType;
248  typedef double coordinate_type;
249  enum DimensionCount_ { dimension_count = 2 };
250 
251  static coordinate_type bad_coordinate() {
252  return IEEE754_2008::dbl_NaN();
253  }
254 
258  template <size_t K>
259  coordinate_type get() const {
260  if (1 / int(K < dimension_count)) {
261  if (K == 0)
262  return this->x;
263  else //if (K == 1)
264  return this->y;
265  }
266  return 0;
267  }
268 
272  template <size_t K>
273  void set(coordinate_type const v) {
274  if (1 / int(K < dimension_count)) {
275  if (K == 0)
276  this->x = v;
277  else //if (K == 1)
278  this->y = v;
279  }
280  }
281 
282  template <size_t K>
283  friend coordinate_type get(const MyType& p) {
284  return p.get<K>();
285  }
286 
287  template <size_t K>
288  friend void set(const MyType& p, coordinate_type const v) {
289  p.set<K>(v);
290  }
291 
292  double Length(const MyType& p) const noexcept {
293  return Length(p.x, p.y);
294  }
295 
296  double Length(double x2, double y2) const noexcept {
297  x2 -= x; y2 -= y;
298  using std::sqrt;
299  return sqrt(x2*x2 + y2*y2);
300  }
301 #endif
302 } SDKPointD2D;
303 
306 typedef struct SDKPointD3D {
307  double x;
308  double y;
309  double z;
310 
311 #if defined(__cplusplus)
312  typedef SDKPointD3D MyType;
313  typedef double coordinate_type;
314  enum DimensionCount_ { dimension_count = 3 };
315 
316  static coordinate_type bad_coordinate() {
317  return IEEE754_2008::dbl_NaN();
318  }
319 
323  template <size_t K>
324  coordinate_type get() const {
325  if (1 / int(K < dimension_count)) {
326  if (K == 0)
327  return this->x;
328  else if (K == 1)
329  return this->y;
330  else //if (K == 2)
331  return this->z;
332  }
333  return 0;
334  }
335 
339  template <size_t K>
340  void set(coordinate_type const v) {
341  if (1 / int(K < dimension_count)) {
342  if (K == 0)
343  this->x = v;
344  else if (K == 1)
345  this->y = v;
346  else //if (K == 2)
347  this->z = v;
348  }
349  }
350 
351  template <size_t K>
352  friend coordinate_type get(const MyType& p) {
353  return p.get<K>();
354  }
355 
356  template <size_t K>
357  friend void set(const MyType& p, coordinate_type const v) {
358  p.set<K>(v);
359  }
360 
361  double Length(const MyType& p) const noexcept {
362  return Length(p.x, p.y, p.z);
363  }
364 
365  double Length(double x2, double y2, double z2) const noexcept {
366  x2 -= x; y2 -= y; z2 -= z;
367  using std::sqrt;
368  return sqrt(x2*x2 + y2*y2 + z2*z2);
369  }
370 #endif
371 } SDKPointD3D;
372 
375 typedef struct SDKEnvelopeD2D {
376  // A POD structure without ctors/dtors
377  union {
378  SDKPointD2D min;
379  struct {
380  double xmin;
381  double ymin;
382  };
383  };
384  union {
385  SDKPointD2D max;
386  struct {
387  double xmax;
388  double ymax;
389  };
390  };
391 
392 #if defined(__cplusplus)
393  typedef SDKPointD2D point_type;
394 
395 #if 1
396  SDKEnvelopeD2D() noexcept
397  : xmin(0), ymin(0), xmax(0), ymax(0) {
398  }
399 
401  point_type const& _min_corner,
402  point_type const& _max_corner) noexcept
403  : xmin(_min_corner.x), ymin(_min_corner.y), xmax(_max_corner.x),
404  ymax(_max_corner.y) {
405  }
406 
408  point_type::coordinate_type _xmin,
409  point_type::coordinate_type _ymin,
410  point_type::coordinate_type _xmax,
411  point_type::coordinate_type _ymax) noexcept
412  : xmin(_xmin), ymin(_ymin), xmax(_xmax), ymax(_ymax) {
413  }
414 #endif
415 
416  bool IsEmpty() const noexcept {
417  return xmin == 0 && ymin == 0 &&
418  xmax == 0 && ymax == 0;
419  }
420 
421  // Indexed access
422  template <size_t C>
423  point_type const& corner() const noexcept {
424  if (!(1 / int(C < 2)))
425  return min;
426  if (C == 0)
427  return min;
428  else
429  return max;
430  }
431 
432  template <size_t C>
433  point_type& corner() noexcept {
434  if (!(1 / int(C < 2)))
435  return min;
436  if (C == 0)
437  return min;
438  else
439  return max;
440  }
441 
442  point_type const& min_corner() const noexcept {
443  return min;
444  }
445  point_type& min_corner() noexcept {
446  return min;
447  }
448  point_type const& max_corner() const noexcept {
449  return max;
450  }
451  point_type& max_corner() noexcept {
452  return max;
453  }
454 #endif
456 
459 typedef struct SDKEnvelopeI2D {
460  // A POD structure without ctors/dtors
461  union {
462  SDKPointI2D min;
463  struct {
464  SDKInt32 xmin;
465  SDKInt32 ymin;
466  };
467  };
468  union {
469  SDKPointI2D max;
470  struct {
471  SDKInt32 xmax;
472  SDKInt32 ymax;
473  };
474  };
475 
476 #if defined(__cplusplus)
477  typedef SDKPointI2D point_type;
478 
479 #if 1
480  SDKEnvelopeI2D() noexcept
481  : xmin(0), ymin(0), xmax(0), ymax(0) {
482  }
483 
485  point_type const& _min_corner,
486  point_type const& _max_corner) noexcept
487  : xmin(_min_corner.x), ymin(_min_corner.y), xmax(_max_corner.x),
488  ymax(_max_corner.y) {
489  }
490 
492  point_type::coordinate_type _xmin,
493  point_type::coordinate_type _ymin,
494  point_type::coordinate_type _xmax,
495  point_type::coordinate_type _ymax) noexcept
496  : xmin(_xmin), ymin(_ymin), xmax(_xmax), ymax(_ymax) {
497  }
498 #endif
499 
500  bool IsEmpty() const noexcept {
501  return xmin == 0 && ymin == 0 &&
502  xmax == 0 && ymax == 0;
503  }
504 
505  // Indexed access
506  template <size_t C>
507  point_type const& corner() const noexcept {
508  if (!(1 / int(C < 2)))
509  return min;
510  if (C == 0)
511  return min;
512  else
513  return max;
514  }
515 
516  template <size_t C>
517  point_type& corner() noexcept {
518  if (!(1 / int(C < 2)))
519  return min;
520  if (C == 0)
521  return min;
522  else
523  return max;
524  }
525 
526  point_type const& min_corner() const noexcept {
527  return min;
528  }
529  point_type& min_corner() noexcept {
530  return min;
531  }
532  point_type const& max_corner() const noexcept {
533  return max;
534  }
535  point_type& max_corner() noexcept {
536  return max;
537  }
538 #endif
540 
543 typedef struct SDKEnvelopeD3D {
544  // A POD structure without ctors/dtors
545  union {
546  SDKPointD3D min;
547  struct {
548  double xmin;
549  double ymin;
550  double zmin;
551  };
552  };
553  union {
554  SDKPointD3D max;
555  struct {
556  double xmax;
557  double ymax;
558  double zmax;
559  };
560  };
561 
562 #if defined(__cplusplus)
563  typedef SDKPointD3D point_type;
564 
565 #if 1
566  SDKEnvelopeD3D() noexcept
567  : xmin(0), ymin(0), zmin(0), xmax(0), ymax(0), zmax(0) {
568  }
569 
571  point_type const& _min_corner,
572  point_type const& _max_corner) noexcept
573  : xmin(_min_corner.x), ymin(_min_corner.y), zmin(_min_corner.z),
574  xmax(_max_corner.x), ymax(_max_corner.y), zmax(_max_corner.z) {
575  }
576 
578  point_type::coordinate_type _xmin,
579  point_type::coordinate_type _ymin,
580  point_type::coordinate_type _zmin,
581  point_type::coordinate_type _xmax,
582  point_type::coordinate_type _ymax,
583  point_type::coordinate_type _zmax) noexcept
584  : xmin(_xmin), ymin(_ymin), zmin(_zmin), xmax(_xmax), ymax(_ymax),
585  zmax(_zmax) {
586  }
587 #endif
588 
589  bool IsEmpty() const noexcept {
590  return xmin == 0 && ymin == 0 &&
591  xmax == 0 && ymax == 0 &&
592  zmin == 0 && zmax == 0;
593  }
594 
595  // Default copy operator is enough.
596  //SDKEnvelope3D& operator=(const SDKEnvelope3D& src) noexcept {
597  // xmin = src.xmin; xmax = src.xmax;
598  // ymin = src.ymin; ymax = src.ymax;
599  // zmin = src.zmin; zmax = src.zmax;
600  // return *this;
601  //}
602 
603  // Indexed access
604  template <size_t C>
605  point_type const& corner() const noexcept {
606  if (!(1 / int(C < 2)))
607  return min;
608  if (C == 0)
609  return min;
610  else
611  return max;
612  }
613 
614  template <size_t C>
615  point_type& corner() noexcept {
616  if (!(1 / int(C < 2)))
617  return min;
618  if (C == 0)
619  return min;
620  else
621  return max;
622  }
623 
624  point_type const& min_corner() const noexcept {
625  return min;
626  }
627  point_type& min_corner() noexcept {
628  return min;
629  }
630  point_type const& max_corner() const noexcept {
631  return max;
632  }
633  point_type& max_corner() noexcept {
634  return max;
635  }
636 #endif
638 
641 typedef struct SDKEnvelopeF2D {
642  // A POD structure without ctors/dtors
643  union {
644  SDKPointF2D min;
645  struct {
646  float xmin;
647  float ymin;
648  };
649  };
650  union {
651  SDKPointF2D max;
652  struct {
653  float xmax;
654  float ymax;
655  };
656  };
657 
658 #if defined(__cplusplus)
659  typedef SDKPointF2D point_type;
660 
661  bool IsEmpty() const noexcept {
662  return xmin == 0 && ymin == 0
663  && xmax == 0 && ymax == 0;
664  }
665 
666  // Indexed access
667  template <size_t C>
668  point_type const& corner() const noexcept {
669  if (!(1 / int(C < 2)))
670  return min;
671  if (C == 0)
672  return min;
673  else
674  return max;
675  }
676 
677  template <size_t C>
678  point_type& corner() noexcept {
679  if (!(1 / int(C < 2)))
680  return min;
681  if (C == 0)
682  return min;
683  else
684  return max;
685  }
686 
687  point_type const& min_corner() const noexcept {
688  return min;
689  }
690  point_type& min_corner() noexcept {
691  return min;
692  }
693  point_type const& max_corner() const noexcept {
694  return max;
695  }
696  point_type& max_corner() noexcept {
697  return max;
698  }
699 #endif
701 
704 typedef struct SDKEnvelopeF3D {
705  // A POD structure without ctors/dtors
706  union {
707  SDKPointF3D min;
708  struct {
709  float xmin;
710  float ymin;
711  float zmin;
712  };
713  };
714  union {
715  SDKPointF3D max;
716  struct {
717  float xmax;
718  float ymax;
719  float zmax;
720  };
721  };
722 
723 #if defined(__cplusplus)
724  typedef SDKPointF3D point_type;
725 
726  bool IsEmpty() const noexcept {
727  return xmin == 0 && ymin == 0
728  && xmax == 0 && ymax == 0
729  && zmin == 0 && zmax == 0;
730  }
731 
732  // Indexed access
733  template <size_t C>
734  point_type const& corner() const noexcept {
735  if (!(1 / int(C < 2)))
736  return min;
737 
738  if (C == 0)
739  return min;
740  else
741  return max;
742  }
743 
744  template <size_t C>
745  point_type& corner() noexcept {
746  if (!(1 / int(C < 2)))
747  return min;
748 
749  if (C == 0)
750  return min;
751  else
752  return max;
753  }
754 
755  point_type const& min_corner() const noexcept {
756  return min;
757  }
758  point_type& min_corner() noexcept {
759  return min;
760  }
761  point_type const& max_corner() const noexcept {
762  return max;
763  }
764  point_type& max_corner() noexcept {
765  return max;
766  }
767 #endif
769 
770 #if defined(__cplusplus) && 0
771 SDK_BEGIN_NAMESPACE
772 namespace geometry {
773 
774 struct GenGeometryPointTag {};
775 struct GenGeometryBoxTag {};
776 struct GenGeometryXYWHRectTag {};
777 
778 template <typename Geometry>
779 struct GenGeometryTag {
780 };
781 
782 template <typename Geometry>
783 struct GenGeometryPointType {
784  typedef typename Geometry::point_type type;
785 };
786 
787 template <typename Point, size_t D = 0>
788 struct GenGeometryCoordinateType {
789  typedef typename Point::coordinate_type type;
790 };
791 
792 template <typename Point>
793 struct GenGeometryDimension {
794  enum _Dimension { value = Point::dimension_count };
795 };
796 
797 template <typename Point, size_t D,
798  bool IsActualDimension = (D < size_t(GenGeometryDimension<Point>::value)) >
799 struct GenGeometryPointAccess;
800 
801 template <typename Point, size_t D>
802 struct GenGeometryPointAccess<Point,D,true> {
803  typedef typename GenGeometryCoordinateType<Point,D>::type coordinate_type;
804  static void set(Point& p, coordinate_type v) {
805  return p.template set<D>(v);
806  }
807  static coordinate_type get(const Point& p) {
808  return p.template get<D>();
809  }
810 };
811 
812 template <class Point, size_t D>
813 struct GenGeometryPointAccess<Point,D,false> {
814  typedef typename Point::coordinate_type coordinate_type;
815 
816  template <typename IgnoreIt>
817  static void set(Point&, const IgnoreIt&) {
818  }
819  static coordinate_type get(const Point&) {
820  return Point::bad_coordinate();
821  }
822 };
823 
824 template <class XYWHRect, size_t I, typename Enable=void>
825 class CornerType;
826 
827 template <class XYWHRect, typename Enable>
828 class CornerType<XYWHRect,0,Enable> {
829  friend XYWHRect;
830  typedef CornerType<XYWHRect,0,Enable> MyType;
831  typedef XYWHRect Rect;
832  typedef typename GenGeometryPointType<Rect>::type point_type;
833  typedef const point_type const_point_type;
834  typedef typename GenGeometryCoordinateType<point_type>::type coordinate_type;
835 
836  Rect& m_rect;
837  CornerType(const Rect& rect) noexcept
838  : m_rect(const_cast<Rect&>(rect)) {
839  }
840 
841 public:
842  template <size_t D>
843  typename GenGeometryCoordinateType<point_type,D>::type get() const noexcept {
844  if (!D)
845  return m_rect.x;
846  else
847  return m_rect.y;
848  }
849  template <size_t D>
850  void set(typename GenGeometryCoordinateType<point_type,D>::type v) const noexcept {
851  if (!D)
852  m_rect.x = v;
853  else
854  m_rect.y = v;
855  }
856  template <class Point>
857  const MyType& operator=(const Point& pnt) const {
858  m_rect.x = GenGeometryPointAccess<point_type,0>::get(pnt);
859  m_rect.y = GenGeometryPointAccess<point_type,1>::get(pnt);
860  return *this;
861  }
862  operator const_point_type() const {
863  point_type pnt;
864  GenGeometryPointAccess<point_type,0>::set(pnt, m_rect.x);
865  GenGeometryPointAccess<point_type,1>::set(pnt, m_rect.y);
866  return pnt;
867  }
868 };
869 
870 template <class XYWHRect, typename Enable>
871 class CornerType<XYWHRect,1,Enable> {
872  friend XYWHRect;
873  typedef CornerType<XYWHRect,1,Enable> MyType;
874  typedef XYWHRect Rect;
875  typedef typename GenGeometryPointType<Rect>::type point_type;
876  typedef const point_type const_point_type;
877  typedef typename GenGeometryCoordinateType<point_type>::type coordinate_type;
878 
879  Rect& m_rect;
880  CornerType(const Rect& rect) noexcept
881  : m_rect(const_cast<Rect&>(rect)) {
882  }
883 
884 public:
885  template <size_t D>
886  typename GenGeometryCoordinateType<point_type,D>::type get() const noexcept {
887  if (!D)
888  return m_rect.x + m_rect.width;
889  else
890  return m_rect.y + m_rect.height;
891  }
892  template <size_t D>
893  void set(typename GenGeometryCoordinateType<point_type,D>::type v) const noexcept {
894  if (!D)
895  m_rect.width = v - m_rect.x;
896  else
897  m_rect.height = v - m_rect.y;
898  }
899  template <class Point>
900  const MyType& operator=(const Point& pnt) const {
901  m_rect.width = GenGeometryPointAccess<point_type,0>::get(pnt) - m_rect.x;
902  m_rect.height = GenGeometryPointAccess<point_type,1>::get(pnt) - m_rect.y;
903  return *this;
904  }
905  operator const_point_type() const {
906  point_type pnt;
907  GenGeometryPointAccess<point_type,0>::set(pnt, m_rect.x + m_rect.width);
908  GenGeometryPointAccess<point_type,1>::set(pnt, m_rect.y + m_rect.height);
909  return pnt;
910  }
911 };
912 
913 template <class Box, size_t I, size_t D,
914  class GenGeometryBoxTag = typename geometry::GenGeometryTag<Box>::type,
915  bool IsActualIndex = (I < 2)>
916 struct GenGeometryIndexedAccess;
917 
918 template <class Box, size_t I, size_t D>
919 struct GenGeometryIndexedAccess<Box,I,D,geometry::GenGeometryBoxTag,true> {
920  typedef typename GenGeometryPointType<Box>::type point_type;
921  typedef typename GenGeometryCoordinateType<point_type,D>::type coordinate_type;
922 
923  static void set(Box& box, coordinate_type v) {
924  return GenGeometryPointAccess<point_type,D>::set(box.template corner<I>(), v);
925  }
926  static coordinate_type get(const Box& box) {
927  return GenGeometryPointAccess<point_type,D>::get(box.template corner<I>());
928  }
929 };
930 
931 template <class Box>
932 struct GenGeometryIndexedAccess<Box,0,0,geometry::GenGeometryXYWHRectTag,true> {
933  typedef typename GenGeometryPointType<Box>::type point_type;
934  typedef typename GenGeometryCoordinateType<point_type,0>::type coordinate_type;
935  static void set(Box& box, coordinate_type v) { box.x = v; }
936  static coordinate_type get(const Box& box) { return box.x; }
937 };
938 
939 template <class Box>
940 struct GenGeometryIndexedAccess<Box,0,1,geometry::GenGeometryXYWHRectTag,true> {
941  typedef typename GenGeometryPointType<Box>::type point_type;
942  typedef typename GenGeometryCoordinateType<point_type,1>::type coordinate_type;
943  static void set(Box& box, coordinate_type v) { box.y = v; }
944  static coordinate_type get(const Box& box) { return box.y; }
945 };
946 
947 template <class Box>
948 struct GenGeometryIndexedAccess<Box,1,0,geometry::GenGeometryXYWHRectTag,true> {
949  typedef typename GenGeometryPointType<Box>::type point_type;
950  typedef typename GenGeometryCoordinateType<point_type,0>::type coordinate_type;
951  static void set(Box& box, coordinate_type v) { box.width = v - box.x; }
952  static coordinate_type get(const Box& box) { return box.x + box.width; }
953 };
954 
955 template <class Box>
956 struct GenGeometryIndexedAccess<Box,1,1,geometry::GenGeometryXYWHRectTag,true> {
957  typedef typename GenGeometryPointType<Box>::type point_type;
958  typedef typename GenGeometryCoordinateType<point_type,1>::type coordinate_type;
959  static void set(Box& box, coordinate_type v) { box.height = v - box.y; }
960  static coordinate_type get(const Box& box) { return box.y + box.height; }
961 };
962 
963 template <class Box, size_t I, size_t D, class GenGeometryBoxTag>
964 struct GenGeometryIndexedAccess<Box,I,D,GenGeometryBoxTag,false> {
965  typedef typename GenGeometryPointType<Box>::type point_type;
966  typedef typename GenGeometryCoordinateType<point_type,D>::type coordinate_type;
967 
968  static void set(Box& box, coordinate_type v) {
969  }
970  static coordinate_type get(const Box& box) {
971  return point_type::bad_coordinate();
972  }
973 };
974 
975 template <typename _PODEnvelope>
976 struct EnvelopeT : public _PODEnvelope {
977 private:
978  typedef _PODEnvelope MyBase;
979  typedef EnvelopeT<_PODEnvelope> MyType;
980 
981 public:
982  typedef typename GenGeometryPointType<MyBase>::type point_type;
983  typedef typename GenGeometryCoordinateType<point_type>::type coordinate_type;
984  enum Dimension_ { dimension_count = GenGeometryDimension<point_type>::value };
985 
986  EnvelopeT() noexcept
987  : MyBase() {
988  // According to the standard direct call on the default ctor
989  // has to zeroing the object.
990  }
991 
992  explicit EnvelopeT(const MyBase& _rhs) noexcept
993  : MyBase(_rhs) {
994  }
995 
996  MyType& operator=(const MyBase& _rhs) noexcept {
997  static_cast<MyBase&>(*this) = _rhs;
998  return *this;
999  }
1000 
1001  template <size_t I, size_t D>
1002  void set(coordinate_type v) {
1003  return geometry::GenGeometryIndexedAccess<_PODEnvelope,I,D>::set(*this,v);
1004  }
1005 
1006  template <size_t I, size_t D>
1007  coordinate_type get() const {
1008  return geometry::GenGeometryIndexedAccess<_PODEnvelope,I,D>::get(*this);
1009  }
1010 
1011  template <size_t I, size_t D, typename _E>
1012  void _assign(const EnvelopeT<_E>& _rhs) {
1013  return this->set<I,D>(coordinate_type(_rhs.template get<I,D>()));
1014  }
1015 
1016  template <class _E>
1017  void assign(const EnvelopeT<_E>& _rhs) {
1018  _assign<0,0>(_rhs);
1019  _assign<0,1>(_rhs);
1020  _assign<0,2>(_rhs);
1021  _assign<1,0>(_rhs);
1022  _assign<1,1>(_rhs);
1023  _assign<1,2>(_rhs);
1024  }
1025 
1026  template <class _E>
1027  explicit EnvelopeT(const EnvelopeT<_E>& _rhs) noexcept
1028  : MyBase() {
1029  assign(_rhs);
1030  }
1031 
1032  template <class _E>
1033  MyType& operator=(const EnvelopeT<_E>& _rhs) noexcept {
1034  assign(_rhs);
1035  return *this;
1036  }
1037 
1038  template <class _E>
1039  explicit EnvelopeT(const _E& _rhs) noexcept
1040  : MyBase() {
1041  assign(static_cast<const EnvelopeT<_E>&>(_rhs));
1042  }
1043 
1044  template <class _E>
1045  MyType& operator=(const _E& _rhs) noexcept {
1046  assign(static_cast<const EnvelopeT<_E>&>(_rhs));
1047  return *this;
1048  }
1049 
1050  EnvelopeT(
1051  point_type const& _min_corner,
1052  point_type const& _max_corner) noexcept {
1053  this->template corner<0>() = _min_corner;
1054  this->template corner<1>() = _max_corner;
1055  }
1056 
1057  EnvelopeT(
1058  coordinate_type _xmin,
1059  coordinate_type _ymin,
1060  coordinate_type _xmax,
1061  coordinate_type _ymax) noexcept
1062  : MyBase() {
1063  set<0,0>(_xmin);
1064  set<0,1>(_ymin);
1065  set<1,0>(_xmax);
1066  set<1,1>(_ymax);
1067  }
1068 
1069  EnvelopeT(
1070  coordinate_type _xmin,
1071  coordinate_type _ymin,
1072  coordinate_type _zmin,
1073  coordinate_type _xmax,
1074  coordinate_type _ymax,
1075  coordinate_type _zmax) noexcept
1076  : MyBase() {
1077  set<0,0>(_xmin);
1078  set<0,1>(_ymin);
1079  set<0,2>(_zmin);
1080  set<1,0>(_xmax);
1081  set<1,1>(_ymax);
1082  set<1,2>(_zmax);
1083  }
1084 };
1085 
1086 } // namespace geometry
1087 
1088 typedef geometry::EnvelopeT<SDKEnvelopeF2D> EnvelopeF2D;
1089 typedef geometry::EnvelopeT<SDKEnvelopeF3D> EnvelopeF3D;
1090 typedef geometry::EnvelopeT<SDKEnvelopeD2D> EnvelopeD2D;
1091 typedef geometry::EnvelopeT<SDKEnvelopeD3D> EnvelopeD3D;
1092 typedef geometry::EnvelopeT<SDKEnvelopeI2D> EnvelopeI2D;
1093 
1094 SDK_END_NAMESPACE
1095 
1096 typedef SDK_NAMESPACE::EnvelopeF2D SDKEnvelope2DF;
1097 typedef SDK_NAMESPACE::EnvelopeD2D SDKEnvelope2D;
1098 typedef SDK_NAMESPACE::EnvelopeI2D SDKEnvelope2DI;
1099 typedef SDK_NAMESPACE::EnvelopeF3D SDKEnvelope3DF;
1100 typedef SDK_NAMESPACE::EnvelopeD3D SDKEnvelope3D;
1101 #else
1102 typedef struct SDKEnvelopeF2D SDKEnvelope2DF;
1103 typedef struct SDKEnvelopeD2D SDKEnvelope2D;
1104 typedef struct SDKEnvelopeI2D SDKEnvelope2DI;
1105 typedef struct SDKEnvelopeF3D SDKEnvelope3DF;
1106 typedef struct SDKEnvelopeD3D SDKEnvelope3D;
1107 #endif
1108 
1111 typedef struct SDKSizeF {
1112  float width;
1113  float height;
1114 
1115 #if defined(__cplusplus)
1116  typedef SDKSizeF MyType;
1117  typedef float coordinate_type;
1118  enum DimensionCount_ { dimension_count = 2 };
1119 
1123  template <size_t K>
1124  coordinate_type get() const {
1125  if (1 / int(K < dimension_count)) {
1126  if (K == 0)
1127  return this->width;
1128  else //if (K == 1)
1129  return this->height;
1130  }
1131  return 0;
1132  }
1133 
1137  template <size_t K>
1138  void set(coordinate_type const v) {
1139  if (1 / int(K < dimension_count)) {
1140  if (K == 0)
1141  this->width = v;
1142  else //if (K == 1)
1143  this->height = v;
1144  }
1145  }
1146 
1147  template <size_t K>
1148  friend coordinate_type get(const MyType& p) {
1149  return p.get<K>();
1150  }
1151 
1152  template <size_t K>
1153  friend void set(const MyType& p, coordinate_type const v) {
1154  p.set<K>(v);
1155  }
1156 
1157  // Returns true if size width and height are 0
1158  bool IsNull() const noexcept {
1159  return width == 0 && height == 0;
1160  }
1161 
1162  // Returns true if size is equal to another size
1163  bool IsEqual(const MyType& s) const noexcept {
1164  return true &&
1165  fabsf(width - s.width) <= FLT_EPSILON &&
1166  fabsf(height - s.height) <= FLT_EPSILON;
1167  }
1168 #endif
1169 } SDKSizeF;
1170 
1173 typedef struct SDKSizeD {
1174  double width;
1175  double height;
1176 
1177 #if defined(__cplusplus)
1178  typedef SDKSizeD MyType;
1179  typedef double coordinate_type;
1180  enum DimensionCount_ { dimension_count = 2 };
1181 
1185  template <size_t K>
1186  coordinate_type get() const {
1187  if (1 / int(K < dimension_count)) {
1188  if (K == 0)
1189  return this->width;
1190  else //if (K == 1)
1191  return this->height;
1192  }
1193  return 0;
1194  }
1195 
1199  template <size_t K>
1200  void set(coordinate_type const v) {
1201  if (1 / int(K < dimension_count)) {
1202  if (K == 0)
1203  this->width = v;
1204  else //if (K == 1)
1205  this->height = v;
1206  }
1207  }
1208 
1209  template <size_t K>
1210  friend coordinate_type get(const MyType& p) {
1211  return p.get<K>();
1212  }
1213 
1214  template <size_t K>
1215  friend void set(const MyType& p, coordinate_type const v) {
1216  p.set<K>(v);
1217  }
1218 
1219  // Returns true if size width and height are 0
1220  bool IsNull() const noexcept {
1221  return width == 0 && height == 0;
1222  }
1223 
1224  // Returns true if size is equal to another size
1225  bool IsEqual(const MyType& s) const noexcept {
1226  return true &&
1227  fabs(width - s.width) <= DBL_EPSILON &&
1228  fabs(height - s.height) <= DBL_EPSILON;
1229  }
1230 #endif
1231 } SDKSizeD;
1232 
1235 typedef struct SDKSize {
1236  SDKUInt32 width;
1237  SDKUInt32 height;
1238 
1239 #if defined(__cplusplus)
1240  typedef SDKSize MyType;
1241  typedef SDKUInt32 coordinate_type;
1242  enum DimensionCount_ { dimension_count = 2 };
1243 
1247  template <size_t K>
1248  coordinate_type get() const {
1249  if (1 / int(K < dimension_count)) {
1250  if (K == 0)
1251  return this->width;
1252  else //if (K == 1)
1253  return this->height;
1254  }
1255  return 0;
1256  }
1257 
1261  template <size_t K>
1262  void set(coordinate_type const v) {
1263  if (1 / int(K < dimension_count)) {
1264  if (K == 0)
1265  this->width = v;
1266  else //if (K == 1)
1267  this->height = v;
1268  }
1269  }
1270 
1271  template <size_t K>
1272  friend coordinate_type get(const MyType& p) {
1273  return p.get<K>();
1274  }
1275 
1276  template <size_t K>
1277  friend void set(const MyType& p, coordinate_type const v) {
1278  p.set<K>(v);
1279  }
1280 
1281  // Returns true if size width and height are 0
1282  bool IsNull() const noexcept {
1283  return width == 0 && height == 0;
1284  }
1285 
1286  // Returns true if size is equal to another size
1287  bool IsEqual(const MyType& s) const noexcept {
1288  return width == s.width && height == s.height;
1289  }
1290 #endif
1291 } SDKSize;
1292 
1295 typedef struct SDKRectF2D {
1296  float x; // X left
1297  float y; // Y bottom
1298  float width; // Width
1299  float height; // Height
1300 
1301 #if defined(__cplusplus)
1302  typedef SDKRectF2D MyType;
1303  typedef SDKPointF2D point_type;
1304  typedef SDKSizeF size_type;
1305  #if 0
1306  typedef sdk::geometry::CornerType<MyType,0> min_corner_type;
1307  typedef sdk::geometry::CornerType<MyType,1> max_corner_type;
1308 
1309  template <size_t I>
1310  const sdk::geometry::CornerType<MyType,I> corner() const noexcept {
1311  return sdk::geometry::CornerType<MyType,I>(*this);
1312  }
1313 
1314  const min_corner_type min_corner() const noexcept {
1315  return min_corner_type(*this);
1316  }
1317 
1318  const max_corner_type max_corner() const noexcept {
1319  return max_corner_type(*this);
1320  }
1321  #else
1322  point_type min_corner() const noexcept {
1323  point_type ret = {x, y};
1324  return ret;
1325  }
1326  point_type max_corner() const noexcept {
1327  point_type ret = {x + width, y + height};
1328  return ret;
1329  }
1330  #endif
1331 
1332  // Returns true if rectangle has no area
1333  bool IsEmpty() const noexcept {
1334  return width == 0 && height == 0;
1335  }
1336 
1337  // Returns true if rectangle is at (0,0) and has no area
1338  bool IsNull() const noexcept {
1339  return x == 0 && y == 0 && width == 0 && height == 0;
1340  }
1341 
1342  // Returns true if rectangle is equal to another rectangle
1343  bool IsEqual(const MyType& r) const noexcept {
1344  return x == r.x && y == r.y && width == r.width && height == r.height;
1345  }
1346 
1347  const point_type Center() const noexcept {
1348  point_type ret = {x + width / 2, y + height / 2};
1349  return ret;
1350  }
1351 #endif
1352 } SDKRectF2D;
1353 
1356 typedef struct SDKRectD2D {
1357  double x; // X left
1358  double y; // Y bottom
1359  double width; // Width
1360  double height; // Height
1361 
1362 #if defined(__cplusplus)
1363  typedef SDKRectD2D MyType;
1364  typedef SDKPointD2D point_type;
1365  typedef SDKSizeD size_type;
1366  #if 0
1367  typedef sdk::geometry::CornerType<MyType,0> min_corner_type;
1368  typedef sdk::geometry::CornerType<MyType,1> max_corner_type;
1369 
1370  template <size_t I>
1371  const sdk::geometry::CornerType<MyType,I> corner() const noexcept {
1372  return sdk::geometry::CornerType<MyType,I>(*this);
1373  }
1374 
1375  const min_corner_type min_corner() const noexcept {
1376  return min_corner_type(*this);
1377  }
1378 
1379  const max_corner_type max_corner() const noexcept {
1380  return max_corner_type(*this);
1381  }
1382  #else
1383  point_type min_corner() const noexcept {
1384  point_type ret = {x, y};
1385  return ret;
1386  }
1387  point_type max_corner() const noexcept {
1388  point_type ret = {x + width, y + height};
1389  return ret;
1390  }
1391  #endif
1392 
1393  // Returns true if rectangle has no area
1394  bool IsEmpty() const noexcept {
1395  return width == 0 && height == 0;
1396  }
1397 
1398  // Returns true if rectangle is at (0,0) and has no area
1399  bool IsNull() const noexcept {
1400  return x == 0 && y == 0 && width == 0 && height == 0;
1401  }
1402 
1403  // Returns true if rectangle is equal to another rectangle
1404  bool IsEqual(const MyType& r) const noexcept {
1405  return x == r.x && y == r.y && width == r.width && height == r.height;
1406  }
1407 
1408  const point_type Center() const noexcept {
1409  point_type ret = {x + width / 2, y + height / 2};
1410  return ret;
1411  }
1412 #endif
1413 } SDKRectD2D;
1414 
1417 typedef struct SDKRectI2D {
1418  SDKInt32 x; // X left
1419  SDKInt32 y; // Y bottom
1420  SDKUInt32 width; // Width
1421  SDKUInt32 height; // Height
1422 
1423 #if defined(__cplusplus)
1424  typedef SDKRectI2D MyType;
1425  typedef SDKPointI2D point_type;
1426  typedef SDKSize size_type;
1427  #if 0
1428  typedef sdk::geometry::CornerType<MyType,0> min_corner_type;
1429  typedef sdk::geometry::CornerType<MyType,1> max_corner_type;
1430 
1431  template <size_t I>
1432  const sdk::geometry::CornerType<MyType,I> corner() const noexcept {
1433  return sdk::geometry::CornerType<MyType,I>(*this);
1434  }
1435 
1436  const min_corner_type min_corner() const noexcept {
1437  return min_corner_type(*this);
1438  }
1439 
1440  const max_corner_type max_corner() const noexcept {
1441  return max_corner_type(*this);
1442  }
1443  #else
1444  point_type min_corner() const noexcept {
1445  point_type ret = {x, y};
1446  return ret;
1447  }
1448  point_type max_corner() const noexcept {
1449  point_type ret = {static_cast<SDKInt32>(x + width),
1450  static_cast<SDKInt32>(y + height)};
1451  return ret;
1452  }
1453  #endif
1454 
1455  // Returns true if rectangle has no area
1456  bool IsEmpty() const noexcept {
1457  return width == 0 && height == 0;
1458  }
1459 
1460  // Returns true if rectangle is at (0,0) and has no area
1461  bool IsNull() const noexcept {
1462  return x == 0 && y == 0 && width == 0 && height == 0;
1463  }
1464 
1465  // Returns true if rectangle is equal to another rectangle
1466  bool IsEqual(const MyType& r) const noexcept {
1467  return x == r.x && y == r.y && width == r.width && height == r.height;
1468  }
1469 
1470  const point_type Center() const noexcept {
1471  point_type ret = {SDKInt32(x + width / 2), SDKInt32(y + height / 2)};
1472  return ret;
1473  }
1474 #endif
1475 } SDKRectI2D, SDKRect2D;
1476 
1479 typedef struct SDKRoundRectF2D {
1480  SDKRectF2D rect; // Rectangle
1481  float rad_x; // Rounding radius by Ox
1482  float rad_y; // Rounding radius by Oy
1483 } SDKRoundRectF2D;
1484 
1487 typedef struct SDKEllipseF2D {
1488  SDKPointF2D center; // Ellipse center point
1489  float rad_x; // Ellipse radius by Ox
1490  float rad_y; // Ellipse radius by Oy
1491 } SDKEllipseF2D;
1492 
1495 typedef struct SDKQBezierSegment {
1496  SDKPointF2D pt1;
1497  SDKPointF2D pt2;
1499 
1502 typedef struct SDKCuBezierSegment {
1503  SDKPointF2D pt1;
1504  SDKPointF2D pt2;
1505  SDKPointF2D pt3;
1507 
1510 typedef SDKInt32 SDKGeoInt;
1511 typedef SDKInt32 GeoInt;
1512 typedef SDKUInt32 SDKGeoIntDistance;
1513 typedef SDKUInt32 GeoIntDistance;
1514 
1518 static const GeoIntDistance kGeoIntLonFull = SDK_MAX_UINT32;
1520 static const GeoIntDistance kGeoIntLatFull = SDK_MAX_UINT32/2;
1522 static const GeoInt kGeoIntLonMax = SDK_MAX_INT32;
1523 static const GeoInt kGeoIntMaxX = kGeoIntLonMax;
1525 static const GeoInt kGeoIntLonMin = SDK_MIN_INT32;
1526 static const GeoInt kGeoIntMinX = kGeoIntLonMin;
1528 static const GeoInt kGeoIntLatMax = SDK_MAX_INT32/2;
1529 static const GeoInt kGeoIntMaxY = kGeoIntLatMax;
1531 static const GeoInt kGeoIntLatMin = SDK_MIN_INT32/2;
1532 static const GeoInt kGeoIntMinY = kGeoIntLatMin;
1534 static const double kDegLonFull = 360.0;
1536 static const double kDegLatFull = 180.0;
1538 static const double kDegLonMax = 180.0;
1540 static const double kDegLonMin = -180.0;
1542 static const double kDegLatMax = 90.0;
1544 static const double kDegLatMin = -90.0;
1546 static const double kDegLatInvalidValue = 91.0;
1547 static const double kDegInvalidValueY = kDegLatInvalidValue;
1549 static const double kDegLonInvalidValue = 181.0;
1550 static const double kDegInvalidValueX = kDegLonInvalidValue;
1552 
1555 typedef struct SDKGeoIntPoint {
1556  union {
1557  SDKGeoInt x;
1558  SDKGeoInt lon;
1559  };
1560  union {
1561  SDKGeoInt y;
1562  SDKGeoInt lat;
1563  };
1564 
1565 #ifdef __cplusplus
1566  typedef SDKGeoInt coordinate_type;
1567  enum DimensionCount_ { dimension_count = 2 };
1568 
1569  static coordinate_type bad_coordinate() {
1570  return SDK_MIN_INT32;
1571  }
1572 
1576  template <size_t K>
1577  coordinate_type get() const {
1578  if (1 / int(K < dimension_count)) {
1579  if (K == 0)
1580  return this->x;
1581  else //if (K == 1)
1582  return this->y;
1583  }
1584  return SDK_MIN_INT32;
1585  }
1586 
1590  template <size_t K>
1591  void set(coordinate_type const v) {
1592  if (1 / int(K < dimension_count)) {
1593  if (K == 0)
1594  this->x = v;
1595  else //if (K == 1)
1596  this->y = v;
1597  }
1598  }
1599 
1600  bool IsValid() const {
1601  return (x != bad_coordinate() && y != bad_coordinate()) ? true : false;
1602  }
1603 
1604 #endif
1605 } SDKGeoIntPoint;
1606 
1609 typedef struct SDKGeoIntPoint3D {
1610  union {
1611  SDKGeoInt x;
1612  SDKGeoInt lon;
1613  };
1614  union {
1615  SDKGeoInt y;
1616  SDKGeoInt lat;
1617  };
1618  double z;
1619 
1620 #ifdef __cplusplus
1621  typedef SDKGeoInt coordinate_type;
1622  enum DimensionCount_ { dimension_count = 3 };
1623 
1627  class _RetType {
1628  friend struct SDKGeoIntPoint3D;
1629  _RetType(const void *p) : m_p(p) {}
1630  const void *m_p;
1631  public:
1632  operator const coordinate_type&() const {
1633  return *(const coordinate_type*)m_p;
1634  }
1635  operator const double&() const {
1636  return *(const double*)m_p;
1637  }
1638  };
1639  template <size_t K>
1640  _RetType get() const {
1641  if (1 / int(K < 3)) {
1642  if (K == 0)
1643  return _RetType(&this->x);
1644  else if (K == 1)
1645  return _RetType(&this->y);
1646  else
1647  return _RetType(&this->z);
1648  }
1649  return _RetType(NULL);
1650  }
1651 
1655  template <size_t K>
1656  void set(coordinate_type const v) {
1657  if (1 / int(K < 2)) {
1658  if (K == 0)
1659  this->x = v;
1660  else //if (K == 1)
1661  this->y = v;
1662  }
1663  }
1664  template <size_t K>
1665  void set(double const v) {
1666  if (1 / int(K == 2))
1667  this->z = v;
1668  }
1669 #endif
1671 
1674 typedef struct SDKGeoIntRect {
1675  union {
1676  SDKGeoIntPoint sw;
1677  SDKGeoIntPoint min;
1678  };
1679  union {
1680  SDKGeoIntPoint ne;
1681  SDKGeoIntPoint max;
1682  };
1683 
1684 #ifdef __cplusplus
1685  typedef SDKGeoIntPoint point_type;
1686 
1687  // Indexed access
1688  template <size_t C>
1689  point_type const& corner() const noexcept {
1690  if (!(1 / int(C < 2)))
1691  return min;
1692 
1693  if (C == 0)
1694  return min;
1695  else
1696  return max;
1697  }
1698 
1699  template <size_t C>
1700  point_type& corner() noexcept {
1701  if (!(1 / int(C < 2)))
1702  return min;
1703 
1704  if (C == 0)
1705  return min;
1706  else
1707  return max;
1708  }
1709 
1710  point_type const& min_corner() const noexcept {
1711  return min;
1712  }
1713  point_type& min_corner() noexcept {
1714  return min;
1715  }
1716  point_type const& max_corner() const noexcept {
1717  return max;
1718  }
1719  point_type& max_corner() noexcept {
1720  return max;
1721  }
1722 #endif
1723 } SDKGeoIntRect;
1724 
1727 typedef struct SDKGeoPoint {
1728  union {
1729  double x;
1730  double lon;
1731  };
1732  union {
1733  double y;
1734  double lat;
1735  };
1736 
1737 #ifdef __cplusplus
1738  typedef double coordinate_type;
1739  enum DimensionCount_ { dimension_count = 2 };
1740 
1741  static coordinate_type bad_coordinate() {
1742  return IEEE754_2008::dbl_NaN();
1743  }
1744 
1748  template <size_t K>
1749  coordinate_type get() const {
1750  if (1 / int(K < dimension_count)) {
1751  if (K == 0)
1752  return this->x;
1753  else //if (K == 1)
1754  return this->y;
1755  }
1756  return 0;
1757  }
1758 
1762  template <size_t K>
1763  void set(coordinate_type const v) {
1764  if (1 / int(K < dimension_count)) {
1765  if (K == 0)
1766  this->x = v;
1767  else //if (K == 1)
1768  this->y = v;
1769  }
1770  }
1771 
1772  bool IsValid() const {
1773  // Check if NaN to prevent unpredictable compare
1774  // operators behavior on different platforms and standards
1775  if (IEEE754_2008::is_NaN(x) || IEEE754_2008::is_NaN(y))
1776  return false;
1777 
1778  return (x > kDegLonMax || x < kDegLonMin ||
1779  y > kDegLatMax || y < kDegLatMin) ? false : true;
1780  }
1781 
1782  // Returns true if geo point is equal to another geo point
1783  bool IsEqual(const SDKGeoPoint& pt) const noexcept {
1784  if (IsValid() != pt.IsValid())
1785  return false;
1786  if (!IsValid())
1787  return true; // Both of points are not valid
1788  // Both of points are valid
1789  if (fabs(x - pt.x) >= 90.0/0x40000000) // 0.00000008381903171539306640625
1790  return false;
1791  if (fabs(y - pt.y) >= 90.0/0x40000000)
1792  return false;
1793  return true;
1794  }
1795 
1796 #endif
1797 } SDKGeoPoint;
1798 
1801 typedef struct SDKGeoPointRect {
1802  union {
1803  SDKGeoPoint sw;
1804  SDKGeoPoint min;
1805  };
1806  union {
1807  SDKGeoPoint ne;
1808  SDKGeoPoint max;
1809  };
1810 
1811 #ifdef __cplusplus
1812  typedef SDKGeoPoint point_type;
1813 
1814  // Indexed access
1815  template <size_t C>
1816  point_type const& corner() const noexcept {
1817  if (!(1 / int(C < 2)))
1818  return min;
1819  if (C == 0)
1820  return min;
1821  else
1822  return max;
1823  }
1824 
1825  template <size_t C>
1826  point_type& corner() noexcept {
1827  if (!(1 / int(C < 2)))
1828  return min;
1829 
1830  if (C == 0)
1831  return min;
1832  else
1833  return max;
1834  }
1835  point_type const& min_corner() const noexcept {
1836  return min;
1837  }
1838  point_type& min_corner() noexcept {
1839  return min;
1840  }
1841  point_type const& max_corner() const noexcept {
1842  return max;
1843  }
1844  point_type& max_corner() noexcept {
1845  return max;
1846  }
1847 #endif
1848 } SDKGeoPointRect;
1849 
1852 typedef struct SDKGeoPoint3D {
1853  union {
1854  double x;
1855  double lon;
1856  };
1857  union {
1858  double y;
1859  double lat;
1860  };
1861  double z;
1862 
1863 #ifdef __cplusplus
1864  typedef double coordinate_type;
1865  enum DimensionCount_ { dimension_count = 3 };
1866 
1867  static coordinate_type bad_coordinate() {
1868  return IEEE754_2008::dbl_NaN();
1869  }
1870 
1874  template <size_t K>
1875  coordinate_type get() const {
1876  if (1 / int(K < dimension_count)) {
1877  if (K == 0)
1878  return this->x;
1879  else if (K == 1)
1880  return this->y;
1881  else //if (K == 2)
1882  return this->z;
1883  }
1884  return 0;
1885  }
1886 
1890  template <size_t K>
1891  void set(coordinate_type const v) {
1892  if (1 / int(K < dimension_count)) {
1893  if (K == 0)
1894  this->x = v;
1895  else if (K == 1)
1896  this->y = v;
1897  else //if (K == 2)
1898  this->z = v;
1899  }
1900  }
1901 #endif
1902 } SDKGeoPoint3D;
1903 
1906 #ifdef __cplusplus
1907 inline bool operator==(const SDKPointI2D& lhs, const SDKPointI2D& rhs) {
1908  return lhs.x == rhs.x && lhs.y == rhs.y;
1909 }
1910 
1911 inline bool operator!=(const SDKPointI2D& lhs, const SDKPointI2D& rhs) {
1912  return !(lhs == rhs);
1913 }
1914 
1915 inline bool operator==(const SDKPointF2D& lhs, const SDKPointF2D& rhs) {
1916  return true &&
1917  fabsf(lhs.x - rhs.x) < FLT_EPSILON &&
1918  fabsf(lhs.y - rhs.y) < FLT_EPSILON;
1919 }
1920 
1921 inline bool operator!=(const SDKPointF2D& lhs, const SDKPointF2D& rhs) {
1922  return !(lhs == rhs);
1923 }
1924 
1925 inline bool operator==(const SDKPointF3D& lhs, const SDKPointF3D& rhs) {
1926  return true &&
1927  fabsf(lhs.x - rhs.x) < FLT_EPSILON &&
1928  fabsf(lhs.y - rhs.y) < FLT_EPSILON &&
1929  fabsf(lhs.z - rhs.z) < FLT_EPSILON;
1930 }
1931 
1932 inline bool operator==(const SDKPointD2D& lhs, const SDKPointD2D& rhs) {
1933  //return true
1934  // && fabs(lhs.x - rhs.x) < FLT_EPSILON
1935  // && fabs(lhs.y - rhs.y) < FLT_EPSILON;
1936  return lhs.x == rhs.x && lhs.y == rhs.y;
1937 }
1938 
1939 inline bool operator!=(const SDKPointD2D& lhs, const SDKPointD2D& rhs) {
1940  return !(lhs == rhs);
1941 }
1942 
1943 inline bool operator==(const SDKPointD3D& lhs, const SDKPointD3D& rhs) {
1944  //return true
1945  // && fabs(lhs.x - rhs.x) < FLT_EPSILON
1946  // && fabs(lhs.y - rhs.y) < FLT_EPSILON
1947  // && fabs(lhs.z - rhs.z) < FLT_EPSILON;
1948  return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z;
1949 }
1950 
1951 inline bool operator!=(const SDKPointD3D& lhs, const SDKPointD3D& rhs) {
1952  return !(lhs == rhs);
1953 }
1954 
1955 inline bool operator==(const SDKGeoIntPoint& lhs, const SDKGeoIntPoint& rhs) {
1956  return lhs.x == rhs.x && lhs.y == rhs.y;
1957 }
1958 
1959 inline bool operator!=(const SDKGeoIntPoint& lhs, const SDKGeoIntPoint& rhs) {
1960  return !(lhs == rhs);
1961 }
1962 
1963 inline bool operator==(const SDKGeoPoint& lhs, const SDKGeoPoint& rhs) {
1964  return lhs.IsEqual(rhs);
1965 }
1966 
1967 inline bool operator!=(const SDKGeoPoint& lhs, const SDKGeoPoint& rhs) {
1968  return !(lhs == rhs);
1969 }
1970 
1971 inline bool operator==(const SDKGeoPoint3D& lhs, const SDKGeoPoint3D& rhs) {
1972  return true &&
1973  fabs(lhs.x - rhs.x) < 90.0/0x40000000 &&
1974  fabs(lhs.y - rhs.y) < 90.0/0x40000000 &&
1975  fabs(lhs.z - rhs.z) < FLT_EPSILON;
1976 }
1977 
1978 inline bool operator!=(const SDKGeoPoint3D& lhs, const SDKGeoPoint3D& rhs) {
1979  return !(lhs == rhs);
1980 }
1981 
1982 inline bool operator==(const SDKGeoIntPoint3D& lhs,
1983  const SDKGeoIntPoint3D& rhs) {
1984  return lhs.x == rhs.x && lhs.y == rhs.y && fabs(lhs.z - rhs.z) < FLT_EPSILON;
1985 }
1986 
1987 inline bool operator!=(const SDKGeoIntPoint3D& lhs,
1988  const SDKGeoIntPoint3D& rhs) {
1989  return !(lhs == rhs);
1990 }
1991 
1992 inline bool operator==(const SDKEnvelopeF2D& lhs, const SDKEnvelopeF2D& rhs) {
1993  return (lhs.min) == (rhs.min) && (lhs.max) == (rhs.max);
1994 }
1995 
1996 inline bool operator!=(const SDKEnvelopeF2D& lhs, const SDKEnvelopeF2D& rhs) {
1997  return !(lhs == rhs);
1998 }
1999 
2000 inline bool operator==(const SDKEnvelopeF3D& lhs, const SDKEnvelopeF3D& rhs) {
2001  return (lhs.min) == (rhs.min) && (lhs.max) == (rhs.max);
2002 }
2003 
2004 inline bool operator!=(const SDKEnvelopeF3D& lhs, const SDKEnvelopeF3D& rhs) {
2005  return !(lhs == rhs);
2006 }
2007 
2008 inline bool operator==(const SDKEnvelopeD2D& lhs, const SDKEnvelopeD2D& rhs) {
2009  return (lhs.min) == (rhs.min) && (lhs.max) == (rhs.max);
2010 }
2011 
2012 inline bool operator!=(const SDKEnvelopeD2D& lhs, const SDKEnvelopeD2D& rhs) {
2013  return !(lhs == rhs);
2014 }
2015 
2016 inline bool operator==(const SDKEnvelopeD3D& lhs, const SDKEnvelopeD3D& rhs) {
2017  return (lhs.min) == (rhs.min) && (lhs.max) == (rhs.max);
2018 }
2019 
2020 inline bool operator!=(const SDKEnvelopeD3D& lhs, const SDKEnvelopeD3D& rhs) {
2021  return !(lhs == rhs);
2022 }
2023 
2024 inline bool operator==(const SDKRectI2D& lhs, const SDKRectI2D& rhs) {
2025  return lhs.x == rhs.x && lhs.y == rhs.y && lhs.width == rhs.width &&
2026  lhs.height == rhs.height;
2027 }
2028 
2029 inline bool operator!=(const SDKRectI2D& lhs, const SDKRectI2D& rhs) {
2030  return !(lhs == rhs);
2031 }
2032 
2033 inline bool operator==(const SDKRectF2D& lhs, const SDKRectF2D& rhs) {
2034  return lhs.x == rhs.x && lhs.y == rhs.y && lhs.width == rhs.width &&
2035  lhs.height == rhs.height;
2036 }
2037 
2038 inline bool operator!=(const SDKRectF2D& lhs, const SDKRectF2D& rhs) {
2039  return !(lhs == rhs);
2040 }
2041 
2042 inline bool operator==(const SDKRectD2D& lhs, const SDKRectD2D& rhs) {
2043  return lhs.x == rhs.x && lhs.y == rhs.y &&
2044  lhs.width == rhs.width && lhs.height == rhs.height;
2045 }
2046 
2047 inline bool operator!=(const SDKRectD2D& lhs, const SDKRectD2D& rhs) {
2048  return !(lhs == rhs);
2049 }
2050 
2051 inline bool operator==(const SDKSizeF& lhs, const SDKSizeF& rhs) {
2052  return lhs.IsEqual(rhs);
2053 }
2054 
2055 inline bool operator!=(const SDKSizeF& lhs, const SDKSizeF& rhs) {
2056  return !(lhs == rhs);
2057 }
2058 
2059 inline bool operator==(const SDKSizeD& lhs, const SDKSizeD& rhs) {
2060  return lhs.IsEqual(rhs);
2061 }
2062 
2063 inline bool operator!=(const SDKSizeD& lhs, const SDKSizeD& rhs) {
2064  return !(lhs == rhs);
2065 }
2066 
2067 inline bool operator==(const SDKSize& lhs, const SDKSize& rhs) {
2068  return lhs.IsEqual(rhs);
2069 }
2070 
2071 inline bool operator!=(const SDKSize& lhs, const SDKSize& rhs) {
2072  return !(lhs == rhs);
2073 }
2074 
2075 inline bool IsEqualGeoIntPoint(const SDKGeoIntPoint& p1,
2076  const SDKGeoIntPoint& p2) {
2077  return ((p1.x == p2.x) && (p1.y == p2.y));
2078 }
2079 
2080 inline bool IsValidGeoPoint(const SDKGeoPoint& p) {
2081  return ((p.x >= kDegLonMin) && (p.x <= kDegLonMax) &&
2082  (p.y >= kDegLatMin) && (p.y <= kDegLatMax));
2083 }
2084 
2085 inline bool IsValidLat(double lat) {
2086  return ((lat >= kDegLatMin) && (lat <= kDegLatMax));
2087 }
2088 
2089 inline bool IsValidLon(double lon) {
2090  return ((lon >= kDegLonMin) && (lon <= kDegLonMax));
2091 }
2092 
2093 inline void NormalizeLat(double& lat) {
2094  if (lat < kDegLatMin)
2095  lat = kDegLatMin;
2096  else if (lat > kDegLatMax)
2097  lat = kDegLatMax;
2098 }
2099 
2100 #if 0
2101 SDK_BEGIN_NAMESPACE
2102 namespace geometry {
2103 
2104 template <>
2105 struct GenGeometryTag<SDKPointI2D> { typedef GenGeometryPointTag type; };
2106 template <>
2107 struct GenGeometryTag<SDKPointF2D> { typedef GenGeometryPointTag type; };
2108 template <>
2109 struct GenGeometryTag<SDKPointF3D> { typedef GenGeometryPointTag type; };
2110 template <>
2111 struct GenGeometryTag<SDKPointD2D> { typedef GenGeometryPointTag type; };
2112 template <>
2113 struct GenGeometryTag<SDKPointD3D> { typedef GenGeometryPointTag type; };
2114 template <>
2115 struct GenGeometryTag<SDKGeoIntPoint> { typedef GenGeometryPointTag type; };
2116 template <>
2117 struct GenGeometryTag<SDKGeoPoint> { typedef GenGeometryPointTag type; };
2118 template <>
2119 struct GenGeometryTag<SDKGeoPoint3D> { typedef GenGeometryPointTag type; };
2120 template <>
2121 struct GenGeometryTag<SDKGeoIntPoint3D> { typedef GenGeometryPointTag type; };
2122 template <>
2123 struct GenGeometryTag<SDKEnvelopeF2D> { typedef GenGeometryBoxTag type; };
2124 template <>
2125 struct GenGeometryTag<SDKEnvelopeF3D> { typedef GenGeometryBoxTag type; };
2126 template <>
2127 struct GenGeometryTag<SDKEnvelopeD2D> { typedef GenGeometryBoxTag type; };
2128 template <>
2129 struct GenGeometryTag<SDKEnvelopeD3D> { typedef GenGeometryBoxTag type; };
2130 template <>
2131 struct GenGeometryTag<SDKRectF2D> { typedef GenGeometryXYWHRectTag type; };
2132 template <>
2133 struct GenGeometryTag<SDKRectD2D> { typedef GenGeometryXYWHRectTag type; };
2134 
2135 // Special case for 3D point with integer latitude and longitude
2136 // coordinates and double zed coordinate
2137 template <>
2138 struct GenGeometryPointAccess<SDKGeoIntPoint3D,2,true>
2139 {
2140  typedef double coordinate_type;
2141  static void set(SDKGeoIntPoint3D& p, coordinate_type v)
2142  {
2143  p.z = v;
2144  }
2145  static coordinate_type get(const SDKGeoIntPoint3D& p)
2146  {
2147  return p.z;
2148  }
2149 };
2150 
2151 //***********************
2152 //* Quadrants Numbering *
2153 //***********************
2154 //* *
2155 //* | *
2156 //* 1 2 2 *
2157 //* | *
2158 //* ---0---N---2--- *
2159 //* | *
2160 //* 0 0 3 *
2161 //* | *
2162 //* *
2163 //***********************
2164 
2167 template <
2168  typename x1_type, typename y1_type,
2169  typename x0_type, typename y0_type>
2170 static inline int quadrantNum(
2171  const x1_type x1, const y1_type y1,
2172  const x0_type x0=x0_type(), const y0_type y0=y0_type())
2173 {
2174  enum
2175  {
2176  codes = 0
2177  | (1 << 0) | (1 << 3) | (4 << 6)
2178  | (1 << 9) | (0 << 12) | (3 << 15)
2179  | (2 << 18) | (3 << 21) | (3 << 24)
2180  };
2181  return ((codes >> 3 * (3 * ((y0 < y1) - (y1 < y0) + 1) + ((x0 < x1) - (x1 < x0) + 1))) & 7) - 1;
2182 }
2183 
2184 #if 1
2185 // The lower 4 bits of the result are contained the octant code;
2186 // the higher bits are contained the octant index.
2187 
2188 // *************************************
2189 // * Octant codes and indexes *
2190 // * | | *
2191 // * 1001 = 9 | 1000 = 8 | 1010 = A *
2192 // * 2 | 3 | 4 *
2193 // * ----------+----------+---------- *
2194 // * | | *
2195 // * 0001 = 1 | 0000 = 0 | 0010 = 2 *
2196 // * 1 | -1 | 5 *
2197 // * ----------+----------+---------- *
2198 // * | | *
2199 // * 0101 = 5 | 0100 = 4 | 0110 = 6 *
2200 // * 0 | 7 | 6 *
2201 // * | | *
2202 // *************************************
2203 
2204 enum OctantCodes
2205 {
2206  kOC_Xmin = 1,
2207  kOC_Xmax = 2,
2208  kOC_Ymin = 4,
2209  kOC_Ymax = 8,
2210  kOC_Ishf = 4, // Shift the code right to get octant index
2211  kOC_Cmsk = 0xF, // Mask the code to get octant Cohen-Sutherland code
2212 };
2213 
2214 template <
2215  typename wnd_x_type, typename wnd_y_type,
2216  typename pnt_x_type, typename pnt_y_type>
2217 static int getOctantCodeAndIndex(
2218  const wnd_x_type /*wnd_*/x1,
2219  const wnd_y_type /*wnd_*/y1,
2220  const wnd_x_type /*wnd_*/x2,
2221  const wnd_y_type /*wnd_*/y2,
2222  const pnt_x_type /*pnt_*/x,
2223  const pnt_y_type /*pnt_*/y)
2224 {
2225  int c = 0;
2226  if (!(x1 < x))
2227  {
2228  if ((x < x1))
2229  c = kOC_Xmin;
2230  if (!(y1 < y))
2231  {
2232  if ((y < y1))
2233  c |= kOC_Ymin;
2234  c |= (0 << kOC_Ishf);
2235  }
2236  else if (!(y < y2))
2237  {
2238  if ((y2 < y))
2239  c |= kOC_Ymax;
2240  c |= (2 << kOC_Ishf);
2241  }
2242  else
2243  {
2244  c |= (1 << kOC_Ishf);
2245  }
2246  }
2247  else if (!(x < x2))
2248  {
2249  if ((x2 < x))
2250  c = kOC_Xmax;
2251  if (!(y1 < y))
2252  {
2253  if ((y < y1))
2254  c |= kOC_Ymin;
2255  c |= (6 << kOC_Ishf);
2256  }
2257  else if (!(y < y2))
2258  {
2259  if ((y2 < y))
2260  c |= kOC_Ymax;
2261  c |= (4 << kOC_Ishf);
2262  }
2263  else
2264  {
2265  c |= (5 << kOC_Ishf);
2266  }
2267  }
2268  else // if (x1 < x && x < x2)
2269  {
2270  if (!(y1 < y))
2271  {
2272  if ((y < y1))
2273  c |= kOC_Ymin;
2274  c |= (7 << kOC_Ishf);
2275  }
2276  else if (!(y < y2))
2277  {
2278  if ((y2 < y))
2279  c |= kOC_Ymax;
2280  c |= (3 << kOC_Ishf);
2281  }
2282  else
2283  {
2284  c = (-1 << kOC_Ishf);
2285  }
2286  }
2287  return c;
2288 }
2289 
2290 #endif
2291 } // namespace geometry
2292 SDK_END_NAMESPACE
2293 #endif
2294 
2295 #endif // __cplusplus
2296 
2297 #pragma pop_macro("min")
2298 #pragma pop_macro("max")
2299 #endif // SDK_GEOMETRY_BASE_TYPES_H_
kDegLonInvalidValue
static const double kDegLonInvalidValue
Invalid longitude value.
Definition: geometry_base_types.h:1549
SDKGeoIntPoint
Definition of geographic points.
Definition: geometry_base_types.h:1555
SDKGeoPointRect
Geo rectangle in degree units.
Definition: geometry_base_types.h:1801
kGeoIntLatMin
static const GeoInt kGeoIntLatMin
Min latitude, integer.
Definition: geometry_base_types.h:1531
kDegLonFull
static const double kDegLonFull
Full range of longitudes around the globe, float.
Definition: geometry_base_types.h:1534
base_types.h
SDK base types.
SDKEnvelopeF2D
A rectangle orthogonal with sides parallel to a coordinate system.
Definition: geometry_base_types.h:641
SDKEnvelopeF3D
A rectangle orthogonal with sides parallel to a 3D coordinate system.
Definition: geometry_base_types.h:704
SDK_MIN_INT32
static const SDKInt32 SDK_MIN_INT32
Min limit of 32-bit signed integer.
Definition: platform.h:175
SDKEnvelopeI2D
A rectangle orthogonal with sides parallel to a coordinate system.
Definition: geometry_base_types.h:459
SDKVertex2D
SDKPointF2D SDKVertex2D
Vertex2D.
Definition: geometry_base_types.h:170
kDegLatInvalidValue
static const double kDegLatInvalidValue
Invalid latitude value.
Definition: geometry_base_types.h:1546
kDegLonMax
static const double kDegLonMax
Max longitude, float.
Definition: geometry_base_types.h:1538
kGeoIntLonMin
static const GeoInt kGeoIntLonMin
Min longitude, integer.
Definition: geometry_base_types.h:1525
SDKRectD2D
2D Rectangle
Definition: geometry_base_types.h:1356
SDKRectF2D
2D Rectangle
Definition: geometry_base_types.h:1295
kGeoIntLatFull
static const GeoIntDistance kGeoIntLatFull
Full range of latitudes around the globe, integer.
Definition: geometry_base_types.h:1520
SDK_MAX_INT32
static const SDKInt32 SDK_MAX_INT32
Max limit of 32-bit signed integer.
Definition: platform.h:177
SDKGeoPoint3D
3D point in degrees.
Definition: geometry_base_types.h:1852
SDKGeoIntRect
Rectangle in GeoInt units.
Definition: geometry_base_types.h:1674
SDKQBezierSegment
Quadratic Bezier curve segment.
Definition: geometry_base_types.h:1495
kDegLatMax
static const double kDegLatMax
Max latitude, float.
Definition: geometry_base_types.h:1542
kGeoIntLonFull
static const GeoIntDistance kGeoIntLonFull
Full range of longitudes around the globe, integer.
Definition: geometry_base_types.h:1518
SDKRectI2D
2D Rectangle
Definition: geometry_base_types.h:1417
SDKEnvelopeD2D
A rectangle orthogonal with sides parallel to a coordinate system.
Definition: geometry_base_types.h:375
SDKEnvelopeD3D
A rectangle orthogonal with sides parallel to a 3D coordinate system.
Definition: geometry_base_types.h:543
SDKGeoPoint
Geo point in degree units.
Definition: geometry_base_types.h:1727
kGeoIntLonMax
static const GeoInt kGeoIntLonMax
Max longitude, integer.
Definition: geometry_base_types.h:1522
SDKCuBezierSegment
Cubic Bezier curve segment.
Definition: geometry_base_types.h:1502
kGeoIntLatMax
static const GeoInt kGeoIntLatMax
Max latitude, integer.
Definition: geometry_base_types.h:1528
SDKSizeD
SizeD.
Definition: geometry_base_types.h:1173
kDegLatMin
static const double kDegLatMin
Min latitude, float.
Definition: geometry_base_types.h:1544
SDKGeoInt
SDKInt32 SDKGeoInt
360 degrees normalized on Max 32-bit Integer.
Definition: geometry_base_types.h:1510
SDKPointF3D
Single 3D point.
Definition: geometry_base_types.h:101
SDKPointF2D
Single 2D point.
Definition: geometry_base_types.h:33
SDKVertex3D
SDKPointF3D SDKVertex3D
Vertex3D.
Definition: geometry_base_types.h:174
platform.h
Describes the platform constants.
SDKGeoIntPoint3D
3D point in GeoInt units.
Definition: geometry_base_types.h:1609
SDKPointI2D
Single 2D point.
Definition: geometry_base_types.h:178
kDegLatFull
static const double kDegLatFull
Full range of latitudes around the globe, float.
Definition: geometry_base_types.h:1536
SDK_MAX_UINT32
static const SDKUInt32 SDK_MAX_UINT32
Max limit of 32-bit unsigned integer.
Definition: platform.h:179
kDegLonMin
static const double kDegLonMin
Min longitude, float.
Definition: geometry_base_types.h:1540
SDKRoundRectF2D
Rounded 2D rectangle.
Definition: geometry_base_types.h:1479
SDKSize
SizeUI.
Definition: geometry_base_types.h:1235
SDKPointD3D
A three dimensional point.
Definition: geometry_base_types.h:306
SDKPointD2D
A two dimensional point.
Definition: geometry_base_types.h:242
SDKSizeF
SizeF.
Definition: geometry_base_types.h:1111
SDKEllipseF2D
2D ellipse
Definition: geometry_base_types.h:1487