wykobi.hpp
Go to the documentation of this file.
1 /*
2 (***********************************************************************)
3 (* *)
4 (* Wykobi Computational Geometry Library *)
5 (* Release Version 0.0.5 *)
6 (* http://www.wykobi.com *)
7 (* Copyright (c) 2005-2017 Arash Partow, All Rights Reserved. *)
8 (* *)
9 (* The Wykobi computational geometry library and its components are *)
10 (* supplied under the terms of the open source MIT License. *)
11 (* The contents of the Wykobi computational geometry library and its *)
12 (* components may not be copied or disclosed except in accordance with *)
13 (* the terms of the MIT License. *)
14 (* *)
15 (* URL: https://opensource.org/licenses/MIT *)
16 (* *)
17 (***********************************************************************)
18 */
19 
20 #ifndef INCLUDE_WYKOBI
21 #define INCLUDE_WYKOBI
22 
23 #include <algorithm>
24 #include <cassert>
25 #include <cstddef>
26 #include <iterator>
27 #include <limits>
28 #include <vector>
29 
30 #include "wykobi_math.hpp"
31 
32 namespace wykobi {
33 
34 static const char VERSION_INFORMATION[] = "Wykobi Version 0.0.5";
35 static const char AUTHOR_INFORMATION[] = "Arash Partow";
36 static const char EPOCH_VERSION[] = "C578AC5A:35A4123B:DF32F721";
37 
38 #ifndef WYKOBI
39 #define WYKOBI
40 #endif
41 
42 /****************************************************************************/
43 /********************[ Basic Geometric Structure Types ]*********************/
44 /****************************************************************************/
45 
46 /************[ Geometric Entity ]*************/
48 
66 };
67 
68 /**************[ Vertex type ]***************/
69 
70 template <typename T, std::size_t D>
71 class pointnd;
72 
73 template <typename T = Float>
74 class point2d : public geometric_entity {
75  public:
76  typedef T type;
77  typedef const type& const_reference;
78  typedef type& reference;
79 
80  point2d() : x(T(0.0)), y(T(0.0)) {}
81  point2d(const pointnd<T, 2>& point) : x(point[0]), y(point[1]) {}
82  ~point2d() {}
83 
84  inline point2d<T>& operator=(const pointnd<T, 2>& point) {
85  x = point[0];
86  y = point[1];
87  return *this;
88  }
89 
90  inline reference operator()(const std::size_t& index) {
91  return ((0 == index) ? x : y);
92  }
93  inline const_reference operator()(const std::size_t& index) const {
94  return ((0 == index) ? x : y);
95  }
96 
97  inline reference operator[](const std::size_t& index) {
98  return ((0 == index) ? x : y);
99  }
100  inline const_reference operator[](const std::size_t& index) const {
101  return ((0 == index) ? x : y);
102  }
103 
104  T x, y;
105 };
106 
107 template <typename T = Float>
108 class point3d : public geometric_entity {
109  public:
110  typedef T Type;
111  typedef const Type& const_reference;
112  typedef Type& reference;
113 
114  point3d() : x(T(0.0)), y(T(0.0)), z(T(0.0)) {}
115  point3d(const pointnd<T, 3>& point) : x(point[0]), y(point[1]), z(point[2]) {}
116  ~point3d() {}
117 
118  inline point3d<T>& operator=(const pointnd<T, 3>& point) {
119  x = point[0];
120  y = point[1];
121  z = point[2];
122  return *this;
123  }
124 
125  inline reference operator()(const std::size_t& index) { return value(index); }
126  inline const_reference operator()(const std::size_t& index) const {
127  return value(index);
128  }
129 
130  inline reference operator[](const std::size_t& index) { return value(index); }
131  inline const_reference operator[](const std::size_t& index) const {
132  return value(index);
133  }
134 
135  T x, y, z;
136 
137  private:
138  inline reference value(const std::size_t& index) {
139  switch (index) {
140  case 0:
141  return x;
142  case 1:
143  return y;
144  case 2:
145  return z;
146  default:
147  return x;
148  }
149  }
150 
151  inline const_reference value(const std::size_t& index) const {
152  switch (index) {
153  case 0:
154  return x;
155  case 1:
156  return y;
157  case 2:
158  return z;
159  default:
160  return x;
161  }
162  }
163 };
164 
165 template <typename T, std::size_t D>
166 class pointnd : public geometric_entity {
167  public:
168  typedef const T& const_reference;
169  typedef T& reference;
170 
171  pointnd() { clear(); }
172  pointnd(const T& v0) { v[0] = v0; }
173  pointnd(const T& v0, const T& v1) {
174  v[0] = v0;
175  v[1] = v1;
176  }
177  pointnd(const T& v0, const T& v1, const T& v2) {
178  v[0] = v0;
179  v[1] = v1;
180  v[2] = v2;
181  }
182  pointnd(const T& v0, const T& v1, const T& v2, const T& v3) {
183  v[0] = v0;
184  v[1] = v1;
185  v[2] = v2;
186  v[3] = v3;
187  }
188  pointnd(const pointnd<T, D>& point) {
189  for (std::size_t i = 0; i < D; ++i) v[i] = point.v[i];
190  }
191 
192  pointnd(const point2d<T>& point) {
193  for (std::size_t i = 0; i < D; ++i) v[i] = point[i];
194  }
195 
196  pointnd(const point3d<T>& point) {
197  for (std::size_t i = 0; i < D; ++i) v[i] = point[i];
198  }
199 
200  ~pointnd() {}
201 
202  void clear() {
203  for (std::size_t i = 0; i < D; ++i) v[i] = T(0.0);
204  }
205 
206  inline pointnd<T, D>& operator=(const pointnd<T, D>& point) {
207  if (this == &point) return *this;
208  for (std::size_t i = 0; i < D; ++i) v[i] = point.v[i];
209  return *this;
210  }
211 
212  inline pointnd<T, D>& operator=(const point2d<T>& point) {
213  if (D == 2) {
214  v[0] = point.x;
215  v[1] = point.y;
216  }
217  return *this;
218  }
219 
220  inline pointnd<T, D>& operator=(const point3d<T>& point) {
221  if (D == 3) {
222  v[0] = point.x;
223  v[1] = point.y;
224  v[2] = point.z;
225  }
226  return *this;
227  }
228 
229  inline reference operator()(const std::size_t& index) { return v[index]; }
230  inline const_reference operator()(const std::size_t& index) const {
231  return v[index];
232  }
233 
234  inline reference operator[](const std::size_t& index) { return v[index]; }
235  inline const_reference operator[](const std::size_t& index) const {
236  return v[index];
237  }
238 
239  protected:
240  T v[D];
241 };
242 
243 template <typename T, std::size_t Dimension>
245  public:
247 };
248 
249 template <typename T>
250 class define_point_type<T, 2> {
251  public:
253 };
254 
255 template <typename T>
256 class define_point_type<T, 3> {
257  public:
259 };
260 
261 /************[ Segment Type ]************/
262 template <typename T, std::size_t Dimension>
263 class segment : public geometric_entity {
264  public:
265  const static std::size_t PointCount = 2;
266 
267  segment() {}
268  ~segment() {}
269 
271  typedef const PointType& const_reference;
273 
274  private:
275  PointType _data[PointCount];
276 
277  public:
278  inline reference operator[](const std::size_t& index) { return _data[index]; }
279  inline const_reference operator[](const std::size_t& index) const {
280  return _data[index];
281  }
282  inline std::size_t size() { return PointCount; }
283 };
284 
285 /************[ Line Type ]************/
286 template <typename T, std::size_t Dimension>
287 class line : public geometric_entity {
288  public:
289  const static std::size_t PointCount = 2;
290 
291  line() {}
292  ~line() {}
293 
295  typedef const PointType& const_reference;
297 
298  private:
299  PointType _data[PointCount];
300 
301  public:
302  inline reference operator[](const std::size_t& index) { return _data[index]; }
303  inline const_reference operator[](const std::size_t& index) const {
304  return _data[index];
305  }
306  inline std::size_t size() { return PointCount; }
307 };
308 
309 /************[ Triangle Type ]************/
310 template <typename T, std::size_t Dimension>
311 class triangle : public geometric_entity {
312  public:
313  const static std::size_t PointCount = 3;
314 
315  triangle() {}
317 
319  typedef const PointType& const_reference;
321 
322  private:
323  PointType _data[PointCount];
324 
325  public:
326  inline reference operator[](const std::size_t& index) { return _data[index]; }
327  inline const_reference operator[](const std::size_t& index) const {
328  return _data[index];
329  }
330  inline std::size_t size() const { return PointCount; }
331 };
332 
333 /************[ Rectangle ]************/
334 template <typename T>
335 class rectangle : public geometric_entity {
336  public:
337  const static std::size_t PointCount = 2;
338 
341 
343  typedef const PointType& const_reference;
345 
346  private:
347  PointType _data[PointCount];
348 
349  public:
350  inline reference operator[](const std::size_t& index) { return _data[index]; }
351  inline const_reference operator[](const std::size_t& index) const {
352  return _data[index];
353  }
354  inline std::size_t size() const { return PointCount; }
355 };
356 
357 /************[ Quadix Type ]************/
358 template <typename T, std::size_t Dimension>
359 class quadix : public geometric_entity {
360  public:
361  const static std::size_t PointCount = 4;
362 
363  quadix() {}
364  ~quadix() {}
365 
367  typedef const PointType& const_reference;
369 
370  private:
371  PointType _data[PointCount];
372 
373  public:
374  inline reference operator[](const std::size_t& index) { return _data[index]; }
375  inline const_reference operator[](const std::size_t& index) const {
376  return _data[index];
377  }
378  inline std::size_t size() const { return PointCount; }
379 };
380 
381 /************[ Polygon Type ]************/
382 template <typename T, std::size_t Dimension>
383 class polygon : public geometric_entity {
384  public:
385  polygon(const std::size_t initial_size = 0) : _data(initial_size) {}
386  ~polygon() {}
387 
389  typedef const PointType& const_reference;
391 
392  private:
393  std::vector<PointType> _data;
394 
395  public:
396  typedef typename std::vector<PointType>::iterator iterator;
397  typedef typename std::vector<PointType>::const_iterator const_iterator;
399 
400  public:
401  inline reference operator[](const std::size_t& index) { return _data[index]; }
402  inline const_reference operator[](const std::size_t& index) const {
403  return _data[index];
404  }
405  inline void push_back(const PointType& value) { _data.push_back(value); }
406  inline void reserve(const std::size_t amount) { _data.reserve(amount); }
407  inline void clear() const { _data.clear(); }
408  inline void clear() { _data.clear(); }
409  inline void erase(const std::size_t index) {
410  _data.erase(_data.begin() + index);
411  }
412  inline std::size_t size() const { return _data.size(); }
413  inline const_iterator begin() const { return _data.begin(); }
414  inline iterator begin() { return _data.begin(); }
415  inline const_iterator end() const { return _data.end(); }
416  inline iterator end() { return _data.end(); }
417  inline reference front() { return _data.front(); }
418  inline const_reference front() const { return _data.front(); }
419  inline reference back() { return _data.back(); }
420  inline const_reference back() const { return _data.back(); }
421  inline void reverse() { std::reverse(_data.begin(), _data.end()); }
422 };
423 
424 /************[ Circle Type ]************/
425 template <typename T>
426 class circle : public geometric_entity {
427  public:
428  T x, y, radius;
429 };
430 
431 /************[ Sphere Type ]************/
432 template <typename T>
433 class sphere : public geometric_entity {
434  public:
435  T x, y, z, radius;
436 };
437 
438 /************[ Hypersphere Type ]************/
439 template <typename T, std::size_t Dimension>
441  public:
443  typedef const PointType& const_reference;
445 
448 };
449 
450 /************[ CircularArc Type ]**************/
451 template <typename T>
453  public:
454  T x1, y1;
455  T x2, y2;
456  T cx, cy;
457  T px, py;
461 };
462 
463 /************[ Bezier Type ]************/
465 
466 /************[ Quadratic Bezier Type ]************/
467 template <typename T, std::size_t Dimension>
469  public:
470  const static std::size_t PointCount = 3;
472 
475 
477  typedef const PointType& const_reference;
479 
480  private:
481  PointType _data[PointCount];
482 
483  public:
484  inline reference operator[](const std::size_t& index) { return _data[index]; }
485  inline const_reference operator[](const std::size_t& index) const {
486  return _data[index];
487  }
488  inline std::size_t size() const { return PointCount; }
489 };
490 
491 /************[ Cubic Bezier Type ]************/
492 template <typename T, std::size_t Dimension>
494  public:
495  const static std::size_t PointCount = 4;
496  const static BezierType Type = eCubicBezier;
497 
500 
502  typedef const PointType& const_reference;
504 
505  private:
506  PointType _data[PointCount];
507 
508  public:
509  inline reference operator[](const std::size_t& index) { return _data[index]; }
510  inline const_reference operator[](const std::size_t& index) const {
511  return _data[index];
512  }
513  inline std::size_t size() const { return PointCount; }
514 };
515 
516 template <typename T, unsigned int Dimension, BezierType BType>
518 
519 template <typename T>
521  public:
523 };
524 
525 template <typename T>
527  public:
529 };
530 
531 template <typename T>
533  public:
535 };
536 
537 template <typename T>
539  public:
541 };
542 
543 /************[ Bezier Coefficients ]************/
544 template <typename T, unsigned int Dimension, BezierType Type>
547  typedef const PointType& const_reference;
549 
551 };
552 
553 /************[ Curve Point Type ]************/
554 template <typename T, std::size_t Dimension>
556  public:
559 
560  const static std::size_t PointCount = 1;
562  typedef const PointType& const_reference;
564 
565  private:
566  PointType _data[PointCount];
567 
568  public:
569  inline reference operator()() { return _data[0]; }
570  inline const_reference operator()() const { return _data[0]; }
571  inline std::size_t size() const { return PointCount; }
572 
573  T t;
574 };
575 
576 /************[ Vector Type ]************/
577 
578 template <typename T, std::size_t D>
579 class vectornd;
580 
581 template <typename T>
582 class vector2d : public point2d<T> {
583  public:
584  vector2d(const T& _x = T(0.0), const T& _y = T(0.0)) {
585  point2d<T>::x = _x;
586  point2d<T>::y = _y;
587  }
588 
589  inline vector2d<T>& operator=(const vectornd<T, 2>& vec) {
590  point2d<T>::x = vec[0];
591  point2d<T>::y = vec[1];
592  return *this;
593  }
594 };
595 
596 template <typename T>
597 class vector3d : public point3d<T> {
598  public:
599  vector3d(const T& _x = T(0.0), const T& _y = T(0.0), const T& _z = T(0.0)) {
600  point3d<T>::x = _x;
601  point3d<T>::y = _y;
602  point3d<T>::z = _z;
603  }
604 
605  inline vector3d<T>& operator=(const vectornd<T, 3>& vec) {
606  point3d<T>::x = vec[0];
607  point3d<T>::y = vec[1];
608  point3d<T>::z = vec[2];
609  return *this;
610  }
611 };
612 
613 template <typename T, std::size_t D>
614 class vectornd : public pointnd<T, D> {
615  public:
617 
618  vectornd(const T& v0) { pointnd<T, D>::v[0] = v0; }
619 
620  vectornd(const T& v0, const T& v1) {
621  pointnd<T, D>::v[0] = v0;
622  pointnd<T, D>::v[1] = v1;
623  }
624 
625  vectornd(const T& v0, const T& v1, const T& v2) {
626  pointnd<T, D>::v[0] = v0;
627  pointnd<T, D>::v[1] = v1;
628  pointnd<T, D>::v[2] = v2;
629  }
630 
631  vectornd(const T& v0, const T& v1, const T& v2, const T& v3) {
632  pointnd<T, D>::v[0] = v0;
633  pointnd<T, D>::v[1] = v1;
634  pointnd<T, D>::v[2] = v2;
635  pointnd<T, D>::v[3] = v3;
636  }
637 
638  vectornd(const vectornd<T, D>& vec) : pointnd<T, D>() {
639  for (std::size_t i = 0; i < D; ++i) (*this)[i] = vec[i];
640  }
641 
642  vectornd(const vector2d<T>& vec) {
643  (*this)[0] = vec.x;
644  (*this)[1] = vec.y;
645  }
646 
647  vectornd(const vector3d<T>& vec) {
648  (*this)[0] = vec.x;
649  (*this)[1] = vec.y;
650  (*this)[2] = vec.z;
651  }
652 };
653 
654 template <typename T, std::size_t Dimension>
656  public:
658 };
659 
660 template <typename T>
661 class define_vector_type<T, 2> {
662  public:
664 };
665 
666 template <typename T>
667 class define_vector_type<T, 3> {
668  public:
670 };
671 
672 /************[ Ray Type ]************/
673 template <typename T, std::size_t Dimension>
674 class ray : public geometric_entity {
675  public:
676  ray() {}
677  ~ray() {}
678 
681 
684 };
685 
686 /************[ Plane Type ]************/
687 template <typename T, std::size_t Dimension>
688 class plane : public geometric_entity {
689  public:
690  plane() {}
691  ~plane() {}
692 
695 
698 };
699 
700 /************[ Box Type ]************/
701 template <typename T, std::size_t Dimension>
702 class box : public geometric_entity {
703  public:
704  const static std::size_t PointCount = 2;
705 
706  box() {}
707  ~box() {}
708 
710  typedef const PointType& const_reference;
712 
713  private:
714  PointType _data[PointCount];
715 
716  public:
717  inline reference operator[](const std::size_t& index) { return _data[index]; }
718  inline const_reference operator[](const std::size_t& index) const {
719  return _data[index];
720  }
721  inline std::size_t size() const { return PointCount; }
722 };
723 
725 
733 };
734 
735 /**********[ Orientation constants ]**********/
736 const int RightHandSide = -1;
737 const int LeftHandSide = +1;
738 const int Clockwise = -1;
739 const int CounterClockwise = +1;
740 const int CollinearOrientation = 0;
741 const int AboveOrientation = +1;
742 const int BelowOrientation = -1;
743 const int CoplanarOrientation = 0;
744 const int PointInside = +1;
745 const int PointOutside = -1;
746 const int Cocircular = 0;
747 const int Cospherical = 0;
748 
749 /********[ Clipping Codes ]********/
750 const int CLIP_BOTTOM = 1;
751 const int CLIP_TOP = 2;
752 const int CLIP_LEFT = 4;
753 const int CLIP_RIGHT = 8;
754 
755 /************[ Trigonometry Tables ]************/
756 template <typename T>
757 class trig_luts {
758  public:
759  const static unsigned int TableSize = 360;
760 
762  for (std::size_t i = 0; i < 360; ++i) {
763  sin_[i] = T(std::sin((1.0 * i) * PIDiv180));
764  cos_[i] = T(std::cos((1.0 * i) * PIDiv180));
765  tan_[i] = T(std::tan((1.0 * i) * PIDiv180));
766  }
767  }
768 
769  inline const T& sin(const unsigned int angle) const { return sin_[angle]; }
770  inline const T& cos(const unsigned int angle) const { return cos_[angle]; }
771  inline const T& tan(const unsigned int angle) const { return tan_[angle]; }
772 
773  private:
774  std::vector<T> sin_;
775  std::vector<T> cos_;
776  std::vector<T> tan_;
777 };
778 
779 /************[ General Definitions ]************/
784 
789 
790 template <typename T>
791 T epsilon();
792 template <>
793 inline double epsilon<double>() {
794  return static_cast<double>(Epsilon_Medium);
795 }
796 template <>
797 inline float epsilon<float>() {
798  return static_cast<float>(Epsilon_Low);
799 }
800 
801 template <typename T>
802 inline int orientation(const T& x1, const T& y1, const T& x2, const T& y2,
803  const T& px, const T& py);
804 
805 template <typename T>
806 inline int orientation(const T& x1, const T& y1, const T& z1, const T& x2,
807  const T& y2, const T& z2, const T& x3, const T& y3,
808  const T& z3, const T& px, const T& py, const T& pz);
809 
810 template <typename T>
811 inline int robust_orientation(const T& x1, const T& y1, const T& x2,
812  const T& y2, const T& px, const T& py);
813 
814 template <typename T>
815 inline int robust_orientation(const T& x1, const T& y1, const T& z1,
816  const T& x2, const T& y2, const T& z2,
817  const T& x3, const T& y3, const T& z3,
818  const T& px, const T& py, const T& pz);
819 
820 template <typename T>
821 inline int orientation(const point2d<T>& point1, const point2d<T>& point2,
822  const T& px, const T& py);
823 
824 template <typename T>
825 inline int orientation(const point2d<T>& point1, const point2d<T>& point2,
826  const point2d<T>& point3);
827 
828 template <typename T>
829 inline int orientation(const line<T, 2>& line, const point2d<T>& point);
830 
831 template <typename T>
832 inline int orientation(const segment<T, 2>& segment, const point2d<T>& point);
833 
834 template <typename T>
835 inline int orientation(const triangle<T, 2>& triangle);
836 
837 template <typename T>
838 inline int orientation(const point3d<T>& point1, const point3d<T>& point2,
839  const point3d<T>& point3, const T& px, const T& py,
840  const T& pz);
841 
842 template <typename T>
843 inline int orientation(const point3d<T>& point1, const point3d<T>& point2,
844  const point3d<T>& point3, const point3d<T>& point4);
845 
846 template <typename T>
847 inline int orientation(const triangle<T, 3>& triangle, const point3d<T>& point);
848 
849 template <typename T>
850 inline bool differing_orientation(const T& x1, const T& y1, const T& x2,
851  const T& y2, const T& p1x, const T& p1y,
852  const T& p2x, const T& p2y);
853 
854 template <typename T>
855 inline bool differing_orientation(const point2d<T>& p1, const point2d<T>& p2,
856  const point2d<T>& q1, const point2d<T>& q2);
857 
858 template <typename T>
859 inline int in_circle(const T& x1, const T& y1, const T& x2, const T& y2,
860  const T& x3, const T& y3, const T& px, const T& py);
861 
862 template <typename T>
863 inline int in_circle(const point2d<T>& point1, const point2d<T>& point2,
864  const point2d<T>& point3, const point2d<T>& point4);
865 
866 template <typename T>
867 inline int in_circle(const triangle<T, 2>& triangle, const point2d<T>& point);
868 
869 template <typename T>
870 inline int in_sphere(const T& x1, const T& y1, const T& z1, const T& x2,
871  const T& y2, const T& z2, const T& x3, const T& y3,
872  const T& z3, const T& x4, const T& y4, const T& z4,
873  const T& px, const T& py, const T& pz);
874 
875 template <typename T>
876 inline int in_sphere(const point3d<T>& point1, const point3d<T>& point2,
877  const point3d<T>& point3, const point3d<T>& point4,
878  const point2d<T>& point5);
879 
880 template <typename T>
881 inline int in_sphere(const quadix<T, 3>& quadix, const point3d<T>& point);
882 
883 template <typename T>
884 inline T signed_area(const T& x1, const T& y1, const T& x2, const T& y2,
885  const T& px, const T& py);
886 
887 template <typename T>
888 inline T signed_area(const point2d<T>& point1, const point2d<T>& point2,
889  const T& px, const T& py);
890 
891 template <typename T>
892 inline T signed_area(const point2d<T>& point1, const point2d<T>& point2,
893  const point2d<T>& point3);
894 
895 template <typename T>
896 inline T signed_area(const segment<T, 2>& segment, const point2d<T>& point);
897 
898 template <typename T>
899 inline T signed_volume(const T& x1, const T& y1, const T& z1, const T& x2,
900  const T& y2, const T& z2, const T& x3, const T& y3,
901  const T& z3, const T& px, const T& py, const T& pz);
902 
903 template <typename T>
904 inline T signed_volume(const point3d<T>& point1, const point3d<T>& point2,
905  const point3d<T>& point3, const T& px, const T& py,
906  const T& pz);
907 
908 template <typename T>
909 inline T signed_volume(const point3d<T>& point1, const point3d<T>& point2,
910  const point3d<T>& point3, const point3d<T>& point4);
911 
912 template <typename T>
913 inline T signed_volume(const triangle<T, 3>& triangle, const point3d<T>& point);
914 
915 template <typename T>
916 inline bool collinear(const T& x1, const T& y1, const T& x2, const T& y2,
917  const T& x3, const T& y3, const T& epsilon = T(Epsilon));
918 
919 template <typename T>
920 inline bool collinear(const T& x1, const T& y1, const T& z1, const T& x2,
921  const T& y2, const T& z2, const T& x3, const T& y3,
922  const T& z3, const T& epsilon = T(Epsilon));
923 
924 template <typename T>
925 inline bool collinear(const point2d<T>& point1, const point2d<T>& point2,
926  const point2d<T>& point3);
927 
928 template <typename T>
929 inline bool collinear(const point3d<T>& point1, const point3d<T>& point2,
930  const point3d<T>& point3);
931 
932 template <typename T>
933 inline bool robust_collinear(const T& x1, const T& y1, const T& x2, const T& y2,
934  const T& x3, const T& y3,
935  const T& epsilon = T(Epsilon));
936 template <typename T>
937 inline bool robust_collinear(const point2d<T>& point1, const point2d<T>& point2,
938  const point2d<T>& point3,
939  const T& epsilon = T(Epsilon));
940 
941 template <typename T>
942 inline bool robust_collinear(const line<T, 2>& line, const point2d<T>& point,
943  const T& epsilon = T(Epsilon));
944 
945 template <typename T>
946 inline bool robust_collinear(const line<T, 3>& line, const point3d<T>& point,
947  const T& epsilon = T(Epsilon));
948 
949 template <typename T>
950 inline bool robust_collinear(const T& x1, const T& y1, const T& z1, const T& x2,
951  const T& y2, const T& z2, const T& x3, const T& y3,
952  const T& z3, const T& epsilon = T(Epsilon));
953 template <typename T>
954 inline bool robust_collinear(const point3d<T>& point1, const point3d<T>& point2,
955  const point3d<T>& point3,
956  const T& epsilon = T(Epsilon));
957 
958 template <typename T>
959 inline bool is_point_collinear(const T& x1, const T& y1, const T& x2,
960  const T& y2, const T& px, const T& py,
961  const bool robust = false);
962 template <typename T>
963 inline bool is_point_collinear(const point2d<T>& point1,
964  const point2d<T>& point2,
965  const point2d<T>& point3,
966  const bool robust = false);
967 
968 template <typename T>
969 inline bool is_point_collinear(const point2d<T>& point1,
970  const point2d<T>& point2, const T& px,
971  const T& py, const bool robust = false);
972 template <typename T>
973 inline bool is_point_collinear(const segment<T, 2>& segment,
974  const point2d<T>& point,
975  const bool robust = false);
976 
977 template <typename T>
978 inline bool is_point_collinear(const T& x1, const T& y1, const T& z1,
979  const T& x2, const T& y2, const T& z2,
980  const T& px, const T& py, const T& pz,
981  const bool robust = false);
982 
983 template <typename T>
984 inline bool is_point_collinear(const point3d<T>& point1,
985  const point3d<T>& point2,
986  const point3d<T>& point3,
987  const bool robust = false);
988 
989 template <typename T>
990 inline bool is_point_collinear(const segment<T, 3>& segment,
991  const point3d<T>& point,
992  const bool robust = false);
993 
994 template <typename T>
995 inline bool robust_coplanar(const point3d<T> point1, const point3d<T> point2,
996  const point3d<T> point3, const point3d<T> point4,
997  const T& epsilon = T(Epsilon));
998 
999 template <typename T>
1000 inline bool coplanar(const ray<T, 3>& ray1, const ray<T, 3>& ray2);
1001 template <typename T>
1002 inline bool coplanar(const segment<T, 3>& segment1,
1003  const segment<T, 3>& segment2);
1004 template <typename T>
1005 inline bool coplanar(const line<T, 3>& line1, const line<T, 3>& line2);
1006 template <typename T>
1007 inline bool coplanar(const triangle<T, 3>& triangle1,
1008  const triangle<T, 3>& triangle2);
1009 template <typename T>
1010 inline bool coplanar(const quadix<T, 3>& quadix1, const quadix<T, 3>& quadix2);
1011 
1012 template <typename T>
1013 inline bool cocircular(const T& x1, const T& y1, const T& x2, const T& y2,
1014  const T& x3, const T& y3, const T& x4, const T& y4,
1015  const T& epsilon = T(Epsilon));
1016 
1017 template <typename T>
1018 inline bool cocircular(const point2d<T>& point1, const point2d<T>& point2,
1019  const point2d<T>& point3, const point2d<T>& point4,
1020  const T& epsilon = T(Epsilon));
1021 
1022 template <typename T>
1023 inline bool cocircular(const triangle<T, 2>& triangle, const point2d<T>& point,
1024  const T& epsilon = T(Epsilon));
1025 
1026 template <typename T>
1027 inline bool cocircular(const circle<T>& circle, const point2d<T>& point,
1028  const T& epsilon = T(Epsilon));
1029 
1030 template <typename T>
1031 inline bool is_skinny_triangle(const T& x1, const T& y1, const T& x2,
1032  const T& y2, const T& x3, const T& y3);
1033 
1034 template <typename T>
1035 inline bool is_skinny_triangle(const point2d<T>& point1,
1036  const point2d<T>& point2,
1037  const point2d<T>& point3);
1038 
1039 template <typename T>
1040 inline bool is_skinny_triangle(const triangle<T, 2>& triangle);
1041 
1042 template <typename T>
1043 inline bool intersect(const T& x1, const T& y1, const T& x2, const T& y2,
1044  const T& x3, const T& y3, const T& x4, const T& y4);
1045 
1046 template <typename T>
1047 inline bool intersect(const T& x1, const T& y1, const T& x2, const T& y2,
1048  const T& x3, const T& y3, const T& x4, const T& y4, T& ix,
1049  T& iy);
1050 template <typename T>
1051 inline bool intersect(const point2d<T>& point1, const point2d<T>& point2,
1052  const point2d<T>& point3, const point2d<T>& point4);
1053 
1054 template <typename T>
1055 inline bool intersect(const point2d<T>& point1, const point2d<T>& point2,
1056  const point2d<T>& point3, const point2d<T>& point4,
1057  point2d<T>& int_point);
1058 
1059 template <typename T>
1060 inline bool intersect(const segment<T, 2>& segment1,
1061  const segment<T, 2>& segment2);
1062 
1063 template <typename T>
1064 inline bool intersect(const segment<T, 2>& segment1,
1065  const segment<T, 2>& segment2, T& ix, T& iy);
1066 
1067 template <typename T>
1068 inline bool intersect(const segment<T, 2>& segment1,
1069  const segment<T, 2>& segment2, point2d<T>& i_point);
1070 
1071 template <typename T>
1072 inline bool intersect(const T& x1, const T& y1, const T& z1, const T& x2,
1073  const T& y2, const T& z2, const T& x3, const T& y3,
1074  const T& z3, const T& x4, const T& y4, const T& z4,
1075  const T& fuzzy = T(0.0));
1076 
1077 template <typename T>
1078 inline bool intersect(const point3d<T>& point1, const point3d<T>& point2,
1079  const point3d<T>& point3, const point3d<T>& point4,
1080  const T& fuzzy = T(0.0));
1081 
1082 template <typename T>
1083 inline bool intersect(const segment<T, 3>& segment1,
1084  const segment<T, 3>& segment2, const T& fuzzy = T(0.0));
1085 template <typename T>
1086 inline bool intersect(const segment<T, 2>& segment,
1087  const rectangle<T>& rectangle);
1088 template <typename T>
1089 inline bool intersect(const segment<T, 2>& segment,
1090  const triangle<T, 2>& triangle);
1091 template <typename T>
1092 inline bool intersect(const segment<T, 2>& segment, const quadix<T, 2>& quadix);
1093 template <typename T>
1094 inline bool intersect(const segment<T, 2>& segment, const line<T, 2>& line);
1095 template <typename T>
1096 inline bool intersect(const segment<T, 2>& segment, const circle<T>& circle);
1097 template <typename T>
1098 inline bool intersect(const segment<T, 2>& segment,
1099  const quadratic_bezier<T, 2>& bezier,
1100  const std::size_t& steps = 1000);
1101 template <typename T>
1102 inline bool intersect(const segment<T, 2>& segment,
1103  const cubic_bezier<T, 2>& bezier,
1104  const std::size_t& steps = 1000);
1105 template <typename T>
1106 inline bool intersect(const segment<T, 3>& segment, const line<T, 3>& line,
1107  const T& fuzzy = T(0.0));
1108 template <typename T>
1109 inline bool intersect(const segment<T, 3>& segment, const box<T, 3>& box);
1110 template <typename T>
1111 inline bool intersect(const segment<T, 3>& segment, const sphere<T>& sphere);
1112 template <typename T>
1113 inline bool intersect(const segment<T, 3>& segment, const plane<T, 3>& plane);
1114 template <typename T>
1115 inline bool intersect(const segment<T, 3>& segment,
1116  const quadratic_bezier<T, 3>& bezier,
1117  const std::size_t& steps = 1000);
1118 template <typename T>
1119 inline bool intersect(const segment<T, 3>& segment,
1120  const cubic_bezier<T, 3>& bezier,
1121  const std::size_t& steps = 1000);
1122 template <typename T>
1123 inline bool intersect(const line<T, 2>& line, const triangle<T, 2>& triangle);
1124 template <typename T>
1125 inline bool intersect(const line<T, 2>& line, const quadix<T, 2>& quadix);
1126 template <typename T>
1127 inline bool intersect(const line<T, 2>& line1, const line<T, 2>& line2);
1128 template <typename T>
1129 inline bool intersect(const line<T, 2>& line, const circle<T>& circle);
1130 template <typename T>
1131 inline bool intersect(const line<T, 2>& line,
1132  const quadratic_bezier<T, 2>& bezier,
1133  const std::size_t& steps = 1000);
1134 template <typename T>
1135 inline bool intersect(const line<T, 2>& line, const cubic_bezier<T, 2>& bezier,
1136  const std::size_t& steps = 1000);
1137 template <typename T>
1138 inline bool intersect(const line<T, 3>& line, const triangle<T, 3>& triangle);
1139 template <typename T>
1140 inline bool intersect(const line<T, 3>& line, const plane<T, 3>& plane);
1141 template <typename T>
1142 inline bool intersect(const line<T, 3>& line, const sphere<T>& sphere);
1143 template <typename T>
1144 inline bool intersect(const line<T, 3>& line,
1145  const quadratic_bezier<T, 3>& bezier,
1146  const std::size_t& steps = 1000);
1147 template <typename T>
1148 inline bool intersect(const line<T, 3>& line, const cubic_bezier<T, 3>& bezier,
1149  const std::size_t& steps = 1000);
1150 template <typename T>
1151 inline bool intersect(const triangle<T, 2>& triangle, const circle<T>& circle);
1152 template <typename T>
1153 inline bool intersect(const triangle<T, 2>& triangle,
1154  const rectangle<T>& rectangle);
1155 template <typename T>
1156 inline bool intersect(const triangle<T, 2>& triangle,
1157  const quadratic_bezier<T, 2>& bezier,
1158  const std::size_t& steps = 1000);
1159 template <typename T>
1160 inline bool intersect(const triangle<T, 2>& triangle,
1161  const cubic_bezier<T, 2>& bezier,
1162  const std::size_t& steps = 1000);
1163 template <typename T>
1164 inline bool intersect(const rectangle<T>& rectangle1,
1165  const rectangle<T>& rectangle2);
1166 template <typename T>
1167 inline bool intersect(const triangle<T, 2>& triangle1,
1168  const triangle<T, 2>& triangle2);
1169 template <typename T>
1170 inline bool intersect(const rectangle<T>& rectangle, const circle<T>& circle);
1171 template <typename T>
1172 inline bool intersect(const rectangle<T>& rectangle,
1173  const quadratic_bezier<T, 2>& bezier,
1174  const std::size_t& steps = 1000);
1175 template <typename T>
1176 inline bool intersect(const rectangle<T>& rectangle,
1177  const cubic_bezier<T, 2>& bezier,
1178  const std::size_t& steps = 1000);
1179 template <typename T>
1180 inline bool intersect(const quadix<T, 2>& quadix,
1181  const quadratic_bezier<T, 2>& bezier,
1182  const std::size_t& steps = 1000);
1183 template <typename T>
1184 inline bool intersect(const quadix<T, 2>& quadix,
1185  const cubic_bezier<T, 2>& bezier,
1186  const std::size_t& steps = 1000);
1187 template <typename T>
1188 inline bool intersect(const circle<T>& circle1, const circle<T>& circle2);
1189 template <typename T>
1190 inline bool intersect(const circle<T>& circle,
1191  const quadratic_bezier<T, 2>& bezier,
1192  const std::size_t& steps = 1000);
1193 template <typename T>
1194 inline bool intersect(const circle<T>& circle, const cubic_bezier<T, 2>& bezier,
1195  const std::size_t& steps = 1000);
1196 template <typename T>
1197 inline bool intersect(const box<T, 3>& box, const sphere<T>& sphere);
1198 template <typename T>
1199 inline bool intersect(const sphere<T>& sphere1, const sphere<T>& sphere2);
1200 template <typename T>
1201 inline bool intersect(const sphere<T>& sphere,
1202  const quadratic_bezier<T, 3>& bezier,
1203  const std::size_t& steps = 1000);
1204 template <typename T>
1205 inline bool intersect(const sphere<T>& sphere, const cubic_bezier<T, 3>& bezier,
1206  const std::size_t& steps = 1000);
1207 template <typename T>
1208 inline bool intersect(const ray<T, 2>& ray1, const ray<T, 2>& ray2);
1209 template <typename T>
1210 inline bool intersect(const ray<T, 3>& ray1, const ray<T, 3>& ray2);
1211 template <typename T>
1212 inline bool intersect(const ray<T, 2>& ray, const segment<T, 2>& segment);
1213 template <typename T>
1214 inline bool intersect(const ray<T, 3>& ray, const segment<T, 3>& segment);
1215 template <typename T>
1216 inline bool intersect(const ray<T, 2>& ray, const rectangle<T>& rectangle);
1217 template <typename T>
1218 inline bool intersect(const ray<T, 3>& ray, const box<T, 3>& box);
1219 template <typename T>
1220 inline bool intersect(const ray<T, 2>& ray, const triangle<T, 2>& triangle);
1221 template <typename T>
1222 inline bool intersect(const ray<T, 3>& ray, const triangle<T, 3>& triangle);
1223 template <typename T>
1224 inline bool intersect(const ray<T, 2>& ray, const quadix<T, 2>& quadix);
1225 template <typename T>
1226 inline bool intersect(const ray<T, 2>& ray, const circle<T>& circle);
1227 template <typename T>
1228 inline bool intersect(const ray<T, 3>& ray, const sphere<T>& sphere);
1229 template <typename T>
1230 inline bool intersect(const ray<T, 3>& ray, const plane<T, 3>& plane);
1231 template <typename T>
1232 inline bool intersect(const ray<T, 2>& ray, const polygon<T, 2>& polygon);
1233 template <typename T>
1234 inline bool intersect(const plane<T, 3>& plane1, const plane<T, 3>& plane2);
1235 template <typename T>
1236 inline bool intersect(const plane<T, 3>& plane, const sphere<T>& sphere);
1237 template <typename T>
1238 inline bool intersect(const plane<T, 3>& plane, const line<T, 3>& line);
1239 
1240 template <typename T>
1241 inline bool simple_intersect(const T& x1, const T& y1, const T& x2, const T& y2,
1242  const T& x3, const T& y3, const T& x4,
1243  const T& y4);
1244 
1245 template <typename T>
1246 inline bool simple_intersect(const point2d<T>& point1, const point2d<T>& point2,
1247  const point2d<T>& point3,
1248  const point2d<T>& point4);
1249 
1250 template <typename T>
1251 inline bool simple_intersect(const segment<T, 2>& segment1,
1252  const segment<T, 2>& segment2);
1253 
1254 template <typename T>
1255 inline bool intersect_vertical_horizontal(const segment<T, 2>& segment1,
1256  const segment<T, 2>& segment2);
1257 template <typename T>
1258 inline bool intersect_vertical_vertical(const segment<T, 2>& segment1,
1259  const segment<T, 2>& segment2);
1260 template <typename T>
1261 inline bool intersect_horizontal_horizontal(const segment<T, 2>& segment1,
1262  const segment<T, 2>& segment2);
1263 
1264 template <typename T>
1265 inline void intersection_point(const T& x1, const T& y1, const T& x2,
1266  const T& y2, const T& x3, const T& y3,
1267  const T& x4, const T& y4, T& ix, T& iy);
1268 
1269 template <typename T>
1270 inline void intersection_point(const point2d<T>& point1,
1271  const point2d<T>& point2,
1272  const point2d<T>& point3,
1273  const point2d<T>& point4, T& ix, T& iy);
1274 
1275 template <typename T>
1276 inline point2d<T> intersection_point(const point2d<T>& point1,
1277  const point2d<T>& point2,
1278  const point2d<T>& point3,
1279  const point2d<T>& point4);
1280 template <typename T>
1281 inline point2d<T> intersection_point(const segment<T, 2>& segment1,
1282  const segment<T, 2>& segment2);
1283 
1284 template <typename T>
1285 inline void intersection_point(const T& x1, const T& y1, const T& z1,
1286  const T& x2, const T& y2, const T& z2,
1287  const T& x3, const T& y3, const T& z3,
1288  const T& x4, const T& y4, const T& z4, T& ix,
1289  T& iy, T& iz, const T& fuzzy = T(0.0));
1290 
1291 template <typename T>
1292 inline void intersection_point(const point3d<T>& point1,
1293  const point3d<T>& point2,
1294  const point3d<T>& point3,
1295  const point3d<T>& point4, T& ix, T& iy, T& iz,
1296  const T& fuzzy = T(0.0));
1297 
1298 template <typename T>
1299 inline point3d<T> intersection_point(const point3d<T>& point1,
1300  const point3d<T>& point2,
1301  const point3d<T>& point3,
1302  const point3d<T>& point4,
1303  const T& fuzzy = T(0.0));
1304 
1305 template <typename T>
1306 inline point3d<T> intersection_point(const segment<T, 3>& segment1,
1307  const segment<T, 3>& segment2,
1308  const T& fuzzy = T(0.0));
1309 
1310 template <typename T>
1311 inline point2d<T> intersection_point(const segment<T, 2>& segment,
1312  const line<T, 2>& line);
1313 
1314 template <typename T>
1315 inline point3d<T> intersection_point(const segment<T, 3>& segment,
1316  const line<T, 3>& line,
1317  const T& fuzzy = T(0.0));
1318 
1319 template <typename T>
1320 inline point3d<T> intersection_point(const segment<T, 3>& segment,
1321  const plane<T, 3>& plane);
1322 
1323 template <typename T, typename OutputIterator>
1324 inline void intersection_point(const segment<T, 2>& segment,
1325  const quadratic_bezier<T, 2>& bezier,
1326  OutputIterator out,
1327  const std::size_t& steps = 1000);
1328 
1329 template <typename T, typename OutputIterator>
1330 inline void intersection_point(const segment<T, 2>& segment,
1331  const cubic_bezier<T, 2>& bezier,
1332  OutputIterator out,
1333  const std::size_t& steps = 1000);
1334 
1335 template <typename T, typename OutputIterator>
1336 inline void intersection_point(const segment<T, 3>& segment,
1337  const quadratic_bezier<T, 3>& bezier,
1338  OutputIterator out,
1339  const std::size_t& steps = 1000);
1340 
1341 template <typename T, typename OutputIterator>
1342 inline void intersection_point(const segment<T, 3>& segment,
1343  const cubic_bezier<T, 3>& bezier,
1344  OutputIterator out,
1345  const std::size_t& steps = 1000);
1346 
1347 template <typename T>
1348 inline point2d<T> intersection_point(const line<T, 2>& line1,
1349  const line<T, 2>& line2);
1350 
1351 template <typename T>
1352 inline point3d<T> intersection_point(const line<T, 3>& line1,
1353  const line<T, 3>& line2,
1354  const T& fuzzy = T(0.0));
1355 
1356 template <typename T>
1357 inline void intersection_point(const circle<T>& circle1,
1358  const circle<T>& circle2, point2d<T>& point1,
1359  point2d<T>& point2);
1360 
1361 template <typename T, typename OutputIterator>
1362 inline void intersection_point(const segment<T, 2>& segment,
1363  const triangle<T, 2>& triangle,
1364  OutputIterator out);
1365 
1366 template <typename T>
1367 inline void intersection_point(const line<T, 3>& line,
1368  const triangle<T, 3>& triangle,
1369  point3d<T>& ipoint);
1370 
1371 template <typename T>
1372 inline point3d<T> intersection_point(const line<T, 3>& line,
1373  const plane<T, 3>& plane);
1374 
1375 template <typename T, typename OutputIterator>
1376 inline void intersection_point(const T& x1, const T& y1, const T& x2,
1377  const T& y2, const T& cx, const T& cy,
1378  const T& radius, OutputIterator out);
1379 
1380 template <typename T, typename OutputIterator>
1381 inline void intersection_point(const segment<T, 2>& segment,
1382  const circle<T>& circle, OutputIterator out);
1383 
1384 template <typename T, typename OutputIterator>
1385 inline void intersection_point(const line<T, 2>& line, const circle<T>& circle,
1386  OutputIterator out);
1387 
1388 template <typename T, typename OutputIterator>
1389 inline void intersection_point(const segment<T, 3>& segment,
1390  const sphere<T>& sphere, OutputIterator out);
1391 
1392 template <typename T, typename OutputIterator>
1393 inline void intersection_point(const line<T, 3>& line, const sphere<T>& sphere,
1394  OutputIterator out);
1395 
1396 template <typename T>
1397 inline point2d<T> intersection_point(const ray<T, 2>& ray1,
1398  const ray<T, 2>& ray2);
1399 
1400 template <typename T>
1401 inline point3d<T> intersection_point(const ray<T, 3>& ray,
1402  const triangle<T, 3>& triangle);
1403 
1404 template <typename T>
1405 inline point3d<T> intersection_point(const ray<T, 3>& ray,
1406  const plane<T, 3>& plane);
1407 
1408 template <typename T, typename OutputIterator>
1409 inline void intersection_point(const ray<T, 2>& ray, const circle<T>& circle,
1410  OutputIterator out);
1411 
1412 template <typename T, typename OutputIterator>
1413 inline void intersection_point(const ray<T, 3>& ray, const sphere<T>& sphere,
1414  OutputIterator out);
1415 
1416 template <typename T>
1418  const T& x1, const T& y1, const T& z1, const T& x2, const T& y2,
1419  const T& z2, const T& x3, const T& y3, const T& z3, const T& x4,
1420  const T& y4, const T& z4, T& Ix, T& Iy, T& Iz, const T& fuzzy = T(0.0));
1421 
1422 template <typename T>
1423 inline T normalize_angle(const T& angle);
1424 
1425 template <typename T>
1426 inline T vertical_mirror(const T& angle);
1427 
1428 template <typename T>
1429 inline T horizontal_mirror(const T& angle);
1430 
1431 template <typename T>
1432 inline unsigned int quadrant(const T& angle);
1433 
1434 template <typename T>
1435 inline unsigned int quadrant(const T& x, const T& y);
1436 
1437 template <typename T>
1438 inline unsigned int quadrant(const point2d<T>& point);
1439 
1440 template <typename T>
1441 inline T vertex_angle(const T& x1, const T& y1, const T& x2, const T& y2,
1442  const T& x3, const T& y3);
1443 
1444 template <typename T>
1445 inline T vertex_angle(const point2d<T>& point1, const point2d<T>& point2,
1446  const point2d<T>& point3);
1447 
1448 template <typename T>
1449 inline T vertex_angle(const T& x1, const T& y1, const T& z1, const T& x2,
1450  const T& y2, const T& z2, const T& x3, const T& y3,
1451  const T& z3);
1452 
1453 template <typename T>
1454 inline T vertex_angle(const point3d<T>& point1, const point3d<T>& point2,
1455  const point3d<T>& point3);
1456 
1457 template <typename T>
1458 inline T oriented_vertex_angle(const T& x1, const T& y1, const T& x2,
1459  const T& y2, const T& x3, const T& y3,
1460  const int orient = Clockwise);
1461 template <typename T>
1462 inline T oriented_vertex_angle(const point2d<T>& point1,
1463  const point2d<T>& point2,
1464  const point2d<T>& point3,
1465  const int orient = Clockwise);
1466 template <typename T>
1467 inline T cartesian_angle(const T& x, const T& y);
1468 
1469 template <typename T>
1470 inline T cartesian_angle(const point2d<T>& point);
1471 
1472 template <typename T>
1473 inline T robust_cartesian_angle(const T& x, const T& y);
1474 
1475 template <typename T>
1476 inline T robust_cartesian_angle(const point2d<T>& point);
1477 
1478 template <typename T>
1479 inline T cartesian_angle(const T& x, const T& y, const T& ox, const T& oy);
1480 
1481 template <typename T>
1482 inline T cartesian_angle(const point2d<T>& point, const point2d<T>& origin);
1483 
1484 template <typename T>
1485 inline T robust_cartesian_angle(const T& x, const T& y, const T& ox,
1486  const T& oy);
1487 
1488 template <typename T>
1489 inline T robust_cartesian_angle(const point2d<T>& point,
1490  const point2d<T>& origin);
1491 
1492 template <typename T>
1493 inline bool parallel(const T& x1, const T& y1, const T& x2, const T& y2,
1494  const T& x3, const T& y3, const T& x4, const T& y4,
1495  const T& epsilon = T(Epsilon));
1496 
1497 template <typename T>
1498 inline bool parallel(const point2d<T>& point1, const point2d<T>& point2,
1499  const point2d<T>& point3, const point2d<T>& point4,
1500  const T& epsilon = T(Epsilon));
1501 
1502 template <typename T>
1503 inline bool parallel(const segment<T, 2>& segment1,
1504  const segment<T, 2>& segment2,
1505  const T& epsilon = T(Epsilon));
1506 
1507 template <typename T>
1508 inline bool parallel(const line<T, 2>& line1, const line<T, 2>& line2,
1509  const T& epsilon = T(Epsilon));
1510 
1511 template <typename T>
1512 inline bool parallel(const T& x1, const T& y1, const T& z1, const T& x2,
1513  const T& y2, const T& z2, const T& x3, const T& y3,
1514  const T& z3, const T& x4, const T& y4, const T& z4,
1515  const T& epsilon = T(Epsilon));
1516 
1517 template <typename T>
1518 inline bool parallel(const point3d<T>& point1, const point3d<T>& point2,
1519  const point3d<T>& point3, const point3d<T>& point4,
1520  const T& epsilon = T(Epsilon));
1521 
1522 template <typename T>
1523 inline bool parallel(const segment<T, 3>& segment1,
1524  const segment<T, 3>& segment2,
1525  const T& epsilon = T(Epsilon));
1526 
1527 template <typename T>
1528 inline bool parallel(const line<T, 3>& line1, const line<T, 3>& line2,
1529  const T& epsilon = T(Epsilon));
1530 
1531 template <typename T>
1532 inline bool robust_parallel(const T& x1, const T& y1, const T& x2, const T& y2,
1533  const T& x3, const T& y3, const T& x4, const T& y4,
1534  const T& epsilon = T(Epsilon));
1535 
1536 template <typename T>
1537 inline bool robust_parallel(const point2d<T>& point1, const point2d<T>& point2,
1538  const point2d<T>& point3, const point2d<T>& point4,
1539  const T& epsilon = T(Epsilon));
1540 
1541 template <typename T>
1542 inline bool robust_parallel(const segment<T, 2>& segment1,
1543  const segment<T, 2>& segment2,
1544  const T& epsilon = T(Epsilon));
1545 
1546 template <typename T>
1547 inline bool robust_parallel(const line<T, 2>& line1, const line<T, 2>& line2,
1548  const T& epsilon = T(Epsilon));
1549 
1550 template <typename T>
1551 inline bool robust_parallel(const line<T, 2>& line,
1552  const segment<T, 2>& segment,
1553  const T& epsilon = T(Epsilon));
1554 
1555 template <typename T>
1556 inline bool robust_parallel(const T& x1, const T& y1, const T& z1, const T& x2,
1557  const T& y2, const T& z2, const T& x3, const T& y3,
1558  const T& z3, const T& x4, const T& y4, const T& z4,
1559  const T& epsilon = T(Epsilon));
1560 
1561 template <typename T>
1562 inline bool robust_parallel(const point3d<T>& point1, const point3d<T>& point2,
1563  const point3d<T>& point3, const point3d<T>& point4,
1564  const T& epsilon = T(Epsilon));
1565 
1566 template <typename T>
1567 inline bool robust_parallel(const segment<T, 3>& segment1,
1568  const segment<T, 3>& segment2,
1569  const T& epsilon = T(Epsilon));
1570 
1571 template <typename T>
1572 inline bool robust_parallel(const line<T, 3>& line1, const line<T, 3>& line2,
1573  const T& epsilon = T(Epsilon));
1574 
1575 template <typename T>
1576 inline bool robust_parallel(const line<T, 3>& line,
1577  const segment<T, 3>& segment,
1578  const T& epsilon = T(Epsilon));
1579 
1580 template <typename T>
1581 inline bool perpendicular(const T& x1, const T& y1, const T& x2, const T& y2,
1582  const T& x3, const T& y3, const T& x4, const T& y4,
1583  const T& epsilon = T(Epsilon));
1584 
1585 template <typename T>
1586 inline bool perpendicular(const point2d<T>& point1, const point2d<T>& point2,
1587  const point2d<T>& point3, const point2d<T>& point4,
1588  const T& epsilon = T(Epsilon));
1589 
1590 template <typename T>
1591 inline bool perpendicular(const segment<T, 2>& segment1,
1592  const segment<T, 2>& segment2,
1593  const T& epsilon = T(Epsilon));
1594 
1595 template <typename T>
1596 inline bool perpendicular(const line<T, 2>& line1, const line<T, 2>& line2,
1597  const T& epsilon = T(Epsilon));
1598 
1599 template <typename T>
1600 inline bool perpendicular(const line<T, 2>& line, const segment<T, 2>& segment,
1601  const T& epsilon = T(Epsilon));
1602 
1603 template <typename T>
1604 inline bool perpendicular(const T& x1, const T& y1, const T& z1, const T& x2,
1605  const T& y2, const T& z2, const T& x3, const T& y3,
1606  const T& z3, const T& x4, const T& y4, const T& z4,
1607  const T& epsilon = T(Epsilon));
1608 
1609 template <typename T>
1610 inline bool perpendicular(const point3d<T>& point1, const point3d<T>& point2,
1611  const point3d<T>& point3, const point3d<T>& point4,
1612  const T& epsilon = T(Epsilon));
1613 
1614 template <typename T>
1615 inline bool perpendicular(const segment<T, 3>& segment1,
1616  const segment<T, 3>& segment2,
1617  const T& epsilon = T(Epsilon));
1618 
1619 template <typename T>
1620 inline bool perpendicular(const line<T, 3>& line1, const line<T, 3>& line2,
1621  const T& epsilon = T(Epsilon));
1622 
1623 template <typename T>
1624 inline bool robust_perpendicular(const T& x1, const T& y1, const T& x2,
1625  const T& y2, const T& x3, const T& y3,
1626  const T& x4, const T& y4,
1627  const T& epsilon = T(Epsilon));
1628 
1629 template <typename T>
1630 inline bool robust_perpendicular(const point2d<T>& point1,
1631  const point2d<T>& point2,
1632  const point2d<T>& point3,
1633  const point2d<T>& point4,
1634  const T& epsilon = T(Epsilon));
1635 
1636 template <typename T>
1637 inline bool robust_perpendicular(const segment<T, 2>& segment1,
1638  const segment<T, 2>& segment2,
1639  const T& epsilon = T(Epsilon));
1640 
1641 template <typename T>
1642 inline bool robust_perpendicular(const line<T, 2>& line1,
1643  const line<T, 2>& line2,
1644  const T& epsilon = T(Epsilon));
1645 
1646 template <typename T>
1647 inline bool robust_perpendicular(const T& x1, const T& y1, const T& z1,
1648  const T& x2, const T& y2, const T& z2,
1649  const T& x3, const T& y3, const T& z3,
1650  const T& x4, const T& y4, const T& z4,
1651  const T& epsilon = T(Epsilon));
1652 
1653 template <typename T>
1654 inline bool robust_perpendicular(const point3d<T>& point1,
1655  const point3d<T>& point2,
1656  const point3d<T>& point3,
1657  const point3d<T>& point4,
1658  const T& epsilon = T(Epsilon));
1659 
1660 template <typename T>
1661 inline bool robust_perpendicular(const segment<T, 3>& segment1,
1662  const segment<T, 3>& segment2,
1663  const T& epsilon = T(Epsilon));
1664 
1665 template <typename T>
1666 inline bool robust_perpendicular(const line<T, 3>& line1,
1667  const line<T, 3>& line2,
1668  const T& epsilon = T(Epsilon));
1669 
1670 template <typename T>
1671 inline bool robust_perpendicular(const line<T, 2>& line,
1672  const segment<T, 2>& segment,
1673  const T& epsilon = T(Epsilon));
1674 
1675 template <typename T>
1676 inline bool line_to_line_intersect(const T& x1, const T& y1, const T& x2,
1677  const T& y2, const T& x3, const T& y3,
1678  const T& x4, const T& y4);
1679 template <typename T>
1680 inline bool line_to_line_intersect(const line<T, 2>& line1,
1681  const line<T, 2>& line2);
1682 
1683 template <typename T>
1684 inline bool rectangle_to_rectangle_intersect(const T& x1, const T& y1,
1685  const T& x2, const T& y2,
1686  const T& x3, const T& y3,
1687  const T& x4, const T& y4);
1688 
1689 template <typename T>
1690 inline bool rectangle_to_rectangle_intersect(const rectangle<T>& rectangle1,
1691  const rectangle<T>& rectangle2);
1692 
1693 template <typename T>
1694 inline bool box_to_box_intersect(const T& x1, const T& y1, const T& z1,
1695  const T& x2, const T& y2, const T& z2,
1696  const T& x3, const T& y3, const T& z3,
1697  const T& x4, const T& y4, const T& z4);
1698 
1699 template <typename T>
1700 inline bool box_to_box_intersect(const box<T, 3>& box1, const box<T, 3>& box2);
1701 
1702 template <typename T, unsigned int Dimension, typename Simplex, typename Bezier>
1703 inline bool simplex_to_bezier_intersect(const Simplex& simplex,
1704  const Bezier& bezier,
1705  const std::size_t& steps);
1706 
1707 template <typename T, unsigned int Dimension, typename Bezier,
1708  typename Iterator>
1709 inline bool simplex_to_bezier_intersect(const Iterator& begin,
1710  const Iterator& end,
1711  const Bezier& bezier,
1712  const std::size_t& steps);
1713 
1714 template <typename T>
1715 inline bool rectangle_within_rectangle(const T& x1, const T& y1, const T& x2,
1716  const T& y2, const T& x3, const T& y3,
1717  const T& x4, const T& y4);
1718 
1719 template <typename T>
1720 inline bool rectangle_within_rectangle(const rectangle<T>& rectangle1,
1721  const rectangle<T>& rectangle2);
1722 
1723 template <typename T>
1724 inline bool box_within_box(const T& x1, const T& y1, const T& z1, const T& x2,
1725  const T& y2, const T& z2, const T& x3, const T& y3,
1726  const T& z3, const T& x4, const T& y4, const T& z4);
1727 
1728 template <typename T>
1729 inline bool box_within_box(const box<T, 3>& box1, const box<T, 3>& box2);
1730 
1731 template <typename T>
1732 inline bool circle_within_rectangle(const T& x, const T& y, const T& radius,
1733  const T& x1, const T& y1, const T& x2,
1734  const T& y2);
1735 
1736 template <typename T>
1737 inline bool circle_within_rectangle(const circle<T>& circle,
1738  const rectangle<T>& rectangle);
1739 
1740 template <typename T>
1741 inline bool triangle_within_rectangle(const T& x1, const T& y1, const T& x2,
1742  const T& y2, const T& x3, const T& y3,
1743  const T& x4, const T& y4, const T& x5,
1744  const T& y5);
1745 template <typename T>
1746 inline bool triangle_within_rectangle(const triangle<T, 2>& triangle,
1747  const rectangle<T>& rectangle);
1748 
1749 template <typename T>
1750 inline bool segment_within_rectangle(const T& x1, const T& y1, const T& x2,
1751  const T& y2, const T& x3, const T& y3,
1752  const T& x4, const T& y4);
1753 
1754 template <typename T>
1755 inline bool segment_within_rectangle(const segment<T, 2>& segment,
1756  const rectangle<T>& rectangle);
1757 
1758 template <typename T>
1759 inline bool quadix_within_rectangle(const T& x1, const T& y1, const T& x2,
1760  const T& y2, const T& x3, const T& y3,
1761  const T& x4, const T& y4, const T& x5,
1762  const T& y5, const T& x6, const T& y6);
1763 
1764 template <typename T>
1765 inline bool quadix_within_rectangle(const quadix<T, 2>& quadix,
1766  const rectangle<T>& rectangle);
1767 
1768 template <typename T>
1769 inline bool polygon_within_rectangle(const polygon<T, 2>& polygon,
1770  const rectangle<T>& rectangle);
1771 
1772 template <typename T>
1773 inline bool sphere_within_box(const T& x, const T& y, const T& z,
1774  const T& radius, const T& x1, const T& y1,
1775  const T& z1, const T& x2, const T& y2,
1776  const T& z2);
1777 
1778 template <typename T>
1779 inline bool sphere_within_box(const sphere<T>& sphere, const box<T, 3>& box);
1780 
1781 template <typename T>
1782 inline bool triangle_within_box(const T& x1, const T& y1, const T& z1,
1783  const T& x2, const T& y2, const T& z2,
1784  const T& x3, const T& y3, const T& z3,
1785  const T& x4, const T& y4, const T& z4,
1786  const T& x5, const T& y5, const T& z5);
1787 template <typename T>
1788 inline bool triangle_within_box(const triangle<T, 3>& triangle,
1789  const box<T, 3>& box);
1790 
1791 template <typename T>
1792 inline bool segment_within_box(const T& x1, const T& y1, const T& z1,
1793  const T& x2, const T& y2, const T& z2,
1794  const T& x3, const T& y3, const T& z3,
1795  const T& x4, const T& y4, const T& z4);
1796 
1797 template <typename T>
1798 inline bool segment_within_box(const segment<T, 3>& segment,
1799  const box<T, 3>& box);
1800 
1801 template <typename T>
1802 inline bool quadix_within_box(const T& x1, const T& y1, const T& z1,
1803  const T& x2, const T& y2, const T& z2,
1804  const T& x3, const T& y3, const T& z3,
1805  const T& x4, const T& y4, const T& z4,
1806  const T& x5, const T& y5, const T& z5,
1807  const T& x6, const T& y6, const T& z6);
1808 
1809 template <typename T>
1810 inline bool quadix_within_box(const quadix<T, 3>& quadix, const box<T, 3>& box);
1811 
1812 template <typename T>
1813 inline bool polygon_within_box(const polygon<T, 3>& polygon,
1814  const box<T, 3>& box);
1815 
1816 template <typename T>
1817 inline bool circle_in_circle(const circle<T>& circle1,
1818  const circle<T>& circle2);
1819 
1820 template <typename T>
1821 inline bool is_tangent(const segment<T, 2>& segment, const circle<T>& circle);
1822 
1823 template <typename T>
1824 inline bool point_of_reflection(const T& sx1, const T& sy1, const T& sx2,
1825  const T& sy2, const T& p1x, const T& p1y,
1826  const T& p2x, const T& p2y, T& rpx, T& rpy);
1827 template <typename T>
1828 inline bool point_of_reflection(const segment<T, 2>& segment,
1829  const point2d<T>& point1,
1830  const point2d<T>& point2,
1831  point2d<T>& reflection_point);
1832 
1833 template <typename T>
1834 inline segment<T, 2> edge(const triangle<T, 2>& triangle,
1835  const std::size_t& edge_index);
1836 template <typename T>
1837 inline segment<T, 3> edge(const triangle<T, 3>& triangle,
1838  const std::size_t& edge_index);
1839 template <typename T>
1840 inline segment<T, 2> edge(const quadix<T, 2>& quadix,
1841  const std::size_t& edge_index);
1842 template <typename T>
1843 inline segment<T, 3> edge(const quadix<T, 3>& quadix,
1844  const std::size_t& edge_index);
1845 template <typename T>
1846 inline segment<T, 2> edge(const rectangle<T>& rectangle,
1847  const std::size_t& edge);
1848 template <typename T>
1849 inline segment<T, 2> edge(const polygon<T, 2>& polygon,
1850  const std::size_t& edge);
1851 template <typename T>
1852 inline segment<T, 3> edge(const polygon<T, 3>& polygon,
1853  const std::size_t& edge);
1854 
1855 template <typename T>
1856 inline segment<T, 2> opposing_edge(const triangle<T, 2>& triangle,
1857  const std::size_t& corner);
1858 template <typename T>
1859 inline segment<T, 3> opposing_edge(const triangle<T, 3>& triangle,
1860  const std::size_t& corner);
1861 
1862 template <typename T>
1863 inline segment<T, 2> reverse_segment(const segment<T, 2>& segment);
1864 template <typename T>
1865 inline segment<T, 3> reverse_segment(const segment<T, 3>& segment);
1866 
1867 template <typename T>
1868 inline point2d<T> rectangle_corner(const rectangle<T>& rectangle,
1869  const std::size_t& corner_index);
1870 template <typename T>
1871 inline point3d<T> box_corner(const box<T, 3>& box,
1872  const std::size_t& corner_index);
1873 
1874 template <typename T>
1875 inline line<T, 2> triangle_bisector(const triangle<T, 2>& triangle,
1876  const std::size_t& bisector);
1877 template <typename T>
1878 inline line<T, 3> triangle_bisector(const triangle<T, 3>& triangle,
1879  const std::size_t& bisector);
1880 
1881 template <typename T>
1882 inline line<T, 2> triangle_external_bisector(
1883  const triangle<T, 2>& triangle, const std::size_t& corner,
1884  const std::size_t& opposing_corner);
1885 
1886 template <typename T>
1887 inline line<T, 3> triangle_external_bisector(
1888  const triangle<T, 3>& triangle, const std::size_t& corner,
1889  const std::size_t& opposing_corner);
1890 
1891 template <typename T>
1892 inline line<T, 2> triangle_median(const triangle<T, 2>& triangle,
1893  const std::size_t& median);
1894 template <typename T>
1895 inline line<T, 3> triangle_median(const triangle<T, 3>& triangle,
1896  const std::size_t& median);
1897 
1898 template <typename T>
1899 inline line<T, 2> triangle_symmedian(const triangle<T, 2>& triangle,
1900  const std::size_t& symmedian);
1901 template <typename T>
1902 inline line<T, 3> triangle_symmedian(const triangle<T, 3>& triangle,
1903  const std::size_t& symmedian);
1904 
1905 template <typename T>
1906 inline line<T, 2> euler_line(const triangle<T, 2>& triangle);
1907 template <typename T>
1908 inline line<T, 3> euler_line(const triangle<T, 3>& triangle);
1909 
1910 template <typename T>
1911 inline point2d<T> exmedian_point(const triangle<T, 2>& triangle,
1912  const std::size_t& corner);
1913 template <typename T>
1914 inline point3d<T> exmedian_point(const triangle<T, 3>& triangle,
1915  const std::size_t& corner);
1916 
1917 template <typename T>
1918 inline point2d<T> feuerbach_point(const triangle<T, 2>& triangle);
1919 
1920 template <typename T>
1921 inline line<T, 2> confined_triangle_median(const triangle<T, 2>& triangle,
1922  const point2d<T>& point,
1923  const std::size_t& median);
1924 
1925 template <typename T>
1926 inline line<T, 3> confined_triangle_median(const triangle<T, 3>& triangle,
1927  const point3d<T>& point,
1928  const std::size_t& median);
1929 
1930 template <typename T>
1931 inline line<T, 2> create_parallel_line_on_point(const line<T, 2>& line,
1932  const point2d<T>& point);
1933 template <typename T>
1934 inline line<T, 3> create_parallel_line_on_point(const line<T, 3>& line,
1935  const point3d<T>& point);
1936 
1937 template <typename T>
1938 inline segment<T, 2> create_parallel_segment_on_point(const line<T, 2>& line,
1939  const point2d<T>& point);
1940 template <typename T>
1941 inline segment<T, 3> create_parallel_segment_on_point(const line<T, 3>& line,
1942  const point3d<T>& point);
1943 
1944 template <typename T>
1945 inline bool point_in_rectangle(const T& px, const T& py, const T& x1,
1946  const T& y1, const T& x2, const T& y2);
1947 
1948 template <typename T>
1949 inline bool point_in_rectangle(const point2d<T>& point, const T& x1,
1950  const T& y1, const T& x2, const T& y2);
1951 
1952 template <typename T>
1953 inline bool point_in_rectangle(const T& px, const T& py,
1954  const rectangle<T>& rectangle);
1955 
1956 template <typename T>
1957 inline bool point_in_rectangle(const point2d<T>& point,
1958  const rectangle<T>& rectangle);
1959 
1960 template <typename T>
1961 inline bool point_in_rectangle(const point2d<T>& point,
1962  const point2d<T>& rect_point1,
1963  point2d<T>& rect_point2);
1964 
1965 template <typename T>
1966 inline bool point_in_rectangle(const point2d<T>& point,
1967  const segment<T, 2>& segment);
1968 
1969 template <typename T>
1970 inline bool point_in_box(const T& px, const T& py, const T& pz, const T& x1,
1971  const T& y1, const T& z1, const T& x2, const T& y2,
1972  const T& z2);
1973 
1974 template <typename T>
1975 inline bool point_in_box(const point3d<T>& point, const T& x1, const T& y1,
1976  const T& z1, const T& x2, const T& y2, const T& z2);
1977 
1978 template <typename T>
1979 inline bool point_in_box(const T& px, const T& py, const T& pz,
1980  const box<T, 3>& box);
1981 
1982 template <typename T>
1983 inline bool point_in_box(const point3d<T>& point, const box<T, 3>& box);
1984 
1985 template <typename T>
1986 inline bool point_in_box(const point3d<T>& point, const point3d<T>& box_point1,
1987  const point3d<T>& box_point2);
1988 
1989 template <typename T>
1990 inline bool point_in_box(const point3d<T>& point, const segment<T, 3>& segment);
1991 
1992 template <typename T>
1993 inline bool point_in_triangle(const T& px, const T& py, const T& x1,
1994  const T& y1, const T& x2, const T& y2,
1995  const T& x3, const T& y3);
1996 template <typename T>
1997 inline bool point_in_triangle(const point2d<T>& point, const point2d<T>& point1,
1998  const point2d<T>& point2,
1999  const point2d<T>& point3);
2000 
2001 template <typename T>
2002 inline bool point_in_triangle(const T& px, const T& py,
2003  const triangle<T, 2>& triangle);
2004 
2005 template <typename T>
2006 inline bool point_in_triangle(const point2d<T>& point,
2007  const triangle<T, 2>& triangle);
2008 
2009 template <typename T>
2010 inline bool point_in_quadix(const T& px, const T& py, const T& x1, const T& y1,
2011  const T& x2, const T& y2, const T& x3, const T& y3,
2012  const T& x4, const T& y4);
2013 
2014 template <typename T>
2015 inline bool point_in_quadix(const point2d<T>& point, const point2d<T>& point1,
2016  const point2d<T>& point2, const point2d<T>& point3,
2017  const point2d<T>& point4);
2018 
2019 template <typename T>
2020 inline bool point_in_quadix(const T& px, const T& py,
2021  const quadix<T, 2>& quadix);
2022 template <typename T>
2023 inline bool point_in_quadix(const point2d<T>& point,
2024  const quadix<T, 2>& quadix);
2025 
2026 template <typename T>
2027 inline bool point_in_circle(const T& px, const T& py, const T& cx, const T& cy,
2028  const T& radius);
2029 
2030 template <typename T>
2031 inline bool point_in_circle(const T& px, const T& py, const circle<T>& circle);
2032 
2033 template <typename T>
2034 inline bool point_in_circle(const point2d<T>& point, const circle<T>& circle);
2035 
2036 template <typename T>
2037 inline bool point_in_sphere(const T& px, const T& py, const T& pz, const T& cx,
2038  const T& cy, const T& cz, const T& radius);
2039 
2040 template <typename T>
2041 inline bool point_in_sphere(const T& px, const T& py, const T& pz,
2042  const sphere<T>& sphere);
2043 
2044 template <typename T>
2045 inline bool point_in_sphere(const point3d<T>& point, const sphere<T>& sphere);
2046 
2047 template <typename T>
2048 inline bool point_in_three_point_circle(const T& px, const T& py, const T& x1,
2049  const T& y1, const T& x2, const T& y2,
2050  const T& x3, const T& y3);
2051 
2052 template <typename T>
2053 inline bool point_in_three_point_circle(const point2d<T>& point,
2054  const point2d<T>& point1,
2055  const point2d<T>& point2,
2056  const point2d<T>& point3);
2057 
2058 template <typename T>
2059 inline bool point_in_three_point_circle(const point2d<T>& point,
2060  const triangle<T, 2> triangle);
2061 
2062 template <typename T>
2063 inline bool point_in_focus_area(const T& px, const T& py, const T& x1,
2064  const T& y1, const T& x2, const T& y2,
2065  const T& x3, const T& y3);
2066 template <typename T>
2067 inline bool point_in_focus_area(const point2d<T>& point,
2068  const point2d<T>& point1,
2069  const point2d<T>& point2,
2070  const point2d<T>& point3);
2071 
2072 template <typename T>
2073 inline bool point_on_segment(const point2d<T>& point,
2074  const segment<T, 2>& segment);
2075 
2076 template <typename T>
2077 inline bool point_on_segment(const point3d<T>& point,
2078  const segment<T, 3>& segment);
2079 
2080 template <typename T>
2081 inline bool point_on_ray(const T& px, const T& py, const T& ox, const T& oy,
2082  const T& dx, const T& dy);
2083 
2084 template <typename T>
2085 inline bool point_on_ray(const T& px, const T& py, const T& pz, const T& ox,
2086  const T& oy, const T& oz, const T& dx, const T& dy,
2087  const T& dz);
2088 
2089 template <typename T>
2090 inline bool point_on_ray(const point2d<T>& point, const ray<T, 2>& ray);
2091 
2092 template <typename T>
2093 inline bool point_on_ray(const point3d<T>& point, const ray<T, 3>& ray);
2094 
2095 template <typename T>
2096 inline bool point_on_rectangle(const T& px, const T& py, const T& x1,
2097  const T& y1, const T& x2, const T& y2);
2098 
2099 template <typename T>
2100 inline bool point_on_rectangle(const point2d<T>& point, const T& x1,
2101  const T& y1, const T& x2, const T& y2);
2102 
2103 template <typename T>
2104 inline bool point_on_rectangle(const T& px, const T& py,
2105  const rectangle<T>& rectangle);
2106 
2107 template <typename T>
2108 inline bool point_on_rectangle(const point2d<T>& point,
2109  const rectangle<T>& rectangle);
2110 
2111 template <typename T>
2112 inline bool point_on_triangle(const T& px, const T& py, const T& x1,
2113  const T& y1, const T& x2, const T& y2,
2114  const T& x3, const T& y3);
2115 template <typename T>
2116 inline bool point_on_triangle(const point2d<T>& point, const point2d<T>& point1,
2117  const point2d<T>& point2,
2118  const point2d<T>& point3);
2119 
2120 template <typename T>
2121 inline bool point_on_triangle(const T& px, const T& py,
2122  const triangle<T, 2>& triangle);
2123 
2124 template <typename T>
2125 inline bool point_on_triangle(const point2d<T>& point,
2126  const triangle<T, 2>& triangle);
2127 
2128 template <typename T>
2129 inline bool point_on_quadix(const T& px, const T& py, const T& x1, const T& y1,
2130  const T& x2, const T& y2, const T& x3, const T& y3,
2131  const T& x4, const T& y4);
2132 
2133 template <typename T>
2134 inline bool point_on_quadix(const point2d<T>& point, const point2d<T>& point1,
2135  const point2d<T>& point2, const point2d<T>& point3,
2136  const point2d<T>& point4);
2137 
2138 template <typename T>
2139 inline bool point_on_quadix(const T& px, const T& py,
2140  const quadix<T, 2>& quadix);
2141 template <typename T>
2142 inline bool point_on_quadix(const point2d<T>& point,
2143  const quadix<T, 2>& quadix);
2144 
2145 template <typename T>
2146 inline bool point_on_circle(const T& px, const T& py, const T& cx, const T& cy,
2147  const T& radius);
2148 
2149 template <typename T>
2150 inline bool point_on_circle(const T& px, const T& py, const circle<T>& circle);
2151 
2152 template <typename T>
2153 inline bool point_on_circle(const point2d<T>& point, const circle<T>& circle);
2154 
2155 template <typename T>
2156 inline bool point_on_bezier(const point2d<T>& point,
2157  const quadratic_bezier<T, 2>& bezier,
2158  const std::size_t& steps = 1000,
2159  const T& fuzzy = T(Epsilon));
2160 
2161 template <typename T>
2162 inline bool point_on_bezier(const point2d<T>& point,
2163  const cubic_bezier<T, 2>& bezier,
2164  const std::size_t& steps = 1000,
2165  const T& fuzzy = T(Epsilon));
2166 
2167 template <typename T>
2168 inline bool point_on_bezier(const point3d<T>& point,
2169  const quadratic_bezier<T, 3>& bezier,
2170  const std::size_t& steps = 1000,
2171  const T& fuzzy = T(Epsilon));
2172 
2173 template <typename T>
2174 inline bool point_on_bezier(const point3d<T>& point,
2175  const cubic_bezier<T, 3>& bezier,
2176  const std::size_t& steps = 1000,
2177  const T& fuzzy = T(Epsilon));
2178 
2179 template <typename T>
2180 inline point2d<T> isogonal_conjugate(const point2d<T>& point,
2181  const triangle<T, 2>& triangle);
2182 
2183 template <typename T>
2184 inline point3d<T> isogonal_conjugate(const point3d<T>& point,
2185  const triangle<T, 3>& triangle);
2186 
2187 template <typename T>
2188 inline point2d<T> cyclocevian_conjugate(const point2d<T>& point,
2189  const triangle<T, 2>& triangle);
2190 
2191 template <typename T>
2192 inline point2d<T> symmedian_point(const triangle<T, 2>& triangle);
2193 
2194 template <typename T>
2195 inline point3d<T> symmedian_point(const triangle<T, 3>& triangle);
2196 
2197 template <typename T>
2198 inline void create_equilateral_triangle(const T& x1, const T& y1, const T& x2,
2199  const T& y2, T& x3, T& y3);
2200 
2201 template <typename T>
2202 inline void create_equilateral_triangle(const point2d<T>& point1,
2203  const point2d<T>& point2,
2204  point2d<T>& point3);
2205 
2206 template <typename T>
2207 inline triangle<T, 2> create_equilateral_triangle(const T& x1, const T& y1,
2208  const T& x2, const T& y2);
2209 
2210 template <typename T>
2211 inline triangle<T, 2> create_equilateral_triangle(const point2d<T>& point1,
2212  const point2d<T>& point2);
2213 
2214 template <typename T>
2215 inline triangle<T, 2> create_equilateral_triangle(const T& cx, const T& cy,
2216  const T& side_length);
2217 template <typename T>
2218 inline triangle<T, 2> create_equilateral_triangle(
2219  const point2d<T>& center_point, const T& side_length);
2220 
2221 template <typename T>
2222 inline triangle<T, 2> create_isosceles_triangle(const point2d<T>& point1,
2223  const point2d<T>& point2,
2224  const T& angle);
2225 template <typename T>
2226 inline triangle<T, 2> create_isosceles_triangle(const segment<T, 2>& segment,
2227  const T& angle);
2228 
2229 template <typename T>
2230 inline triangle<T, 2> create_triangle(const point2d<T>& point1,
2231  const point2d<T>& point2, const T& angle1,
2232  const T& angle2);
2233 template <typename T>
2234 inline triangle<T, 2> create_triangle(const segment<T, 2>& segment,
2235  const T& angle1, const T& angle2);
2236 
2237 template <typename T>
2238 inline triangle<T, 2> create_morley_triangle(const triangle<T, 2>& triangle);
2239 
2240 template <typename T>
2241 inline triangle<T, 2> create_cevian_triangle(const triangle<T, 2>& triangle,
2242  const point2d<T>& point);
2243 template <typename T>
2244 inline triangle<T, 3> create_cevian_triangle(const triangle<T, 3>& triangle,
2245  const point3d<T>& point);
2246 
2247 template <typename T>
2248 inline triangle<T, 2> create_anticevian_triangle(const triangle<T, 2>& triangle,
2249  const point2d<T>& point);
2250 template <typename T>
2251 inline triangle<T, 3> create_anticevian_triangle(const triangle<T, 3>& triangle,
2252  const point3d<T>& point);
2253 
2254 template <typename T>
2255 inline triangle<T, 2> create_anticomplementary_triangle(
2256  const triangle<T, 2>& triangle);
2257 template <typename T>
2258 inline triangle<T, 3> create_anticomplementary_triangle(
2259  const triangle<T, 3>& triangle);
2260 
2261 template <typename T>
2262 inline triangle<T, 2> create_inner_napoleon_triangle(
2263  const triangle<T, 2>& triangle);
2264 
2265 template <typename T>
2266 inline triangle<T, 2> create_outer_napoleon_triangle(
2267  const triangle<T, 2>& triangle);
2268 
2269 template <typename T>
2270 inline triangle<T, 2> create_inner_vecten_triangle(
2271  const triangle<T, 2>& triangle);
2272 
2273 template <typename T>
2274 inline triangle<T, 2> create_outer_vecten_triangle(
2275  const triangle<T, 2>& triangle);
2276 
2277 template <typename T>
2278 inline triangle<T, 2> create_medial_triangle(const triangle<T, 2>& triangle);
2279 template <typename T>
2280 inline triangle<T, 3> create_medial_triangle(const triangle<T, 3>& triangle);
2281 
2282 template <typename T>
2283 inline triangle<T, 2> create_contact_triangle(const triangle<T, 2>& triangle);
2284 template <typename T>
2285 inline triangle<T, 3> create_contact_triangle(const triangle<T, 3>& triangle);
2286 
2287 template <typename T>
2288 inline triangle<T, 2> create_symmedial_triangle(const triangle<T, 2>& triangle,
2289  const point2d<T>& point);
2290 
2291 template <typename T>
2292 inline triangle<T, 2> create_orthic_triangle(const triangle<T, 2>& triangle);
2293 template <typename T>
2294 inline triangle<T, 3> create_orthic_triangle(const triangle<T, 3>& triangle);
2295 
2296 template <typename T>
2297 inline triangle<T, 2> create_pedal_triangle(const point2d<T>& point,
2298  const triangle<T, 2>& triangle);
2299 template <typename T>
2300 inline triangle<T, 3> create_pedal_triangle(const point3d<T>& point,
2301  const triangle<T, 3>& triangle);
2302 
2303 template <typename T>
2304 inline triangle<T, 2> create_antipedal_triangle(const point2d<T>& point,
2305  const triangle<T, 2>& triangle);
2306 
2307 template <typename T>
2308 inline triangle<T, 2> create_excentral_triangle(const triangle<T, 2>& triangle);
2309 template <typename T>
2310 inline triangle<T, 3> create_excentral_triangle(const triangle<T, 3>& triangle);
2311 
2312 template <typename T>
2313 inline triangle<T, 2> create_incentral_triangle(const triangle<T, 2>& triangle);
2314 template <typename T>
2315 inline triangle<T, 3> create_incentral_triangle(const triangle<T, 3>& triangle);
2316 
2317 template <typename T>
2318 inline triangle<T, 2> create_intouch_triangle(const triangle<T, 2>& triangle);
2319 
2320 template <typename T>
2321 inline triangle<T, 2> create_extouch_triangle(const triangle<T, 2>& triangle);
2322 template <typename T>
2323 inline triangle<T, 3> create_extouch_triangle(const triangle<T, 3>& triangle);
2324 
2325 template <typename T>
2326 inline triangle<T, 2> create_feuerbach_triangle(const triangle<T, 2>& triangle);
2327 
2328 template <typename T>
2329 inline triangle<T, 2> create_circumcevian_triangle(
2330  const triangle<T, 2>& triangle, const point2d<T>& point);
2331 
2332 template <typename T>
2333 inline triangle<T, 2> create_circummedial_triangle(
2334  const triangle<T, 2>& triangle);
2335 
2336 template <typename T>
2337 inline triangle<T, 2> create_first_brocard_triangle(
2338  const triangle<T, 2>& triangle);
2339 
2340 template <typename T>
2341 inline void create_right_triangle(const wykobi::point2d<T>& p1,
2342  const wykobi::point2d<T>& p2,
2343  wykobi::point2d<T>& c1,
2344  wykobi::point2d<T>& c2);
2345 
2346 template <typename T>
2347 inline void create_equilateral_quadix(const T& x1, const T& y1, const T& x2,
2348  const T& y2, T& x3, T& y3, T& x4, T& y4);
2349 
2350 template <typename T>
2351 inline void create_equilateral_quadix(const point2d<T>& point1,
2352  const point2d<T>& point2,
2353  point2d<T>& point3, point2d<T>& point4);
2354 
2355 template <typename T>
2356 inline quadix<T, 2> create_equilateral_quadix(const T& x1, const T& y1,
2357  const T& x2, const T& y2);
2358 
2359 template <typename T>
2360 inline quadix<T, 2> create_equilateral_quadix(const point2d<T>& point1,
2361  const point2d<T>& point2);
2362 
2363 template <typename T>
2364 inline quadix<T, 2> create_equilateral_quadix(const segment<T, 2>& segment);
2365 
2366 template <typename T>
2367 inline quadix<T, 2> create_equilateral_quadix(const T& cx, const T& cy,
2368  const T& side_length);
2369 
2370 template <typename T>
2371 inline quadix<T, 2> create_equilateral_quadix(const point2d<T>& center_point,
2372  const T& side_length);
2373 
2374 template <typename T>
2375 inline void torricelli_point(const T& x1, const T& y1, const T& x2, const T& y2,
2376  const T& x3, const T& y3, T& px, T& py);
2377 
2378 template <typename T>
2379 inline point2d<T> torricelli_point(const point2d<T>& point1,
2380  const point2d<T>& point2,
2381  const point2d<T>& point3);
2382 
2383 template <typename T>
2384 inline point2d<T> torricelli_point(const triangle<T, 2>& triangle);
2385 
2386 template <typename T>
2387 inline bool trilateration(const T& c0x, const T& c0y, const T& c0r,
2388  const T& c1x, const T& c1y, const T& c1r,
2389  const T& c2x, const T& c2y, const T& c2r, T& px,
2390  T& py);
2391 
2392 template <typename T>
2393 inline point2d<T> trilateration(const circle<T>& c0, const circle<T>& c1,
2394  const circle<T>& c2);
2395 
2396 template <typename T>
2397 inline void incenter(const T& x1, const T& y1, const T& x2, const T& y2,
2398  const T& x3, const T& y3, T& px, T& py);
2399 
2400 template <typename T>
2401 inline void incenter(const T& x1, const T& y1, const T& z1, const T& x2,
2402  const T& y2, const T& z2, const T& x3, const T& y3,
2403  const T& z3, T& px, T& py, T& pz);
2404 
2405 template <typename T>
2406 inline point2d<T> incenter(const point2d<T>& point1, const point2d<T>& point2,
2407  const point2d<T>& point3);
2408 
2409 template <typename T>
2410 inline point3d<T> incenter(const point3d<T>& point1, const point3d<T>& point2,
2411  const point3d<T>& point3);
2412 
2413 template <typename T>
2414 inline point2d<T> incenter(const triangle<T, 2>& triangle);
2415 
2416 template <typename T>
2417 inline point3d<T> incenter(const triangle<T, 3>& triangle);
2418 
2419 template <typename T>
2420 inline void circumcenter(const T& x1, const T& y1, const T& x2, const T& y2,
2421  const T& x3, const T& y3, T& px, T& py);
2422 
2423 template <typename T>
2424 inline void circumcenter(const T& x1, const T& y1, const T& z1, const T& x2,
2425  const T& y2, const T& z2, const T& x3, const T& y3,
2426  const T& z3, T& px, T& py, T& pz);
2427 
2428 template <typename T>
2429 inline point2d<T> circumcenter(const point2d<T>& point1,
2430  const point2d<T>& point2,
2431  const point2d<T>& point3);
2432 
2433 template <typename T>
2434 inline point3d<T> circumcenter(const point3d<T>& point1,
2435  const point3d<T>& point2,
2436  const point3d<T>& point3);
2437 
2438 template <typename T>
2439 inline point2d<T> circumcenter(const triangle<T, 2>& triangle);
2440 
2441 template <typename T>
2442 inline point3d<T> circumcenter(const triangle<T, 3>& triangle);
2443 
2444 template <typename T>
2445 inline circle<T> circumcircle(const T& x1, const T& y1, const T& x2,
2446  const T& y2, const T& x3, const T& y3);
2447 
2448 template <typename T>
2449 inline circle<T> circumcircle(const point2d<T>& point1,
2450  const point2d<T>& point2,
2451  const point2d<T>& point3);
2452 
2453 template <typename T>
2454 inline circle<T> circumcircle(const triangle<T, 2>& triangle);
2455 
2456 template <typename T>
2457 inline sphere<T> circumsphere(const T& x1, const T& y1, const T& z1,
2458  const T& x2, const T& y2, const T& z2,
2459  const T& x3, const T& y3, const T& z3);
2460 
2461 template <typename T>
2462 inline sphere<T> circumsphere(const point3d<T>& point1,
2463  const point3d<T>& point2,
2464  const point3d<T>& point3);
2465 
2466 template <typename T>
2467 inline sphere<T> circumsphere(const triangle<T, 3>& triangle);
2468 
2469 template <typename T>
2470 inline circle<T> inscribed_circle(const T& x1, const T& y1, const T& x2,
2471  const T& y2, const T& x3, const T& y3);
2472 
2473 template <typename T>
2474 inline circle<T> inscribed_circle(const point2d<T>& point1,
2475  const point2d<T>& point2,
2476  const point2d<T>& point3);
2477 
2478 template <typename T>
2479 inline circle<T> inscribed_circle(const triangle<T, 2>& triangle);
2480 
2481 template <typename T>
2482 inline sphere<T> inscribed_sphere(const T& x1, const T& y1, const T& z1,
2483  const T& x2, const T& y2, const T& z2,
2484  const T& x3, const T& y3, const T& z3);
2485 
2486 template <typename T>
2487 inline sphere<T> inscribed_sphere(const point3d<T>& point1,
2488  const point3d<T>& point2,
2489  const point3d<T>& point3);
2490 
2491 template <typename T>
2492 inline sphere<T> inscribed_sphere(const triangle<T, 3>& triangle);
2493 
2494 template <typename T>
2495 inline circle<T> nine_point_circle(const T& x1, const T& y1, const T& x2,
2496  const T& y2, const T& x3, const T& y3);
2497 
2498 template <typename T>
2499 inline circle<T> nine_point_circle(const point2d<T>& point1,
2500  const point2d<T>& point2,
2501  const point2d<T>& point3);
2502 
2503 template <typename T>
2504 inline circle<T> nine_point_circle(const triangle<T, 2>& triangle);
2505 
2506 template <typename T>
2507 inline point2d<T> orthocenter(const triangle<T, 2>& triangle);
2508 
2509 template <typename T>
2510 inline point3d<T> orthocenter(const triangle<T, 3>& triangle);
2511 
2512 template <typename T>
2513 inline point2d<T> excenter(const triangle<T, 2>& triangle,
2514  const std::size_t& corner);
2515 
2516 template <typename T>
2517 inline point3d<T> excenter(const triangle<T, 3>& triangle,
2518  const std::size_t& corner);
2519 
2520 template <typename T>
2521 inline circle<T> excircle(const triangle<T, 2>& triangle, const std::size_t& i);
2522 
2523 template <typename T>
2524 inline circle<T> mandart_circle(const triangle<T, 2>& triangle);
2525 
2526 template <typename T>
2527 inline circle<T> brocard_circle(const triangle<T, 2>& triangle);
2528 
2529 template <typename T>
2530 inline circle<T> invert_circle_across_circle(const circle<T>& circle1,
2531  const circle<T>& circle2);
2532 
2533 template <typename T>
2534 inline sphere<T> invert_sphere_across_sphere(const sphere<T>& sphere1,
2535  const sphere<T>& sphere2);
2536 
2537 template <typename T>
2538 inline void circle_tangent_points(const circle<T>& circle,
2539  const point2d<T>& point, point2d<T>& point1,
2540  point2d<T>& point2);
2541 
2542 template <typename T>
2543 inline void circle_internal_tangent_lines(const circle<T>& circle0,
2544  const circle<T>& circle1,
2545  std::vector<line<T, 2> >& lines);
2546 
2547 template <typename T>
2549  const circle<T>& circle0, const circle<T>& circle1,
2550  std::vector<segment<T, 2> >& segments);
2551 
2552 template <typename T>
2553 inline void circle_outer_tangent_lines(const circle<T>& circle0,
2554  const circle<T>& circle1,
2555  std::vector<line<T, 2> >& lines);
2556 
2557 template <typename T>
2558 inline void circle_outer_tangent_segments(
2559  const circle<T>& circle0, const circle<T>& circle1,
2560  std::vector<segment<T, 2> >& segments);
2561 
2562 template <typename T>
2563 inline line<T, 2> tangent_line(const circle<T>& circle,
2564  const point2d<T>& point);
2565 
2566 template <typename T>
2567 inline line<T, 2> create_line_from_bisector(const T& x1, const T& y1,
2568  const T& x2, const T& y2,
2569  const T& x3, const T& y3);
2570 
2571 template <typename T>
2572 inline segment<T, 2> create_segment_from_bisector(const T& x1, const T& y1,
2573  const T& x2, const T& y2,
2574  const T& x3, const T& y3);
2575 
2576 template <typename T>
2577 inline ray<T, 2> create_ray_from_bisector(const T& x1, const T& y1, const T& x2,
2578  const T& y2, const T& x3,
2579  const T& y3);
2580 
2581 template <typename T>
2582 inline line<T, 3> create_line_from_bisector(const T& x1, const T& y1,
2583  const T& z1, const T& x2,
2584  const T& y2, const T& z2,
2585  const T& x3, const T& y3,
2586  const T& z3);
2587 
2588 template <typename T>
2589 inline segment<T, 3> create_segment_from_bisector(const T& x1, const T& y1,
2590  const T& z1, const T& x2,
2591  const T& y2, const T& z2,
2592  const T& x3, const T& y3,
2593  const T& z3);
2594 
2595 template <typename T>
2596 inline ray<T, 3> create_ray_from_bisector(const T& x1, const T& y1, const T& z1,
2597  const T& x2, const T& y2, const T& z2,
2598  const T& x3, const T& y3,
2599  const T& z3);
2600 
2601 template <typename T>
2602 inline line<T, 2> create_line_from_bisector(const point2d<T>& point1,
2603  const point2d<T>& point2,
2604  const point2d<T>& point3);
2605 template <typename T>
2606 inline segment<T, 2> create_segment_from_bisector(const point2d<T>& point1,
2607  const point2d<T>& point2,
2608  const point2d<T>& point3);
2609 template <typename T>
2610 inline ray<T, 2> create_ray_from_bisector(const point2d<T>& point1,
2611  const point2d<T>& point2,
2612  const point2d<T>& point3);
2613 template <typename T>
2614 inline line<T, 3> create_line_from_bisector(const point3d<T>& point1,
2615  const point3d<T>& point2,
2616  const point3d<T>& point3);
2617 template <typename T>
2618 inline segment<T, 3> create_segment_from_bisector(const point3d<T>& point1,
2619  const point3d<T>& point2,
2620  const point3d<T>& point3);
2621 template <typename T>
2622 inline ray<T, 3> create_ray_from_bisector(const point3d<T>& point1,
2623  const point3d<T>& point2,
2624  const point3d<T>& point3);
2625 
2626 template <typename T>
2627 inline line<T, 2> create_perpendicular_bisector(const T& x1, const T& y1,
2628  const T& x2, const T& y2);
2629 template <typename T>
2630 inline line<T, 2> create_perpendicular_bisector(const point2d<T>& point1,
2631  const point2d<T>& point2);
2632 template <typename T>
2633 inline line<T, 2> create_perpendicular_bisector(const segment<T, 2>& segment);
2634 
2635 template <typename T>
2636 inline line<T, 2> create_perpendicular_line_at_end_point(
2637  const line<T, 2>& line);
2638 
2639 template <typename T>
2640 inline void closest_point_on_segment_from_point(const T& x1, const T& y1,
2641  const T& x2, const T& y2,
2642  const T& px, const T& py, T& nx,
2643  T& ny);
2644 
2645 template <typename T>
2647  const T& x1, const T& y1, const T& z1, const T& x2, const T& y2,
2648  const T& z2, const T& px, const T& py, const T& pz, T& nx, T& ny, T& nz);
2649 
2650 template <typename T>
2651 inline void closest_point_on_line_from_point(const T& x1, const T& y1,
2652  const T& x2, const T& y2,
2653  const T& px, const T& py, T& nx,
2654  T& ny);
2655 
2656 template <typename T>
2657 inline void closest_point_on_line_from_point(const T& x1, const T& y1,
2658  const T& z1, const T& x2,
2659  const T& y2, const T& z2,
2660  const T& px, const T& py,
2661  const T& pz, T& nx, T& ny, T& nz);
2662 
2663 template <typename T>
2665  const T& x1, const T& y1, const T& x2, const T& y2, const T& px,
2666  const T& py, T& nx, T& ny);
2667 
2668 template <typename T>
2670  const T& x1, const T& y1, const T& z1, const T& x2, const T& y2,
2671  const T& z2, const T& px, const T& py, const T& pz, T& nx, T& ny, T& nz);
2672 
2673 template <typename T>
2675  const T& x1, const T& y1, const T& x2, const T& y2, const T& px,
2676  const T& py, T& nx, T& ny);
2677 
2678 template <typename T>
2680  const T& x1, const T& y1, const T& z1, const T& x2, const T& y2,
2681  const T& z2, const T& px, const T& py, const T& pz, T& nx, T& ny, T& nz);
2682 
2683 template <typename T>
2684 inline void closest_point_on_ray_from_point(const T& ox, const T& oy,
2685  const T& dx, const T& dy,
2686  const T& px, const T& py, T& nx,
2687  T& ny);
2688 
2689 template <typename T>
2690 inline void closest_point_on_ray_from_point(const T& ox, const T& oy,
2691  const T& oz, const T& dx,
2692  const T& dy, const T& dz,
2693  const T& px, const T& py,
2694  const T& pz, T& nx, T& ny, T& nz);
2695 
2696 template <typename T>
2697 inline point2d<T> closest_point_on_segment_from_point(const T& x1, const T& y1,
2698  const T& x2, const T& y2,
2699  const T& px, const T& py);
2700 
2701 template <typename T>
2702 inline point3d<T> closest_point_on_segment_from_point(const T& x1, const T& y1,
2703  const T& z1, const T& x2,
2704  const T& y2, const T& z2,
2705  const T& px, const T& py,
2706  const T& pz);
2707 
2708 template <typename T>
2709 inline point2d<T> closest_point_on_segment_from_point(
2710  const segment<T, 2>& segment, const point2d<T>& point);
2711 
2712 template <typename T>
2713 inline point3d<T> closest_point_on_segment_from_point(
2714  const segment<T, 3>& segment, const point3d<T>& point);
2715 
2716 template <typename T>
2717 inline point2d<T> closest_point_on_line_from_point(const T& x1, const T& y1,
2718  const T& x2, const T& y2,
2719  const T& px, const T& py);
2720 
2721 template <typename T>
2722 inline point3d<T> closest_point_on_line_from_point(const T& x1, const T& y1,
2723  const T& z1, const T& x2,
2724  const T& y2, const T& z2,
2725  const T& px, const T& py,
2726  const T& pz);
2727 
2728 template <typename T>
2729 inline point2d<T> closest_point_on_line_from_point(const line<T, 2>& line,
2730  const point2d<T>& point);
2731 
2732 template <typename T>
2733 inline point3d<T> closest_point_on_line_from_point(const line<T, 3>& line,
2734  const point3d<T>& point);
2735 
2736 template <typename T>
2737 inline point2d<T> closest_point_on_ray_from_point(const T& ox, const T& oy,
2738  const T& dx, const T& dy,
2739  const T& px, const T& py);
2740 
2741 template <typename T>
2742 inline point3d<T> closest_point_on_ray_from_point(const T& ox, const T& oy,
2743  const T& oz, const T& dx,
2744  const T& dy, const T& dz,
2745  const T& px, const T& py,
2746  const T& pz);
2747 
2748 template <typename T>
2749 inline point2d<T> closest_point_on_ray_from_point(const ray<T, 2>& ray,
2750  const point2d<T>& point);
2751 
2752 template <typename T>
2753 inline point3d<T> closest_point_on_ray_from_point(const ray<T, 3>& ray,
2754  const point3d<T>& point);
2755 
2756 template <typename T>
2757 inline void closest_point_on_triangle_from_point(const T& x1, const T& y1,
2758  const T& x2, const T& y2,
2759  const T& x3, const T& y3,
2760  const T& px, const T& py,
2761  T& nx, T& ny);
2762 
2763 template <typename T>
2764 inline point2d<T> closest_point_on_triangle_from_point(const T& x1, const T& y1,
2765  const T& x2, const T& y2,
2766  const T& x3, const T& y3,
2767  const T& px,
2768  const T& py);
2769 
2770 template <typename T>
2771 inline point2d<T> closest_point_on_triangle_from_point(
2772  const triangle<T, 2>& triangle, const T& px, const T& py);
2773 
2774 template <typename T>
2775 inline point2d<T> closest_point_on_triangle_from_point(
2776  const triangle<T, 2>& triangle, const point2d<T>& point);
2777 
2778 template <typename T>
2780  const T& x1, const T& y1, const T& z1, const T& x2, const T& y2,
2781  const T& z2, const T& x3, const T& y3, const T& z3, const T& px,
2782  const T& py, const T& pz, T& nx, T& ny, T& nz);
2783 
2784 template <typename T>
2785 inline point3d<T> closest_point_on_triangle_from_point(
2786  const T& x1, const T& y1, const T& z1, const T& x2, const T& y2,
2787  const T& z2, const T& x3, const T& y3, const T& z3, const T& px,
2788  const T& py, const T& pz);
2789 
2790 template <typename T>
2791 inline point3d<T> closest_point_on_triangle_from_point(
2792  const triangle<T, 3>& triangle, const T& px, const T& py, const T& pz);
2793 
2794 template <typename T>
2795 inline point3d<T> closest_point_on_triangle_from_point(
2796  const triangle<T, 3>& triangle, const point3d<T>& point);
2797 
2798 template <typename T>
2799 inline void closest_point_on_rectangle_from_point(const T& x1, const T& y1,
2800  const T& x2, const T& y2,
2801  const T& px, const T& py,
2802  T& nx, T& ny);
2803 
2804 template <typename T>
2805 inline point2d<T> closest_point_on_rectangle_from_point(
2806  const T& x1, const T& y1, const T& x2, const T& y2, const T& px,
2807  const T& py);
2808 
2809 template <typename T>
2810 inline point2d<T> closest_point_on_rectangle_from_point(
2811  const rectangle<T>& rectangle, const T& px, const T& py);
2812 
2813 template <typename T>
2814 inline point2d<T> closest_point_on_rectangle_from_point(
2815  const rectangle<T>& rectangle, const point2d<T>& point);
2816 
2817 template <typename T>
2818 inline void closest_point_on_box_from_point(const T& x1, const T& y1,
2819  const T& z1, const T& x2,
2820  const T& y2, const T& z2,
2821  const T& px, const T& py,
2822  const T& pz, T& nx, T& ny, T& nz);
2823 
2824 template <typename T>
2825 inline point3d<T> closest_point_on_box_from_point(const T& x1, const T& y1,
2826  const T& z1, const T& x2,
2827  const T& y2, const T& z2,
2828  const T& px, const T& py,
2829  const T& pz);
2830 
2831 template <typename T>
2832 inline point3d<T> closest_point_on_box_from_point(const box<T, 3>& box,
2833  const T& px, const T& py,
2834  const T& pz);
2835 
2836 template <typename T>
2837 inline point3d<T> closest_point_on_box_from_point(const box<T, 3>& box,
2838  const point3d<T>& point);
2839 
2840 template <typename T>
2841 inline void closest_point_on_quadix_from_point(const T& x1, const T& y1,
2842  const T& x2, const T& y2,
2843  const T& x3, const T& y3,
2844  const T& x4, const T& y4,
2845  const T& px, const T& py, T& nx,
2846  T& ny);
2847 
2848 template <typename T>
2849 inline point2d<T> closest_point_on_quadix_from_point(const T& x1, const T& y1,
2850  const T& x2, const T& y2,
2851  const T& x3, const T& y3,
2852  const T& x4, const T& y4,
2853  const T& px, const T& py);
2854 template <typename T>
2855 inline point2d<T> closest_point_on_quadix_from_point(const quadix<T, 2>& quadix,
2856  const point2d<T>& point);
2857 
2858 template <typename T>
2859 inline point2d<T> closest_point_on_circle_from_point(const circle<T>& circle,
2860  const point2d<T>& point);
2861 
2862 template <typename T>
2863 inline point3d<T> closest_point_on_sphere_from_point(const sphere<T>& sphere,
2864  const point3d<T>& point);
2865 
2866 template <typename T>
2867 inline point2d<T> closest_point_on_aabbb_from_point(
2868  const rectangle<T>& rectangle, const point2d<T>& point);
2869 
2870 template <typename T>
2871 inline point2d<T> closest_point_on_circle_from_segment(
2872  const circle<T>& circle, const segment<T, 2>& segment);
2873 
2874 template <typename T>
2875 inline point3d<T> closest_point_on_sphere_from_segment(
2876  const sphere<T>& sphere, const segment<T, 3>& segment);
2877 
2878 template <typename T>
2879 inline point3d<T> closest_point_on_plane_from_point(const plane<T, 3>& plane,
2880  const point3d<T>& point);
2881 
2882 template <typename T>
2883 inline point2d<T> closest_point_on_bezier_from_point(
2884  const quadratic_bezier<T, 2>& bezier, const point2d<T>& point,
2885  const std::size_t& steps = 1000);
2886 
2887 template <typename T>
2888 inline point2d<T> closest_point_on_bezier_from_point(
2889  const cubic_bezier<T, 2>& bezier, const point2d<T>& point,
2890  const std::size_t& steps = 1000);
2891 
2892 template <typename T>
2893 inline point3d<T> closest_point_on_bezier_from_point(
2894  const quadratic_bezier<T, 3>& bezier, const point3d<T>& point,
2895  const std::size_t& steps = 1000);
2896 
2897 template <typename T>
2898 inline point3d<T> closest_point_on_bezier_from_point(
2899  const cubic_bezier<T, 3>& bezier, const point3d<T>& point,
2900  const std::size_t& steps = 1000);
2901 
2902 template <typename T>
2903 inline point2d<T> closest_point_on_circle_from_circle(const circle<T>& circle1,
2904  const circle<T>& circle2);
2905 
2906 template <typename T>
2907 inline point3d<T> closest_point_on_sphere_from_sphere(const sphere<T>& sphere1,
2908  const sphere<T>& sphere2);
2909 
2910 template <typename T>
2911 inline point2d<T> closest_point_on_polygon_from_point(
2912  const polygon<T, 2>& polygon, const point2d<T>& point);
2913 
2914 template <typename T>
2915 inline T minimum_distance_from_point_to_segment(const T& px, const T& py,
2916  const T& x1, const T& y1,
2917  const T& x2, const T& y2);
2918 
2919 template <typename T>
2920 inline T minimum_distance_from_point_to_segment(const T& px, const T& py,
2921  const T& pz, const T& x1,
2922  const T& y1, const T& z1,
2923  const T& x2, const T& y2,
2924  const T& z2);
2925 
2926 template <typename T>
2927 inline T minimum_distance_from_point_to_segment(const point2d<T>& point,
2928  const segment<T, 2>& segment);
2929 
2930 template <typename T>
2931 inline T minimum_distance_from_point_to_segment(const point3d<T>& point,
2932  const segment<T, 3>& segment);
2933 
2934 template <typename T>
2935 inline T minimum_distance_from_point_to_line(const T& px, const T& py,
2936  const T& x1, const T& y1,
2937  const T& x2, const T& y2);
2938 
2939 template <typename T>
2940 inline T minimum_distance_from_point_to_line(const T& px, const T& py,
2941  const T& pz, const T& x1,
2942  const T& y1, const T& z1,
2943  const T& x2, const T& y2,
2944  const T& z2);
2945 
2946 template <typename T>
2947 inline T minimum_distance_from_point_to_line(const point2d<T>& point,
2948  const line<T, 2>& line);
2949 
2950 template <typename T>
2951 inline T minimum_distance_from_point_to_line(const point3d<T>& point,
2952  const line<T, 3>& line);
2953 
2954 template <typename T>
2955 inline T minimum_distance_from_point_to_triangle(const T& px, const T& py,
2956  const T& x1, const T& y1,
2957  const T& x2, const T& y2,
2958  const T& x3, const T& y3);
2959 
2960 template <typename T>
2962  const point2d<T>& point, const triangle<T, 2>& triangle);
2963 
2964 template <typename T>
2965 inline T minimum_distance_from_point_to_rectangle(const T& px, const T& py,
2966  const T& x1, const T& y1,
2967  const T& x2, const T& y2);
2968 
2969 template <typename T>
2971  const point2d<T>& point, const rectangle<T>& rectangle);
2972 
2973 template <typename T>
2974 inline void segment_mid_point(const T& x1, const T& y1, const T& x2,
2975  const T& y2, T& midx, T& midy);
2976 
2977 template <typename T>
2978 inline void segment_mid_point(const segment<T, 2>& segment, T& midx, T& midy);
2979 
2980 template <typename T>
2981 inline point2d<T> segment_mid_point(const point2d<T>& point1,
2982  const point2d<T>& point2);
2983 
2984 template <typename T>
2985 inline point2d<T> segment_mid_point(const segment<T, 2>& segment);
2986 
2987 template <typename T>
2988 inline void segment_mid_point(const T& x1, const T& y1, const T& z1,
2989  const T& x2, const T& y2, const T& z2, T& midx,
2990  T& midy, T& midz);
2991 
2992 template <typename T>
2993 inline void segment_mid_point(const segment<T, 3>& segment, T& midx, T& midy,
2994  T& midz);
2995 
2996 template <typename T>
2997 inline point3d<T> segment_mid_point(const point3d<T>& point1,
2998  const point3d<T>& point2);
2999 
3000 template <typename T>
3001 inline point3d<T> segment_mid_point(const segment<T, 3>& segment);
3002 
3003 template <typename T>
3004 inline void centroid(const T& x1, const T& y1, const T& x2, const T& y2, T& x,
3005  T& y);
3006 
3007 template <typename T>
3008 inline point2d<T> centroid(const point2d<T>& point1, const point2d<T>& point2);
3009 
3010 template <typename T>
3011 inline point2d<T> centroid(const segment<T, 2>& segment);
3012 
3013 template <typename T>
3014 inline void centroid(const T& x1, const T& y1, const T& x2, const T& y2,
3015  const T& x3, const T& y3, T& x, T& y);
3016 
3017 template <typename T>
3018 inline void centroid(const T& x1, const T& y1, const T& z1, const T& x2,
3019  const T& y2, const T& z2, const T& x3, const T& y3,
3020  const T& z3, T& x, T& y, T& z);
3021 
3022 template <typename T>
3023 inline void centroid(const T& x1, const T& y1, const T& x2, const T& y2,
3024  const T& x3, const T& y3, const T& x4, const T& y4, T& x,
3025  T& y);
3026 
3027 template <typename T>
3028 inline void centroid(const triangle<T, 2>& triangle, T& x, T& y);
3029 template <typename T>
3030 inline void centroid(const triangle<T, 3>& triangle, T& x, T& y, T& z);
3031 template <typename T>
3032 inline void centroid(const quadix<T, 2>& quadix, T& x, T& y);
3033 template <typename T>
3034 inline void centroid(const rectangle<T>& rectangle, T& x, T& y);
3035 template <typename T>
3036 inline void centroid(const box<T, 3>& box, T& x, T& y, T& z);
3037 template <typename T>
3038 inline void centroid(const polygon<T, 2>& polygon, T& x, T& y);
3039 
3040 template <typename T>
3041 inline point2d<T> centroid(const point2d<T>& point1, const point2d<T>& point2,
3042  const point2d<T>& point3);
3043 template <typename T>
3044 inline point2d<T> centroid(const point2d<T>& point1, const point2d<T>& point2,
3045  const point2d<T>& point3, const point2d<T>& point4);
3046 template <typename T>
3047 inline point2d<T> centroid(const triangle<T, 2>& triangle);
3048 template <typename T>
3049 inline point3d<T> centroid(const triangle<T, 3>& triangle);
3050 template <typename T>
3051 inline point2d<T> centroid(const quadix<T, 2>& quadix);
3052 template <typename T>
3053 inline point2d<T> centroid(const rectangle<T>& rectangle);
3054 template <typename T>
3055 inline point3d<T> centroid(const box<T, 3>& box);
3056 template <typename T>
3057 inline point2d<T> centroid(const polygon<T, 2>& polygon);
3058 
3059 template <typename T>
3060 inline bool common_center(const circle<T>& circle1, const circle<T>& circle2);
3061 template <typename T>
3062 inline bool common_center(const sphere<T>& sphere1, const sphere<T>& circle2);
3063 
3064 template <typename T>
3065 inline bool point_in_convex_polygon(const T& px, const T& py,
3066  const polygon<T, 2>& polygon);
3067 template <typename T>
3068 inline bool point_in_convex_polygon(const point2d<T>& point,
3069  const polygon<T, 2>& polygon);
3070 
3071 template <typename T>
3072 inline bool point_on_polygon_edge(const T& px, const T& py,
3073  const polygon<T, 2>& polygon);
3074 template <typename T>
3075 inline bool point_on_polygon_edge(const point2d<T>& point,
3076  const polygon<T, 2>& polygon);
3077 
3078 template <typename T>
3079 inline bool point_in_polygon(const T& px, const T& py,
3080  const polygon<T, 2>& polygon);
3081 template <typename T>
3082 inline bool point_in_polygon(const point2d<T>& point,
3083  const polygon<T, 2>& polygon);
3084 
3085 template <typename T>
3086 inline bool point_in_polygon_winding_number(const T& px, const T& py,
3087  const polygon<T, 2>& polygon);
3088 template <typename T>
3089 inline bool point_in_polygon_winding_number(const point2d<T>& point,
3090  const polygon<T, 2>& polygon);
3091 
3092 template <typename T>
3093 inline bool convex_quadix(const quadix<T, 2>& quadix);
3094 template <typename T>
3095 inline bool convex_quadix(const quadix<T, 3>& quadix);
3096 
3097 template <typename T>
3098 inline bool is_convex_polygon(const polygon<T, 2>& polygon);
3099 
3100 template <typename T>
3101 inline polygon<T, 2> remove_consecutive_collinear_points(
3102  const polygon<T, 2>& polygon);
3103 
3104 template <typename T, typename InputIterator, typename OutputIterator>
3105 inline void remove_consecutive_collinear_points(const InputIterator begin,
3106  const InputIterator end,
3107  OutputIterator out);
3108 
3109 template <typename T>
3110 inline bool convex_vertex(const std::size_t& index,
3111  const polygon<T, 2>& polygon,
3112  const int& polygon_orientation = LeftHandSide);
3113 
3114 template <typename T>
3115 inline bool collinear_vertex(const std::size_t& index,
3116  const polygon<T, 2>& polygon);
3117 
3118 template <typename T>
3119 inline bool vertex_is_ear(const std::size_t& index,
3120  const polygon<T, 2>& polygon);
3121 
3122 template <typename T>
3123 inline triangle<T, 2> vertex_triangle(const std::size_t& index,
3124  const polygon<T, 2> polygon);
3125 
3126 template <typename T>
3127 inline int polygon_orientation(const polygon<T, 2>& polygon);
3128 
3129 template <typename T>
3130 inline bool is_equilateral_triangle(const triangle<T, 2>& triangle);
3131 template <typename T>
3132 inline bool is_equilateral_triangle(const triangle<T, 3>& triangle);
3133 
3134 template <typename T>
3135 inline bool is_isosceles_triangle(const triangle<T, 2>& triangle);
3136 template <typename T>
3137 inline bool is_isosceles_triangle(const triangle<T, 3>& triangle);
3138 
3139 template <typename T>
3140 inline bool is_right_triangle(const wykobi::triangle<T, 2>& triangle);
3141 template <typename T>
3142 inline bool is_right_triangle(const wykobi::triangle<T, 3>& triangle);
3143 
3144 template <typename T>
3145 inline bool are_perspective_triangles(const triangle<T, 2>& triangle1,
3146  const triangle<T, 2>& triangle2);
3147 template <typename T>
3148 inline bool are_perspective_triangles(const triangle<T, 3>& triangle1,
3149  const triangle<T, 3>& triangle2);
3150 
3151 template <typename T>
3152 inline line<T, 2> perspectrix(const triangle<T, 2>& triangle1,
3153  const triangle<T, 2>& triangle2);
3154 template <typename T>
3155 inline line<T, 3> perspectrix(const triangle<T, 3>& triangle1,
3156  const triangle<T, 3>& triangle2);
3157 
3158 template <typename T>
3159 inline void mirror(const T& px, const T& py, const T& x1, const T& y1,
3160  const T& x2, const T& y2, T& nx, T& ny);
3161 
3162 template <typename T>
3163 inline void mirror(const T& px, const T& py, const T& pz, const T& x1,
3164  const T& y1, const T& z1, const T& x2, const T& y2,
3165  const T& z2, T& nx, T& ny, T& nz);
3166 
3167 template <typename T>
3168 inline point2d<T> mirror(const point2d<T>& point,
3169  const line<T, 2>& mirror_axis);
3170 template <typename T>
3171 inline segment<T, 2> mirror(const segment<T, 2>& segment,
3172  const line<T, 2>& mirror_axis);
3173 template <typename T>
3174 inline line<T, 2> mirror(const line<T, 2>& line,
3175  const wykobi::line<T, 2>& mirror_axis);
3176 template <typename T>
3177 inline rectangle<T> mirror(const rectangle<T>& rectangle,
3178  const line<T, 2>& mirror_axis);
3179 template <typename T>
3180 inline triangle<T, 2> mirror(const triangle<T, 2>& triangle,
3181  const line<T, 2>& mirror_axis);
3182 template <typename T>
3183 inline quadix<T, 2> mirror(const quadix<T, 2>& quadix,
3184  const line<T, 2>& mirror_axis);
3185 template <typename T>
3186 inline circle<T> mirror(const circle<T>& circle, const line<T, 2>& mirror_axis);
3187 template <typename T>
3188 inline polygon<T, 2> mirror(const polygon<T, 2>& polygon,
3189  const line<T, 2>& mirror_axis);
3190 
3191 template <typename T>
3192 inline point3d<T> mirror(const point3d<T>& point,
3193  const line<T, 3>& mirror_axis);
3194 template <typename T>
3195 inline segment<T, 3> mirror(const segment<T, 3>& segment,
3196  const line<T, 3>& mirror_axis);
3197 template <typename T>
3198 inline line<T, 3> mirror(const line<T, 3>& line,
3199  const wykobi::line<T, 3>& mirror_axis);
3200 template <typename T>
3201 inline box<T, 3> mirror(const box<T, 3>& box, const line<T, 3>& mirror_axis);
3202 template <typename T>
3203 inline triangle<T, 3> mirror(const triangle<T, 3>& triangle,
3204  const line<T, 3>& mirror_axis);
3205 template <typename T>
3206 inline quadix<T, 3> mirror(const quadix<T, 3>& quadix,
3207  const line<T, 3>& mirror_axis);
3208 template <typename T>
3209 inline sphere<T> mirror(const sphere<T>& sphere, const line<T, 3>& mirror_axis);
3210 template <typename T>
3211 inline polygon<T, 3> mirror(const polygon<T, 3>& polygon,
3212  const line<T, 3>& mirror_axis);
3213 
3214 template <typename T>
3215 inline point3d<T> mirror(const point3d<T>& point,
3216  const plane<T, 3>& mirror_plane);
3217 template <typename T>
3218 inline segment<T, 3> mirror(const segment<T, 3>& segment,
3219  const plane<T, 3>& mirror_plane);
3220 template <typename T>
3221 inline line<T, 3> mirror(const line<T, 3>& line,
3222  const plane<T, 3>& mirror_plane);
3223 template <typename T>
3224 inline box<T, 3> mirror(const box<T, 3>& box, const plane<T, 3>& mirror_plane);
3225 template <typename T>
3226 inline triangle<T, 3> mirror(const triangle<T, 3>& triangle,
3227  const plane<T, 3>& mirror_plane);
3228 template <typename T>
3229 inline quadix<T, 3> mirror(const quadix<T, 3>& quadix,
3230  const plane<T, 3>& mirror_plane);
3231 template <typename T>
3232 inline sphere<T> mirror(const sphere<T>& sphere,
3233  const plane<T, 3>& mirror_plane);
3234 template <typename T>
3235 inline polygon<T, 3> mirror(const polygon<T, 3>& polygon,
3236  const plane<T, 3>& mirror_plane);
3237 
3238 template <typename T>
3239 inline void nonsymmetric_mirror(const T& px, const T& py, const T& x1,
3240  const T& y1, const T& x2, const T& y2,
3241  const T& ratio, T& nx, T& ny);
3242 
3243 template <typename T>
3244 inline point2d<T> nonsymmetric_mirror(const point2d<T>& point, const T& ratio,
3245  const line<T, 2>& line);
3246 template <typename T>
3247 inline segment<T, 2> nonsymmetric_mirror(const segment<T, 2>& segment,
3248  const T& ratio,
3249  const line<T, 2>& line);
3250 template <typename T>
3251 inline rectangle<T> nonsymmetric_mirror(const rectangle<T>& rectangle,
3252  const T& ratio, const line<T, 2>& line);
3253 template <typename T>
3254 inline triangle<T, 2> nonsymmetric_mirror(const triangle<T, 2>& triangle,
3255  const T& ratio,
3256  const line<T, 2>& line);
3257 template <typename T>
3258 inline quadix<T, 2> nonsymmetric_mirror(const quadix<T, 2>& quadix,
3259  const T& ratio, const line<T, 2>& line);
3260 template <typename T>
3261 inline circle<T> nonsymmetric_mirror(const circle<T>& circle, const T& ratio,
3262  const line<T, 2>& line);
3263 template <typename T>
3264 inline polygon<T, 2> nonsymmetric_mirror(const polygon<T, 2>& polygon,
3265  const T& ratio,
3266  const line<T, 2>& line);
3267 
3268 template <typename T>
3269 inline point3d<T> nonsymmetric_mirror(const point3d<T>& point, const T& ratio,
3270  const plane<T, 3>& plane);
3271 template <typename T>
3272 inline segment<T, 3> nonsymmetric_mirror(const segment<T, 3>& segment,
3273  const T& ratio,
3274  const plane<T, 3>& plane);
3275 template <typename T>
3276 inline box<T, 3> nonsymmetric_mirror(const box<T, 3>& box, const T& ratio,
3277  const plane<T, 3>& plane);
3278 template <typename T>
3279 inline triangle<T, 3> nonsymmetric_mirror(const triangle<T, 3>& triangle,
3280  const T& ratio,
3281  const plane<T, 3>& plane);
3282 template <typename T>
3283 inline quadix<T, 3> nonsymmetric_mirror(const quadix<T, 3>& quadix,
3284  const T& ratio,
3285  const plane<T, 3>& plane);
3286 template <typename T>
3287 inline circle<T> nonsymmetric_mirror(const sphere<T>& sphere, const T& ratio,
3288  const plane<T, 3>& plane);
3289 template <typename T>
3290 inline polygon<T, 3> nonsymmetric_mirror(const polygon<T, 3>& polygon,
3291  const T& ratio,
3292  const plane<T, 3>& plane);
3293 
3294 template <typename T>
3295 inline point2d<T> invert_point(const point2d<T>& point,
3296  const circle<T>& circle);
3297 template <typename T>
3298 inline point3d<T> invert_point(const point3d<T>& point,
3299  const sphere<T>& sphere);
3300 
3301 template <typename T>
3302 inline point2d<T> antipodal_point(const point2d<T>& point,
3303  const circle<T>& circle);
3304 template <typename T>
3305 inline point3d<T> antipodal_point(const point3d<T>& point,
3306  const sphere<T>& sphere);
3307 
3308 template <typename T>
3309 inline T distance(const T& x1, const T& y1, const T& x2, const T& y2);
3310 template <typename T>
3311 inline T distance(const T& x1, const T& y1, const T& z1, const T& x2,
3312  const T& y2, const T& z2);
3313 template <typename T>
3314 inline T distance(const point2d<T>& point1, const point2d<T>& point2);
3315 template <typename T>
3316 inline T distance(const point3d<T>& point1, const point3d<T>& point2);
3317 template <typename T>
3318 inline T distance(const curve_point<T, 2>& point1,
3319  const curve_point<T, 2>& point2);
3320 template <typename T>
3321 inline T distance(const curve_point<T, 3>& point1,
3322  const curve_point<T, 3>& point2);
3323 template <typename T>
3324 inline T distance(const point2d<T>& point, const segment<T, 2>& segment);
3325 template <typename T>
3326 inline T distance(const point3d<T>& point, const segment<T, 3>& segment);
3327 template <typename T>
3328 inline T distance(const point2d<T>& point, const rectangle<T>& rectangle);
3329 template <typename T>
3330 inline T distance(const point2d<T>& point, const triangle<T, 2>& triangle);
3331 template <typename T>
3332 inline T distance(const point2d<T>& point, const quadix<T, 2>& quadix);
3333 template <typename T>
3334 inline T distance(const point2d<T>& point, const ray<T, 2>& ray);
3335 template <typename T>
3336 inline T distance(const point3d<T>& point, const ray<T, 3>& ray);
3337 template <typename T>
3338 inline T distance(const point3d<T>& point, const plane<T, 3>& plane);
3339 template <typename T>
3340 inline T distance(const line<T, 2>& line1, const line<T, 2>& line2);
3341 template <typename T>
3342 inline T distance(const line<T, 3>& line1, const line<T, 3>& line2);
3343 template <typename T>
3344 inline T distance(const segment<T, 2>& segment1, const segment<T, 2>& segment2);
3345 template <typename T>
3346 inline T distance(const segment<T, 3>& segment1, const segment<T, 3>& segment2);
3347 template <typename T>
3348 inline T distance(const segment<T, 2>& segment);
3349 template <typename T>
3350 inline T distance(const segment<T, 3>& segment);
3351 template <typename T>
3352 inline T distance(const segment<T, 2>& segment, const triangle<T, 2>& triangle);
3353 template <typename T>
3354 inline T distance(const segment<T, 3>& segment, const triangle<T, 3>& triangle);
3355 template <typename T>
3356 inline T distance(const segment<T, 2>& segment, const rectangle<T>& rectangle);
3357 template <typename T>
3358 inline T distance(const segment<T, 2>& segment, const circle<T>& circle);
3359 template <typename T>
3360 inline T distance(const triangle<T, 2>& triangle1,
3361  const triangle<T, 2>& triangle2);
3362 template <typename T>
3363 inline T distance(const triangle<T, 2>& triangle,
3364  const rectangle<T>& rectangle);
3365 template <typename T>
3366 inline T distance(const rectangle<T>& rectangle1,
3367  const rectangle<T>& rectangle2);
3368 template <typename T>
3369 inline T distance(const triangle<T, 2>& triangle, const circle<T>& circle);
3370 template <typename T>
3371 inline T distance(const rectangle<T>& rectangle, const circle<T>& circle);
3372 template <typename T>
3373 inline T distance(const point2d<T>& point, const circle<T>& circle);
3374 template <typename T>
3375 inline T distance(const circle<T>& circle1, const circle<T>& circle2);
3376 template <typename T>
3377 inline T distance(const sphere<T>& sphere1, const sphere<T>& sphere2);
3378 
3379 template <typename T>
3380 inline T lay_distance(const T& x1, const T& y1, const T& x2, const T& y2);
3381 template <typename T>
3382 inline T lay_distance(const T& x1, const T& y1, const T& z1, const T& x2,
3383  const T& y2, const T& z2);
3384 template <typename T>
3385 inline T lay_distance(const point2d<T>& point1, const point2d<T>& point2);
3386 template <typename T>
3387 inline T lay_distance(const point3d<T>& point1, const point3d<T>& point2);
3388 template <typename T>
3389 inline T lay_distance(const point2d<T>& point, const triangle<T, 2>& triangle);
3390 template <typename T>
3391 inline T lay_distance(const point2d<T>& point, const quadix<T, 2>& triangle);
3392 template <typename T>
3393 inline T lay_distance(const point2d<T>& point, const ray<T, 2>& ray);
3394 template <typename T>
3395 inline T lay_distance(const point3d<T>& point, const ray<T, 3>& ray);
3396 template <typename T>
3397 inline T lay_distance(const point3d<T>& point, const plane<T, 3>& plane);
3398 template <typename T>
3399 inline T lay_distance(const segment<T, 2>& segment1,
3400  const segment<T, 2>& segment2);
3401 template <typename T>
3402 inline T lay_distance(const segment<T, 3>& segment1,
3403  const segment<T, 3>& segment2);
3404 template <typename T>
3405 inline T lay_distance(const line<T, 3>& line1, const line<T, 3>& line2);
3406 template <typename T>
3407 inline T lay_distance(const segment<T, 2>& segment);
3408 template <typename T>
3409 inline T lay_distance(const segment<T, 3>& segment);
3410 template <typename T>
3411 inline T lay_distance(const segment<T, 2>& segment,
3412  const triangle<T, 2>& triangle);
3413 template <typename T>
3414 inline T lay_distance(const segment<T, 3>& segment,
3415  const triangle<T, 3>& triangle);
3416 
3417 template <typename T>
3418 inline T manhattan_distance(const T& x1, const T& y1, const T& x2, const T& y2);
3419 template <typename T>
3420 inline T manhattan_distance(const T& x1, const T& y1, const T& z1, const T& x2,
3421  const T& y2, const T& z2);
3422 template <typename T>
3423 inline T manhattan_distance(const point2d<T>& point1, const point2d<T>& point2);
3424 template <typename T>
3425 inline T manhattan_distance(const point3d<T>& point1, const point3d<T>& point2);
3426 template <typename T>
3427 inline T manhattan_distance(const point2d<T>& point, const ray<T, 2>& ray);
3428 template <typename T>
3429 inline T manhattan_distance(const point3d<T>& point, const ray<T, 3>& ray);
3430 template <typename T>
3431 inline T manhattan_distance(const segment<T, 2>& segment);
3432 template <typename T>
3433 inline T manhattan_distance(const segment<T, 3>& segment);
3434 template <typename T>
3435 inline T manhattan_distance(const circle<T>& circle1, const circle<T>& circle2);
3436 
3437 template <typename T>
3438 inline T chebyshev_distance(const T& x1, const T& y1, const T& x2, const T& y2);
3439 template <typename T>
3440 inline T chebyshev_distance(const T& x1, const T& y1, const T& z1, const T& x2,
3441  const T& y2, const T& z2);
3442 template <typename T>
3443 inline T chebyshev_distance(const point2d<T>& point1, const point2d<T>& point2);
3444 template <typename T>
3445 inline T chebyshev_distance(const point3d<T>& point1, const point3d<T>& point2);
3446 template <typename T>
3447 inline T chebyshev_distance(const segment<T, 2>& segment);
3448 template <typename T>
3449 inline T chebyshev_distance(const segment<T, 3>& segment);
3450 template <typename T>
3451 inline T chebyshev_distance(const circle<T>& circle1, const circle<T>& circle2);
3452 
3453 template <typename T>
3454 inline T inverse_chebyshev_distance(const T& x1, const T& y1, const T& x2,
3455  const T& y2);
3456 template <typename T>
3457 inline T inverse_chebyshev_distance(const T& x1, const T& y1, const T& z1,
3458  const T& x2, const T& y2, const T& z2);
3459 template <typename T>
3460 inline T inverse_chebyshev_distance(const point2d<T>& point1,
3461  const point2d<T>& point2);
3462 template <typename T>
3463 inline T inverse_chebyshev_distance(const point3d<T>& point1,
3464  const point3d<T>& point2);
3465 template <typename T>
3466 inline T inverse_chebyshev_distance(const segment<T, 2>& segment);
3467 template <typename T>
3468 inline T inverse_chebyshev_distance(const segment<T, 3>& segment);
3469 template <typename T>
3470 inline T inverse_chebyshev_distance(const circle<T>& circle1,
3471  const circle<T>& circle2);
3472 
3473 template <typename T>
3474 inline point2d<T> minkowski_sum(const point2d<T>& point1,
3475  const point2d<T>& point2);
3476 template <typename T>
3477 inline polygon<T, 2> minkowski_sum(const rectangle<T>& rectangle1,
3478  const rectangle<T>& rectangle2);
3479 template <typename T>
3480 inline polygon<T, 2> minkowski_sum(const triangle<T, 2>& triangle1,
3481  const triangle<T, 2>& triangle2);
3482 template <typename T>
3483 inline polygon<T, 2> minkowski_sum(const quadix<T, 2>& quadix1,
3484  const quadix<T, 2>& quadix2);
3485 template <typename T>
3486 inline polygon<T, 2> minkowski_sum(const circle<T>& triangle,
3487  const circle<T>& circle);
3488 
3489 template <typename T>
3490 inline polygon<T, 2> minkowski_sum(const triangle<T, 2>& triangle,
3491  const rectangle<T>& rectangle);
3492 template <typename T>
3493 inline polygon<T, 2> minkowski_sum(const triangle<T, 2>& triangle,
3494  const quadix<T, 2>& quadix);
3495 template <typename T>
3496 inline polygon<T, 2> minkowski_sum(const triangle<T, 2>& triangle,
3497  const circle<T>& circle);
3498 template <typename T>
3499 inline polygon<T, 2> minkowski_sum(const quadix<T, 2>& quadix,
3500  const circle<T>& circle);
3501 template <typename T>
3502 inline polygon<T, 2> minkowski_sum(const quadix<T, 2>& quadix,
3503  const rectangle<T>& rectangle);
3504 template <typename T>
3505 inline polygon<T, 2> minkowski_sum(const rectangle<T>& rectangle,
3506  const circle<T>& circle);
3507 template <typename T>
3508 inline polygon<T, 2> minkowski_sum(const polygon<T, 2>& polygon1,
3509  const polygon<T, 2>& polygon2);
3510 
3511 template <typename T>
3512 inline point2d<T> minkowski_difference(const point2d<T>& point1,
3513  const point2d<T>& point2);
3514 template <typename T>
3515 inline polygon<T, 2> minkowski_difference(const rectangle<T>& rectangle1,
3516  const rectangle<T>& rectangle2);
3517 template <typename T>
3518 inline polygon<T, 2> minkowski_difference(const triangle<T, 2>& triangle1,
3519  const triangle<T, 2>& triangle2);
3520 template <typename T>
3521 inline polygon<T, 2> minkowski_difference(const quadix<T, 2>& quadix1,
3522  const quadix<T, 2>& quadix2);
3523 template <typename T>
3524 inline polygon<T, 2> minkowski_difference(const circle<T>& triangle,
3525  const circle<T>& circle);
3526 
3527 template <typename T>
3528 inline polygon<T, 2> minkowski_difference(const triangle<T, 2>& triangle,
3529  const rectangle<T>& rectangle);
3530 template <typename T>
3531 inline polygon<T, 2> minkowski_difference(const triangle<T, 2>& triangle,
3532  const quadix<T, 2>& quadix);
3533 template <typename T>
3534 inline polygon<T, 2> minkowski_difference(const triangle<T, 2>& triangle,
3535  const circle<T>& circle);
3536 template <typename T>
3537 inline polygon<T, 2> minkowski_difference(const quadix<T, 2>& quadix,
3538  const circle<T>& circle);
3539 template <typename T>
3540 inline polygon<T, 2> minkowski_difference(const quadix<T, 2>& quadix,
3541  const rectangle<T>& rectangle);
3542 template <typename T>
3543 inline polygon<T, 2> minkowski_difference(const rectangle<T>& rectangle,
3544  const circle<T>& circle);
3545 template <typename T>
3546 inline polygon<T, 2> minkowski_difference(const polygon<T, 2>& polygon1,
3547  const polygon<T, 2>& polygon2);
3548 
3549 template <typename T>
3550 inline T distance_segment_to_segment(const T& x1, const T& y1, const T& x2,
3551  const T& y2, const T& x3, const T& y3,
3552  const T& x4, const T& y4);
3553 
3554 template <typename T>
3555 inline T distance_segment_to_segment(const T& x1, const T& y1, const T& z1,
3556  const T& x2, const T& y2, const T& z2,
3557  const T& x3, const T& y3, const T& z3,
3558  const T& x4, const T& y4, const T& z4);
3559 
3560 template <typename T>
3561 inline T lay_distance_segment_to_segment(const T& x1, const T& y1, const T& x2,
3562  const T& y2, const T& x3, const T& y3,
3563  const T& x4, const T& y4);
3564 
3565 template <typename T>
3566 inline T lay_distance_segment_to_segment(const T& x1, const T& y1, const T& z1,
3567  const T& x2, const T& y2, const T& z2,
3568  const T& x3, const T& y3, const T& z3,
3569  const T& x4, const T& y4, const T& z4);
3570 
3571 template <typename T>
3572 inline T distance_line_to_line(const T& x1, const T& y1, const T& x2,
3573  const T& y2, const T& x3, const T& y3,
3574  const T& x4, const T& y4);
3575 
3576 template <typename T>
3577 inline T distance_line_to_line(const T& x1, const T& y1, const T& z1,
3578  const T& x2, const T& y2, const T& z2,
3579  const T& x3, const T& y3, const T& z3,
3580  const T& x4, const T& y4, const T& z4);
3581 
3582 template <typename T>
3583 inline T lay_distance_line_to_line(const T& x1, const T& y1, const T& x2,
3584  const T& y2, const T& x3, const T& y3,
3585  const T& x4, const T& y4);
3586 
3587 template <typename T>
3588 inline T lay_distance_line_to_line(const T& x1, const T& y1, const T& z1,
3589  const T& x2, const T& y2, const T& z2,
3590  const T& x3, const T& y3, const T& z3,
3591  const T& x4, const T& y4, const T& z4);
3592 
3593 template <typename T>
3594 inline T lay_distance_from_point_to_circle_center(const point2d<T>& point,
3595  const circle<T>& circle);
3596 
3597 template <typename T>
3598 inline T lay_distance_from_point_to_sphere_center(const point3d<T>& point,
3599  const sphere<T>& sphere);
3600 
3601 template <typename T>
3602 inline T distance_from_point_to_circle_center(const point2d<T>& point,
3603  const circle<T>& circle);
3604 
3605 template <typename T>
3606 inline T distance_from_point_to_sphere_center(const point3d<T>& point,
3607  const sphere<T>& sphere);
3608 
3609 template <typename T>
3610 inline T span_length(const rectangle<T>& rectangle);
3611 
3612 template <typename T>
3613 inline T span_length(const box<T, 3>& box);
3614 
3615 template <typename T>
3616 inline void project_point_t(const T& srcx, const T& srcy, const T& destx,
3617  const T& desty, const T& t, T& nx, T& ny);
3618 
3619 template <typename T>
3620 inline void project_point_t(const T& srcx, const T& srcy, const T& srcz,
3621  const T& destx, const T& desty, const T& destz,
3622  const T& t, T& nx, T& ny, T& nz);
3623 
3624 template <typename T>
3625 inline void project_point(const T& srcx, const T& srcy, const T& destx,
3626  const T& desty, const T& dist, T& nx, T& ny);
3627 
3628 template <typename T>
3629 inline void project_point(const T& srcx, const T& srcy, const T& srcz,
3630  const T& destx, const T& desty, const T& destz,
3631  const T& dist, T& nx, T& ny, T& nz);
3632 
3633 template <typename T>
3634 inline void project_point(const T& px, const T& py, const T& angle,
3635  const T& distance, T& nx, T& ny);
3636 
3637 template <typename T>
3638 inline void project_point0(const T& px, const T& py, const T& distance, T& nx,
3639  T& ny);
3640 template <typename T>
3641 inline void project_point45(const T& px, const T& py, const T& distance, T& nx,
3642  T& ny);
3643 template <typename T>
3644 inline void project_point90(const T& px, const T& py, const T& distance, T& nx,
3645  T& ny);
3646 template <typename T>
3647 inline void project_point135(const T& px, const T& py, const T& distance, T& nx,
3648  T& ny);
3649 template <typename T>
3650 inline void project_point180(const T& px, const T& py, const T& distance, T& nx,
3651  T& ny);
3652 template <typename T>
3653 inline void project_point225(const T& px, const T& py, const T& distance, T& nx,
3654  T& ny);
3655 template <typename T>
3656 inline void project_point270(const T& px, const T& py, const T& distance, T& nx,
3657  T& ny);
3658 template <typename T>
3659 inline void project_point315(const T& px, const T& py, const T& distance, T& nx,
3660  T& ny);
3661 
3662 template <typename T>
3663 inline point2d<T> project_point_t(const point2d<T>& source_point,
3664  const point2d<T>& destination_point,
3665  const T& t);
3666 
3667 template <typename T>
3668 inline point3d<T> project_point_t(const point3d<T>& source_point,
3669  const point3d<T>& destination_point,
3670  const T& t);
3671 
3672 template <typename T>
3673 inline point2d<T> project_point(const point2d<T>& source_point,
3674  const point2d<T>& destination_point,
3675  const T& distance);
3676 
3677 template <typename T>
3678 inline point3d<T> project_point(const point3d<T>& source_point,
3679  const point3d<T>& destination_point,
3680  const T& distance);
3681 
3682 template <typename T>
3683 inline point2d<T> project_point(const point2d<T>& point, const T& angle,
3684  const T& distance);
3685 
3686 template <typename T>
3687 inline point2d<T> project_point0(const point2d<T>& point, const T& distance);
3688 template <typename T>
3689 inline point2d<T> project_point45(const point2d<T>& point, const T& distance);
3690 template <typename T>
3691 inline point2d<T> project_point90(const point2d<T>& point, const T& distance);
3692 template <typename T>
3693 inline point2d<T> project_point135(const point2d<T>& point, const T& distance);
3694 template <typename T>
3695 inline point2d<T> project_point180(const point2d<T>& point, const T& distance);
3696 template <typename T>
3697 inline point2d<T> project_point225(const point2d<T>& point, const T& distance);
3698 template <typename T>
3699 inline point2d<T> project_point270(const point2d<T>& point, const T& distance);
3700 template <typename T>
3701 inline point2d<T> project_point315(const point2d<T>& point, const T& distance);
3702 
3703 template <typename T>
3704 inline point2d<T> project_object(const point2d<T>& point, const T& angle,
3705  const T& distance);
3706 template <typename T>
3707 inline segment<T, 2> project_object(const segment<T, 2>& segment,
3708  const T& angle, const T& distance);
3709 template <typename T>
3710 inline triangle<T, 2> project_object(const triangle<T, 2>& triangle,
3711  const T& angle, const T& distance);
3712 template <typename T>
3713 inline quadix<T, 2> project_object(const quadix<T, 2>& quadix, const T& angle,
3714  const T& distance);
3715 template <typename T>
3716 inline circle<T> project_object(const circle<T>& circle, const T& angle,
3717  const T& distance);
3718 template <typename T>
3719 inline polygon<T, 2> project_object(const polygon<T, 2>& polygon,
3720  const T& angle, const T& distance);
3721 
3722 template <typename T>
3723 inline segment<T, 2> project_onto_axis(const point2d<T>& point,
3724  const line<T, 2>& axis);
3725 template <typename T>
3726 inline segment<T, 2> project_onto_axis(const triangle<T, 2>& triangle,
3727  const line<T, 2>& axis);
3728 template <typename T>
3729 inline segment<T, 2> project_onto_axis(const rectangle<T>& rectangle,
3730  const line<T, 2>& axis);
3731 template <typename T>
3732 inline segment<T, 2> project_onto_axis(const quadix<T, 2>& quadix,
3733  const line<T, 2>& axis);
3734 template <typename T>
3735 inline segment<T, 2> project_onto_axis(const circle<T>& circle,
3736  const line<T, 2>& axis);
3737 template <typename T>
3738 inline segment<T, 2> project_onto_axis(const polygon<T, 2>& polygon,
3739  const line<T, 2>& axis);
3740 
3741 template <typename T>
3742 inline segment<T, 3> project_onto_axis(const point3d<T>& point,
3743  const line<T, 3>& axis);
3744 template <typename T>
3745 inline segment<T, 3> project_onto_axis(const triangle<T, 3>& triangle,
3746  const line<T, 3>& axis);
3747 template <typename T>
3748 inline segment<T, 3> project_onto_axis(const box<T, 3>& box,
3749  const line<T, 3>& axis);
3750 template <typename T>
3751 inline segment<T, 3> project_onto_axis(const quadix<T, 3>& quadix,
3752  const line<T, 3>& axis);
3753 template <typename T>
3754 inline segment<T, 3> project_onto_axis(const sphere<T>& sphere,
3755  const line<T, 3>& axis);
3756 template <typename T>
3757 inline segment<T, 3> project_onto_axis(const polygon<T, 3>& polygon,
3758  const line<T, 3>& axis);
3759 
3760 template <typename T>
3761 inline void calculate_bezier_coefficients(const quadratic_bezier<T, 2>& bezier,
3762  T& ax, T& bx, T& ay, T& by);
3763 template <typename T>
3764 inline void calculate_bezier_coefficients(const quadratic_bezier<T, 3>& bezier,
3765  T& ax, T& bx, T& ay, T& by, T& az,
3766  T& bz);
3767 template <typename T>
3768 inline void calculate_bezier_coefficients(const cubic_bezier<T, 2>& bezier,
3769  T& ax, T& bx, T& cx, T& ay, T& by,
3770  T& cy);
3771 template <typename T>
3772 inline void calculate_bezier_coefficients(const cubic_bezier<T, 3>& bezier,
3773  T& ax, T& bx, T& cx, T& ay, T& by,
3774  T& cy, T& az, T& bz, T& cz);
3775 
3776 template <typename T>
3777 inline void calculate_bezier_coefficients(
3778  const quadratic_bezier<T, 2>& bezier,
3779  bezier_coefficients<T, 2, eQuadraticBezier>& coeffs);
3780 
3781 template <typename T>
3782 inline void calculate_bezier_coefficients(
3783  const quadratic_bezier<T, 3>& bezier,
3784  bezier_coefficients<T, 3, eQuadraticBezier>& coeffs);
3785 
3786 template <typename T>
3787 inline void calculate_bezier_coefficients(
3788  const cubic_bezier<T, 2>& bezier,
3789  bezier_coefficients<T, 2, eCubicBezier>& coeffs);
3790 
3791 template <typename T>
3792 inline void calculate_bezier_coefficients(
3793  const cubic_bezier<T, 3>& bezier,
3794  bezier_coefficients<T, 3, eCubicBezier>& coeffs);
3795 
3796 template <typename T>
3797 inline point2d<T> create_point_on_bezier(const point2d<T>& start_point,
3798  const T& ax, const T& bx, const T& ay,
3799  const T& by, const T& t);
3800 
3801 template <typename T>
3802 inline point3d<T> create_point_on_bezier(const point3d<T>& start_point,
3803  const T& ax, const T& bx, const T& ay,
3804  const T& by, const T& az, const T& bz,
3805  const T& t);
3806 
3807 template <typename T>
3808 inline point2d<T> create_point_on_bezier(const point2d<T>& start_point,
3809  const T& ax, const T& bx, const T& cx,
3810  const T& ay, const T& by, const T& cy,
3811  const T& t);
3812 
3813 template <typename T>
3814 inline point3d<T> create_point_on_bezier(const point3d<T>& start_point,
3815  const T& ax, const T& bx, const T& cx,
3816  const T& ay, const T& by, const T& cy,
3817  const T& az, const T& bz, const T& cz,
3818  const T& t);
3819 
3820 template <typename T>
3821 inline point2d<T> create_point_on_bezier(
3822  const point2d<T>& start_point,
3823  const bezier_coefficients<T, 2, eQuadraticBezier>& coeffs, const T& t);
3824 
3825 template <typename T>
3826 inline point3d<T> create_point_on_bezier(
3827  const point3d<T>& start_point,
3828  const bezier_coefficients<T, 3, eQuadraticBezier>& coeffs, const T& t);
3829 
3830 template <typename T>
3831 inline point2d<T> create_point_on_bezier(
3832  const point2d<T>& start_point,
3833  const bezier_coefficients<T, 2, eCubicBezier>& coeffs, const T& t);
3834 
3835 template <typename T>
3836 inline point3d<T> create_point_on_bezier(
3837  const point3d<T>& start_point,
3838  const bezier_coefficients<T, 3, eCubicBezier>& coeffs, const T& t);
3839 
3840 template <typename T, typename OutputIterator>
3841 inline void generate_bezier(const quadratic_bezier<T, 2>& bezier,
3842  OutputIterator out,
3843  const std::size_t& point_count = 1000);
3844 template <typename T, typename OutputIterator>
3845 inline void generate_bezier(const quadratic_bezier<T, 3>& bezier,
3846  OutputIterator out,
3847  const std::size_t& point_count = 1000);
3848 template <typename T, typename OutputIterator>
3849 inline void generate_bezier(const cubic_bezier<T, 2>& bezier,
3850  OutputIterator out,
3851  const std::size_t& point_count = 1000);
3852 template <typename T, typename OutputIterator>
3853 inline void generate_bezier(const cubic_bezier<T, 3>& bezier,
3854  OutputIterator out,
3855  const std::size_t& point_count = 1000);
3856 
3857 template <typename T>
3858 inline T bezier_curve_length(const quadratic_bezier<T, 2>& bezier,
3859  const std::size_t& point_count);
3860 template <typename T>
3861 inline T bezier_curve_length(const quadratic_bezier<T, 3>& bezier,
3862  const std::size_t& point_count);
3863 template <typename T>
3864 inline T bezier_curve_length(const cubic_bezier<T, 2>& bezier,
3865  const std::size_t& point_count);
3866 template <typename T>
3867 inline T bezier_curve_length(const cubic_bezier<T, 3>& bezier,
3868  const std::size_t& point_count);
3869 
3870 template <typename T>
3871 inline triangle<T, 2> bezier_convex_hull(const quadratic_bezier<T, 2>& bezier);
3872 template <typename T>
3873 inline quadix<T, 2> bezier_convex_hull(const cubic_bezier<T, 2>& bezier);
3874 
3875 template <typename T>
3876 inline segment<T, 2> center_at_location(const segment<T, 2>& segment,
3877  const T& x, const T& y);
3878 template <typename T>
3879 inline segment<T, 3> center_at_location(const segment<T, 3>& segment,
3880  const T& x, const T& y, const T& z);
3881 template <typename T>
3882 inline triangle<T, 2> center_at_location(const triangle<T, 2>& triangle,
3883  const T& x, const T& y);
3884 template <typename T>
3885 inline rectangle<T> center_at_location(const rectangle<T>& rectangle,
3886  const T& x, const T& y);
3887 template <typename T>
3888 inline box<T, 3> center_at_location(const box<T, 3>& box, const T& x,
3889  const T& y, const T& z);
3890 template <typename T>
3891 inline quadix<T, 2> center_at_location(const quadix<T, 2>& quadix, const T& x,
3892  const T& y);
3893 template <typename T>
3894 inline circle<T> center_at_location(const circle<T>& circle, const T& x,
3895  const T& y);
3896 template <typename T>
3897 inline polygon<T, 2> center_at_location(const polygon<T, 2>& polygon,
3898  const T& x, const T& y);
3899 
3900 template <typename T>
3901 inline segment<T, 2> center_at_location(const segment<T, 2>& segment,
3902  const point2d<T>& center_point);
3903 template <typename T>
3904 inline segment<T, 3> center_at_location(const segment<T, 3>& segment,
3905  const point3d<T>& center_point);
3906 template <typename T>
3907 inline triangle<T, 2> center_at_location(const triangle<T, 2>& triangle,
3908  const point2d<T>& center_point);
3909 template <typename T>
3910 inline rectangle<T> center_at_location(const rectangle<T>& rectangle,
3911  const point2d<T>& center_point);
3912 template <typename T>
3913 inline box<T, 3> center_at_location(const box<T, 3>& box,
3914  const point3d<T>& center_point);
3915 template <typename T>
3916 inline quadix<T, 2> center_at_location(const quadix<T, 2>& quadix,
3917  const point2d<T>& center_point);
3918 template <typename T>
3919 inline circle<T> center_at_location(const circle<T>& circle,
3920  const point2d<T>& center_point);
3921 template <typename T>
3922 inline polygon<T, 2> center_at_location(const polygon<T, 2>& polygon,
3923  const point2d<T>& center_point);
3924 
3925 template <typename T>
3926 inline void shorten_segment(T& x1, T& y1, T& x2, T& y2, const T& amount);
3927 template <typename T>
3928 inline void shorten_segment(T& x1, T& y1, T& z1, T& x2, T& y2, T& z2,
3929  const T& amount);
3930 template <typename T>
3931 inline segment<T, 2> shorten_segment(const segment<T, 2>& segment,
3932  const T& amount);
3933 template <typename T>
3934 inline segment<T, 3> shorten_segment(const segment<T, 3>& segment,
3935  const T& amount);
3936 
3937 template <typename T>
3938 inline void lengthen_segment(T& x1, T& y1, T& x2, T& y2, const T& amount);
3939 template <typename T>
3940 inline void lengthen_segment(T& x1, T& y1, T& z1, T& x2, T& y2, T& z2,
3941  const T& amount);
3942 template <typename T>
3943 inline segment<T, 2> lengthen_segment(const segment<T, 2>& segment,
3944  const T& amount);
3945 template <typename T>
3946 inline segment<T, 3> lengthen_segment(const segment<T, 3>& segment,
3947  const T& amount);
3948 
3949 template <typename T>
3950 inline int out_code(const point2d<T>& point, const rectangle<T>& rectangle);
3951 
3952 template <typename T>
3953 inline bool clip(const T& x1, const T& y1, const T& x2, const T& y2,
3954  const T& x3, const T& y3, const T& x4, const T& y4, T& cx1,
3955  T& cy1, T& cx2, T& cy2);
3956 
3957 template <typename T>
3958 inline bool clip(const T& x1, const T& y1, const T& z1, const T& x2,
3959  const T& y2, const T& z2, const T& x3, const T& y3,
3960  const T& z3, const T& x4, const T& y4, const T& z4, T& cx1,
3961  T& cy1, T& cz1, T& cx2, T& cy2, T& cz2);
3962 
3963 template <typename T>
3964 inline bool clip(const segment<T, 2>& src_segment,
3965  const rectangle<T>& rectangle, segment<T, 2>& csegment);
3966 template <typename T>
3967 inline bool clip(const segment<T, 2>& src_segment,
3968  const triangle<T, 2>& triangle, segment<T, 2>& csegment);
3969 template <typename T>
3970 inline bool clip(const segment<T, 2>& src_segment, const quadix<T, 2>& quadix,
3971  segment<T, 2>& csegment);
3972 template <typename T>
3973 inline bool clip(const segment<T, 2>& src_segment, const circle<T>& circle,
3974  segment<T, 2>& csegment);
3975 template <typename T>
3976 inline bool clip(const rectangle<T>& rectangle1, const rectangle<T>& rectangle2,
3977  rectangle<T>& crectangle);
3978 template <typename T>
3979 inline bool clip(const box<T, 3>& box1, const box<T, 3>& box2, box<T, 3>& cbox);
3980 
3981 template <typename T>
3982 inline T area(const point2d<T>& point1, const point2d<T>& point2,
3983  const point2d<T>& point3);
3984 template <typename T>
3985 inline T area(const point3d<T>& point1, const point3d<T>& point2,
3986  const point3d<T>& point3);
3987 template <typename T>
3988 inline T area(const triangle<T, 2>& triangle);
3989 template <typename T>
3990 inline T area(const triangle<T, 3>& triangle);
3991 template <typename T>
3992 inline T area(const quadix<T, 2>& quadix);
3993 template <typename T>
3994 inline T area(const quadix<T, 3>& quadix);
3995 template <typename T>
3996 inline T area(const rectangle<T>& rectangle);
3997 template <typename T>
3998 inline T area(const circle<T>& circle);
3999 template <typename T>
4000 inline T area(const polygon<T, 2>& polygon);
4001 
4002 template <typename T>
4003 inline T perimeter(const point2d<T>& point1, const point2d<T>& point2,
4004  const point2d<T>& point3);
4005 template <typename T>
4006 inline T perimeter(const point3d<T>& point1, const point3d<T>& point2,
4007  const point3d<T>& point3);
4008 template <typename T>
4009 inline T perimeter(const triangle<T, 2>& triangle);
4010 template <typename T>
4011 inline T perimeter(const triangle<T, 3>& triangle);
4012 template <typename T>
4013 inline T perimeter(const quadix<T, 2>& quadix);
4014 template <typename T>
4015 inline T perimeter(const quadix<T, 3>& quadix);
4016 template <typename T>
4017 inline T perimeter(const rectangle<T>& rectangle);
4018 template <typename T>
4019 inline T perimeter(const circle<T>& circle);
4020 template <typename T>
4021 inline T perimeter(const polygon<T, 2>& polygon);
4022 
4023 template <typename T>
4024 inline void rotate(const T& rotation_angle, const T& x, const T& y, T& nx,
4025  T& ny);
4026 template <typename T>
4027 inline void rotate(const T& rotation_angle, const T& x, const T& y, const T& ox,
4028  const T& oy, T& nx, T& ny);
4029 
4030 template <typename T>
4031 inline point2d<T> rotate(const T& rotation_angle, const point2d<T>& point);
4032 template <typename T>
4033 inline point2d<T> rotate(const T& rotation_angle, const point2d<T>& point,
4034  const point2d<T>& opoint);
4035 
4036 template <typename T>
4037 inline segment<T, 2> rotate(const T& rotation_angle,
4038  const segment<T, 2>& segment);
4039 template <typename T>
4040 inline segment<T, 2> rotate(const T& rotation_angle,
4041  const segment<T, 2>& segment,
4042  const point2d<T>& opoint);
4043 
4044 template <typename T>
4045 inline triangle<T, 2> rotate(const T& rotation_angle,
4046  const triangle<T, 2>& triangle);
4047 template <typename T>
4048 inline triangle<T, 2> rotate(const T& rotation_angle,
4049  const triangle<T, 2>& triangle,
4050  const point2d<T>& opoint);
4051 
4052 template <typename T>
4053 inline quadix<T, 2> rotate(const T& rotation_angle, const quadix<T, 2>& quadix);
4054 template <typename T>
4055 inline quadix<T, 2> rotate(const T& rotation_angle, const quadix<T, 2>& quadix,
4056  const point2d<T>& opoint);
4057 
4058 template <typename T>
4059 inline polygon<T, 2> rotate(const T& rotation_angle,
4060  const polygon<T, 2>& polygon);
4061 template <typename T>
4062 inline polygon<T, 2> rotate(const T& rotation_angle,
4063  const polygon<T, 2>& polygon,
4064  const point2d<T>& opoint);
4065 
4066 template <typename T>
4067 inline void fast_rotate(const trig_luts<T>& lut, const int rotation_angle,
4068  const T& x, const T& y, T& nx, T& ny);
4069 
4070 template <typename T>
4071 inline void fast_rotate(const trig_luts<T>& lut, const int rotation_angle,
4072  const T& x, const T& y, const T& ox, const T& oy, T& nx,
4073  T& ny);
4074 
4075 template <typename T>
4076 inline point2d<T> fast_rotate(const trig_luts<T>& lut, const int rotation_angle,
4077  const point2d<T>& point);
4078 template <typename T>
4079 inline point2d<T> fast_rotate(const trig_luts<T>& lut, const int rotation_angle,
4080  const point2d<T>& point,
4081  const point2d<T>& opoint);
4082 
4083 template <typename T>
4084 inline segment<T, 2> fast_rotate(const trig_luts<T>& lut,
4085  const int rotation_angle,
4086  const segment<T, 2>& segment);
4087 template <typename T>
4088 inline segment<T, 2> fast_rotate(const trig_luts<T>& lut,
4089  const int rotation_angle,
4090  const segment<T, 2>& segment,
4091  const point2d<T>& opoint);
4092 
4093 template <typename T>
4094 inline triangle<T, 2> fast_rotate(const trig_luts<T>& lut,
4095  const int rotation_angle,
4096  const triangle<T, 2>& triangle);
4097 template <typename T>
4098 inline triangle<T, 2> fast_rotate(const trig_luts<T>& lut,
4099  const int rotation_angle,
4100  const triangle<T, 2>& triangle,
4101  const point2d<T>& opoint);
4102 
4103 template <typename T>
4104 inline quadix<T, 2> fast_rotate(const trig_luts<T>& lut,
4105  const int rotation_angle,
4106  const quadix<T, 2>& quadix);
4107 template <typename T>
4108 inline quadix<T, 2> fast_rotate(const trig_luts<T>& lut,
4109  const int rotation_angle,
4110  const quadix<T, 2>& quadix,
4111  const point2d<T>& opoint);
4112 
4113 template <typename T>
4114 inline polygon<T, 2> fast_rotate(const trig_luts<T>& lut,
4115  const int rotation_angle,
4116  const polygon<T, 2>& polygon);
4117 template <typename T>
4118 inline polygon<T, 2> fast_rotate(const trig_luts<T>& lut,
4119  const int rotation_angle,
4120  const polygon<T, 2>& polygon,
4121  const point2d<T>& opoint);
4122 
4123 template <typename T>
4124 inline void fast_rotate(const trig_luts<T>& lut, const int rx, const int ry,
4125  const int rz, const T& x, const T& y, const T& z, T& nx,
4126  T& ny, T& nz);
4127 
4128 template <typename T>
4129 inline void fast_rotate(const trig_luts<T>& lut, const int rx, const int ry,
4130  const int rz, const T& x, const T& y, const T& z,
4131  const T& ox, const T& oy, const T& oz, T& nx, T& ny,
4132  T& nz);
4133 
4134 template <typename T>
4135 inline point3d<T> fast_rotate(const trig_luts<T>& lut, const int rx,
4136  const int ry, const int rz,
4137  const point3d<T>& point);
4138 template <typename T>
4139 inline point3d<T> fast_rotate(const trig_luts<T>& lut, const int rx,
4140  const int ry, const int rz,
4141  const point3d<T>& point,
4142  const point3d<T>& opoint);
4143 
4144 template <typename T>
4145 inline segment<T, 3> fast_rotate(const trig_luts<T>& lut, const int rx,
4146  const int ry, const int rz,
4147  const segment<T, 3>& segment);
4148 template <typename T>
4149 inline segment<T, 3> fast_rotate(const trig_luts<T>& lut, const int rx,
4150  const int ry, const int rz,
4151  const segment<T, 3>& segment,
4152  const point3d<T>& opoint);
4153 
4154 template <typename T>
4155 inline triangle<T, 3> fast_rotate(const trig_luts<T>& lut, const int rx,
4156  const int ry, const int rz,
4157  const triangle<T, 3>& triangle);
4158 template <typename T>
4159 inline triangle<T, 3> fast_rotate(const trig_luts<T>& lut, const int rx,
4160  const int ry, const int rz,
4161  const triangle<T, 3>& triangle,
4162  const point3d<T>& opoint);
4163 
4164 template <typename T>
4165 inline quadix<T, 3> fast_rotate(const trig_luts<T>& lut, const int rx,
4166  const int ry, const int rz,
4167  const quadix<T, 3>& quadix);
4168 template <typename T>
4169 inline quadix<T, 3> fast_rotate(const trig_luts<T>& lut, const int rx,
4170  const int ry, const int rz,
4171  const quadix<T, 3>& quadix,
4172  const point3d<T>& opoint);
4173 
4174 template <typename T>
4175 inline polygon<T, 3> fast_rotate(const trig_luts<T>& lut, const int rx,
4176  const int ry, const int rz,
4177  const polygon<T, 3>& polygon);
4178 template <typename T>
4179 inline polygon<T, 3> fast_rotate(const trig_luts<T>& lut, const int rx,
4180  const int ry, const int rz,
4181  const polygon<T, 3>& polygon,
4182  const point3d<T>& opoint);
4183 
4184 template <typename T>
4185 inline point2d<T> translate(const T& dx, const T& dy, const point2d<T>& point);
4186 template <typename T>
4187 inline line<T, 2> translate(const T& dx, const T& dy, const line<T, 2>& line);
4188 template <typename T>
4189 inline segment<T, 2> translate(const T& dx, const T& dy,
4190  const segment<T, 2>& segment);
4191 template <typename T>
4192 inline triangle<T, 2> translate(const T& dx, const T& dy,
4193  const triangle<T, 2>& triangle);
4194 template <typename T>
4195 inline quadix<T, 2> translate(const T& dx, const T& dy,
4196  const quadix<T, 2>& quadix);
4197 template <typename T>
4198 inline rectangle<T> translate(const T& dx, const T& dy,
4199  const rectangle<T>& rectangle);
4200 template <typename T>
4201 inline circle<T> translate(const T& dx, const T& dy, const circle<T>& circle);
4202 template <typename T>
4203 inline polygon<T, 2> translate(const T& dx, const T& dy,
4204  const polygon<T, 2>& polygon);
4205 
4206 template <typename T>
4207 inline point2d<T> translate(const T& delta, const point2d<T>& point);
4208 template <typename T>
4209 inline line<T, 2> translate(const T& delta, const line<T, 2>& line);
4210 template <typename T>
4211 inline segment<T, 2> translate(const T& delta, const segment<T, 2>& segment);
4212 template <typename T>
4213 inline triangle<T, 2> translate(const T& delta, const triangle<T, 2>& triangle);
4214 template <typename T>
4215 inline quadix<T, 2> translate(const T& delta, const quadix<T, 2>& quadix);
4216 template <typename T>
4217 inline rectangle<T> translate(const T& delta, const rectangle<T>& rectangle);
4218 template <typename T>
4219 inline circle<T> translate(const T& delta, const circle<T>& circle);
4220 template <typename T>
4221 inline polygon<T, 2> translate(const T& delta, const polygon<T, 2>& polygon);
4222 
4223 template <typename T>
4224 inline point2d<T> translate(const vector2d<T>& v, const point2d<T>& point);
4225 template <typename T>
4226 inline line<T, 2> translate(const vector2d<T>& v, const line<T, 2>& line);
4227 template <typename T>
4228 inline segment<T, 2> translate(const vector2d<T>& v,
4229  const segment<T, 2>& segment);
4230 template <typename T>
4231 inline triangle<T, 2> translate(const vector2d<T>& v,
4232  const triangle<T, 2>& triangle);
4233 template <typename T>
4234 inline quadix<T, 2> translate(const vector2d<T>& v, const quadix<T, 2>& quadix);
4235 template <typename T>
4236 inline rectangle<T> translate(const vector2d<T>& v,
4237  const rectangle<T>& rectangle);
4238 template <typename T>
4239 inline circle<T> translate(const vector2d<T>& v, const circle<T>& circle);
4240 template <typename T>
4241 inline polygon<T, 2> translate(const vector2d<T>& v,
4242  const polygon<T, 2>& polygon);
4243 
4244 template <typename T>
4245 inline point3d<T> translate(const T& dx, const T& dy, const T& dz,
4246  const point3d<T>& point);
4247 template <typename T>
4248 inline line<T, 3> translate(const T& dx, const T& dy, const T& dz,
4249  const line<T, 3>& line);
4250 template <typename T>
4251 inline segment<T, 3> translate(const T& dx, const T& dy, const T& dz,
4252  const segment<T, 3>& segment);
4253 template <typename T>
4254 inline triangle<T, 3> translate(const T& dx, const T& dy, const T& dz,
4255  const triangle<T, 3>& triangle);
4256 template <typename T>
4257 inline quadix<T, 3> translate(const T& dx, const T& dy, const T& dz,
4258  const quadix<T, 3>& quadix);
4259 template <typename T>
4260 inline box<T, 3> translate(const T& dx, const T& dy, const T& dz,
4261  const box<T, 3>& box);
4262 template <typename T>
4263 inline sphere<T> translate(const T& dx, const T& dy, const T& dz,
4264  const sphere<T>& sphere);
4265 template <typename T>
4266 inline polygon<T, 3> translate(const T& dx, const T& dy, const T& dz,
4267  const polygon<T, 3>& polygon);
4268 
4269 template <typename T>
4270 inline point3d<T> translate(const T& delta, const point3d<T>& point);
4271 template <typename T>
4272 inline line<T, 3> translate(const T& delta, const line<T, 3>& line);
4273 template <typename T>
4274 inline segment<T, 3> translate(const T& delta, const segment<T, 3>& segment);
4275 template <typename T>
4276 inline triangle<T, 3> translate(const T& delta, const triangle<T, 3>& triangle);
4277 template <typename T>
4278 inline quadix<T, 3> translate(const T& delta, const quadix<T, 3>& quadix);
4279 template <typename T>
4280 inline box<T, 3> translate(const T& delta, const box<T, 3>& box);
4281 template <typename T>
4282 inline sphere<T> translate(const T& delta, const sphere<T>& sphere);
4283 template <typename T>
4284 inline polygon<T, 3> translate(const T& delta, const polygon<T, 3>& polygon);
4285 
4286 template <typename T>
4287 inline point3d<T> translate(const vector3d<T>& v, const point3d<T>& point);
4288 template <typename T>
4289 inline line<T, 3> translate(const vector3d<T>& v, const line<T, 3>& line);
4290 template <typename T>
4291 inline segment<T, 3> translate(const vector3d<T>& v,
4292  const segment<T, 3>& segment);
4293 template <typename T>
4294 inline triangle<T, 3> translate(const vector3d<T>& v,
4295  const triangle<T, 3>& triangle);
4296 template <typename T>
4297 inline quadix<T, 3> translate(const vector3d<T>& v, const quadix<T, 3>& quadix);
4298 template <typename T>
4299 inline box<T, 3> translate(const vector3d<T>& v, const box<T, 3>& box);
4300 template <typename T>
4301 inline sphere<T> translate(const vector3d<T>& v, const sphere<T>& sphere);
4302 template <typename T>
4303 inline polygon<T, 3> translate(const vector3d<T>& v,
4304  const polygon<T, 3>& polygon);
4305 
4306 template <typename T>
4307 inline point2d<T> scale(const T& dx, const T& dy, const point2d<T>& point);
4308 template <typename T>
4309 inline line<T, 2> scale(const T& dx, const T& dy, const line<T, 2>& line);
4310 template <typename T>
4311 inline segment<T, 2> scale(const T& dx, const T& dy,
4312  const segment<T, 2>& segment);
4313 template <typename T>
4314 inline triangle<T, 2> scale(const T& dx, const T& dy,
4315  const triangle<T, 2>& triangle);
4316 template <typename T>
4317 inline quadix<T, 2> scale(const T& dx, const T& dy, const quadix<T, 2>& quadix);
4318 template <typename T>
4319 inline rectangle<T> scale(const T& dx, const T& dy,
4320  const rectangle<T>& rectangle);
4321 template <typename T>
4322 inline circle<T> scale(const T& dr, const circle<T>& circle);
4323 template <typename T>
4324 inline polygon<T, 2> scale(const T& dx, const T& dy,
4325  const polygon<T, 2>& polygon);
4326 
4327 template <typename T>
4328 inline point3d<T> scale(const T& dx, const T& dy, const T& dz,
4329  const point3d<T>& point);
4330 template <typename T>
4331 inline line<T, 3> scale(const T& dx, const T& dy, const T& dz,
4332  const line<T, 3>& line);
4333 template <typename T>
4334 inline segment<T, 3> scale(const T& dx, const T& dy, const T& dz,
4335  const segment<T, 3>& segment);
4336 template <typename T>
4337 inline triangle<T, 3> scale(const T& dx, const T& dy, const T& dz,
4338  const triangle<T, 3>& triangle);
4339 template <typename T>
4340 inline quadix<T, 3> scale(const T& dx, const T& dy, const T& dz,
4341  const quadix<T, 3>& quadix);
4342 template <typename T>
4343 inline box<T, 3> scale(const T& dx, const T& dy, const T& dz,
4344  const box<T, 3>& box);
4345 template <typename T>
4346 inline sphere<T> scale(const T& dr, const sphere<T>& sphere);
4347 template <typename T>
4348 inline polygon<T, 3> scale(const T& dx, const T& dy, const T& dz,
4349  const polygon<T, 3>& polygon);
4350 
4351 template <typename T>
4352 inline rectangle<T> aabb(const segment<T, 2>& segment);
4353 template <typename T>
4354 inline rectangle<T> aabb(const triangle<T, 2>& triangle);
4355 template <typename T>
4356 inline rectangle<T> aabb(const rectangle<T>& rectangle);
4357 template <typename T>
4358 inline rectangle<T> aabb(const quadix<T, 2>& quadix);
4359 template <typename T>
4360 inline rectangle<T> aabb(const circle<T>& circle);
4361 template <typename T>
4362 inline rectangle<T> aabb(const polygon<T, 2>& polygon);
4363 
4364 template <typename T>
4365 inline void aabb(const segment<T, 2>& segment, T& x1, T& y1, T& x2, T& y2);
4366 template <typename T>
4367 inline void aabb(const triangle<T, 2>& triangle, T& x1, T& y1, T& x2, T& y2);
4368 template <typename T>
4369 inline void aabb(const rectangle<T>& rectangle, T& x1, T& y1, T& x2, T& y2);
4370 template <typename T>
4371 inline void aabb(const quadix<T, 2>& quadix, T& x1, T& y1, T& x2, T& y2);
4372 template <typename T>
4373 inline void aabb(const circle<T>& circle, T& x1, T& y1, T& x2, T& y2);
4374 template <typename T>
4375 inline void aabb(const polygon<T, 2>& polygon, T& x1, T& y1, T& x2, T& y2);
4376 
4377 template <typename T>
4378 inline box<T, 3> aabb(const segment<T, 3>& segment);
4379 template <typename T>
4380 inline box<T, 3> aabb(const triangle<T, 3>& triangle);
4381 template <typename T>
4382 inline box<T, 3> aabb(const box<T, 3>& rectangle);
4383 template <typename T>
4384 inline box<T, 3> aabb(const quadix<T, 3>& quadix);
4385 template <typename T>
4386 inline box<T, 3> aabb(const sphere<T>& sphere);
4387 template <typename T>
4388 inline box<T, 3> aabb(const polygon<T, 3>& polygon);
4389 
4390 template <typename T>
4391 inline void aabb(const segment<T, 3>& segment, T& x1, T& y1, T& z1, T& x2,
4392  T& y2, T& z2);
4393 template <typename T>
4394 inline void aabb(const triangle<T, 3>& triangle, T& x1, T& y1, T& z1, T& x2,
4395  T& y2, T& z2);
4396 template <typename T>
4397 inline void aabb(const box<T, 3>& box, T& x1, T& y1, T& z1, T& x2, T& y2,
4398  T& z2);
4399 template <typename T>
4400 inline void aabb(const quadix<T, 3>& quadix, T& x1, T& y1, T& z1, T& x2, T& y2,
4401  T& z2);
4402 template <typename T>
4403 inline void aabb(const sphere<T>& sphere, T& x1, T& y1, T& z1, T& x2, T& y2,
4404  T& z2);
4405 template <typename T>
4406 inline void aabb(const polygon<T, 3>& polygon, T& x1, T& y1, T& z1, T& x2,
4407  T& y2, T& z2);
4408 
4409 template <typename T>
4410 inline rectangle<T> update_rectangle(const rectangle<T>& rectangle,
4411  point2d<T>& point);
4412 template <typename T>
4413 inline box<T, 3> update_box(const box<T, 3>& box, point3d<T>& point);
4414 template <typename T>
4415 inline circle<T> update_circle(const circle<T>& circle, point2d<T>& point);
4416 template <typename T>
4417 inline sphere<T> update_sphere(const sphere<T>& sphere, point3d<T>& point);
4418 
4419 template <typename T>
4420 inline point2d<T> generate_point_on_segment(const segment<T, 2>& segment,
4421  const T& t);
4422 template <typename T>
4423 inline point3d<T> generate_point_on_segment(const segment<T, 3>& segment,
4424  const T& t);
4425 template <typename T>
4426 inline point2d<T> generate_point_on_ray(const ray<T, 2>& ray, const T& t);
4427 template <typename T>
4428 inline point3d<T> generate_point_on_ray(const ray<T, 3>& ray, const T& t);
4429 
4430 template <typename T>
4431 inline T generate_random_value(const T& range);
4432 
4433 template <typename T>
4434 inline point2d<T> generate_random_point(const T& dx, const T& dy);
4435 template <typename T>
4436 inline point3d<T> generate_random_point(const T& dx, const T& dy, const T& dz);
4437 template <typename T>
4438 inline point2d<T> generate_random_point(const segment<T, 2>& segment);
4439 template <typename T>
4440 inline point3d<T> generate_random_point(const segment<T, 3>& segment);
4441 template <typename T>
4442 inline point2d<T> generate_random_point(const triangle<T, 2>& triangle);
4443 template <typename T>
4444 inline point3d<T> generate_random_point(const triangle<T, 3>& triangle);
4445 template <typename T>
4446 inline point2d<T> generate_random_point(const quadix<T, 2>& quadix);
4447 template <typename T>
4448 inline point3d<T> generate_random_point(const quadix<T, 3>& quadix);
4449 template <typename T>
4450 inline point2d<T> generate_random_point(const rectangle<T>& rectangle);
4451 template <typename T>
4452 inline point3d<T> generate_random_point(const box<T, 3>& box);
4453 
4454 template <typename T, typename OutputIterator>
4455 inline void generate_random_points(const T& x1, const T& y1, const T& x2,
4456  const T& y2, const std::size_t& point_count,
4457  OutputIterator out);
4458 template <typename T, typename OutputIterator>
4459 inline void generate_random_points(const T& x1, const T& y1, const T& z1,
4460  const T& x2, const T& y2, const T& z2,
4461  const std::size_t& point_count,
4462  OutputIterator out);
4463 template <typename T, typename OutputIterator>
4464 inline void generate_random_points(const rectangle<T>& rectangle,
4465  const std::size_t& point_count,
4466  OutputIterator out);
4467 template <typename T, typename OutputIterator>
4468 inline void generate_random_points(const box<T, 3>& box,
4469  const std::size_t& point_count,
4470  OutputIterator out);
4471 template <typename T, typename OutputIterator>
4472 inline void generate_random_points(const segment<T, 2>& segment,
4473  const std::size_t& point_count,
4474  OutputIterator out);
4475 template <typename T, typename OutputIterator>
4476 inline void generate_random_points(const segment<T, 3>& segment,
4477  const std::size_t& point_count,
4478  OutputIterator out);
4479 template <typename T, typename OutputIterator>
4480 inline void generate_random_points(const triangle<T, 2>& triangle,
4481  const std::size_t& point_count,
4482  OutputIterator out);
4483 template <typename T, typename OutputIterator>
4484 inline void generate_random_points(const triangle<T, 3>& triangle,
4485  const std::size_t& point_count,
4486  OutputIterator out);
4487 template <typename T, typename OutputIterator>
4488 inline void generate_random_points(const quadix<T, 2>& quadix,
4489  const std::size_t& point_count,
4490  OutputIterator out);
4491 template <typename T, typename OutputIterator>
4492 inline void generate_random_points(const quadix<T, 3>& quadix,
4493  const std::size_t& point_count,
4494  OutputIterator out);
4495 template <typename T, typename OutputIterator>
4496 inline void generate_random_points(const circle<T>& circle,
4497  const std::size_t& point_count,
4498  OutputIterator out);
4499 
4500 template <typename T>
4501 inline void generate_random_object(const T& x1, const T& y1, const T& x2,
4502  const T& y2, segment<T, 2>& segment);
4503 template <typename T>
4504 inline void generate_random_object(const T& x1, const T& y1, const T& x2,
4505  const T& y2, rectangle<T>& rectangle);
4506 template <typename T>
4507 inline void generate_random_object(const T& x1, const T& y1, const T& x2,
4508  const T& y2, triangle<T, 2>& triangle);
4509 template <typename T>
4510 inline void generate_random_object(const T& x1, const T& y1, const T& x2,
4511  const T& y2, quadix<T, 2>& quadix);
4512 template <typename T>
4513 inline void generate_random_object(const T& x1, const T& y1, const T& x2,
4514  const T& y2, circle<T>& circle);
4515 template <typename T>
4516 inline void generate_random_object(const T& x1, const T& y1, const T& z1,
4517  const T& x2, const T& y2, const T& z2,
4518  box<T, 3>& box);
4519 
4520 template <typename T>
4521 inline triangle<T, 2> right_shift(const triangle<T, 2>& triangle,
4522  const std::size_t& shift);
4523 
4524 template <typename T>
4525 inline triangle<T, 3> right_shift(const triangle<T, 3>& triangle,
4526  const std::size_t& shift);
4527 
4528 template <typename T>
4529 inline quadix<T, 2> right_shift(const quadix<T, 2>& quadix,
4530  const std::size_t& shift);
4531 
4532 template <typename T>
4533 inline quadix<T, 3> right_shift(const quadix<T, 3>& quadix,
4534  const std::size_t& shift);
4535 
4536 template <typename T>
4537 inline T vector_norm(const vector2d<T>& v);
4538 template <typename T>
4539 inline T vector_norm(const vector3d<T>& v);
4540 
4541 template <typename T>
4542 inline vector2d<T> normalize(const vector2d<T>& v);
4543 template <typename T>
4544 inline vector3d<T> normalize(const vector3d<T>& v);
4545 
4546 template <typename T>
4547 inline vector2d<T> perpendicular(const vector2d<T>& v);
4548 template <typename T>
4549 inline vector3d<T> perpendicular(const vector3d<T>& v);
4550 
4551 template <typename T>
4552 inline vector2d<T> operator+(const vector2d<T>& v1, const vector2d<T>& v2);
4553 template <typename T>
4554 inline vector3d<T> operator+(const vector3d<T>& v1, const vector3d<T>& v2);
4555 
4556 template <typename T>
4557 inline vector2d<T> operator-(const vector2d<T>& v1, const vector2d<T>& v2);
4558 template <typename T>
4559 inline vector3d<T> operator-(const vector3d<T>& v1, const vector3d<T>& v2);
4560 
4561 template <typename T>
4562 inline T operator*(const vector2d<T>& v1, const vector2d<T>& v2);
4563 template <typename T>
4564 inline vector3d<T> operator*(const vector3d<T>& v1, const vector3d<T>& v2);
4565 
4566 template <typename T>
4567 inline T dot_product(const vector2d<T>& v1, const vector2d<T>& v2);
4568 template <typename T>
4569 inline T dot_product(const vector3d<T>& v1, const vector3d<T>& v2);
4570 
4571 template <typename T>
4572 inline T perpendicular_product(const vector2d<T>& v1, const vector2d<T>& v2);
4573 template <typename T>
4574 inline T triple_product(const vector3d<T>& v1, const vector3d<T>& v2,
4575  const vector3d<T>& v3);
4576 
4577 template <typename T>
4578 inline vector2d<T> operator*(const vector2d<T>& v1, const T& scale);
4579 template <typename T>
4580 inline vector3d<T> operator*(const vector3d<T>& v1, const T& scale);
4581 template <typename T>
4582 inline vector2d<T> operator*(const T& scale, const vector2d<T>& v1);
4583 template <typename T>
4584 inline vector3d<T> operator*(const T& scale, const vector3d<T>& v1);
4585 
4586 template <typename T>
4587 inline vector2d<T> operator/(const vector2d<T>& v1, const T& scale);
4588 template <typename T>
4589 inline vector3d<T> operator/(const vector3d<T>& v1, const T& scale);
4590 
4591 template <typename T>
4592 inline point2d<T> operator*(const point2d<T>& point, const T& scale);
4593 template <typename T>
4594 inline point3d<T> operator*(const point3d<T>& point, const T& scale);
4595 template <typename T>
4596 inline point2d<T> operator*(const T& scale, const point2d<T>& point);
4597 template <typename T>
4598 inline point3d<T> operator*(const T& scale, const point3d<T>& point);
4599 
4600 template <typename T>
4601 inline point2d<T> operator+(const point2d<T>& point, const vector2d<T>& v);
4602 template <typename T>
4603 inline point2d<T> operator+(const vector2d<T>& v, const point2d<T>& point);
4604 
4605 template <typename T>
4606 inline point3d<T> operator+(const point3d<T>& point, const vector3d<T>& v);
4607 template <typename T>
4608 inline point3d<T> operator+(const vector3d<T>& v, const point3d<T>& point);
4609 
4610 template <typename T>
4611 inline vector2d<T> operator-(const point2d<T>& p1, const point2d<T>& p2);
4612 template <typename T>
4613 inline vector3d<T> operator-(const point3d<T>& p1, const point3d<T>& p2);
4614 
4615 template <typename T>
4616 inline point2d<T> operator+(const point2d<T>& p1, const point2d<T>& p2);
4617 template <typename T>
4618 inline point3d<T> operator+(const point3d<T>& p1, const point3d<T>& p2);
4619 
4620 template <typename T>
4621 inline bool is_equal(const T& val1, const T& val2, const T& epsilon);
4622 template <typename T>
4623 inline bool is_equal(const point2d<T>& point1, const point2d<T>& point2,
4624  const T& epsilon);
4625 template <typename T>
4626 inline bool is_equal(const point3d<T>& point1, const point3d<T>& point2,
4627  const T& epsilon);
4628 
4629 template <typename T>
4630 inline bool is_equal(const T& val1, const T& val2);
4631 template <typename T>
4632 inline bool is_equal(const point2d<T>& point1, const point2d<T>& point2);
4633 template <typename T>
4634 inline bool is_equal(const point3d<T>& point1, const point3d<T>& point2);
4635 
4636 template <typename T>
4637 inline bool is_equal(const rectangle<T>& rectangle1,
4638  const rectangle<T>& rectangle2);
4639 template <typename T>
4640 inline bool is_equal(const circle<T>& circle1, const circle<T>& circle2);
4641 
4642 template <typename T>
4643 inline bool is_equal(const box<T, 3>& box1, const box<T, 3>& box2);
4644 template <typename T>
4645 inline bool is_equal(const sphere<T>& sphere1, const sphere<T>& sphere2);
4646 
4647 template <typename T>
4648 inline bool not_equal(const T& val1, const T& val2, const T& epsilon);
4649 template <typename T>
4650 inline bool not_equal(const point2d<T>& point1, const point2d<T>& point2,
4651  const T& epsilon);
4652 template <typename T>
4653 inline bool not_equal(const point3d<T>& point1, const point3d<T>& point2,
4654  const T& epsilon);
4655 
4656 template <typename T>
4657 inline bool not_equal(const T& val1, const T& val2);
4658 template <typename T>
4659 inline bool not_equal(const point2d<T>& point1, const point2d<T>& point2);
4660 template <typename T>
4661 inline bool not_equal(const point3d<T>& point1, const point3d<T>& point2);
4662 
4663 template <typename T>
4664 inline bool not_equal(const rectangle<T>& rectangle1,
4665  const rectangle<T>& rectangle2);
4666 template <typename T>
4667 inline bool not_equal(const circle<T>& circle1, const circle<T>& circle2);
4668 
4669 template <typename T>
4670 inline bool not_equal(const box<T, 3>& box1, const box<T, 3>& box2);
4671 template <typename T>
4672 inline bool not_equal(const sphere<T>& sphere1, const sphere<T>& sphere2);
4673 
4674 template <typename T>
4675 inline bool less_than_or_equal(const T& val1, const T& val2, const T& epsilon);
4676 template <typename T>
4677 inline bool less_than_or_equal(const T& val1, const T& val2);
4678 
4679 template <typename T>
4680 inline bool greater_than_or_equal(const T& val1, const T& val2,
4681  const T& epsilon);
4682 template <typename T>
4683 inline bool greater_than_or_equal(const T& val1, const T& val2);
4684 
4685 template <typename T>
4686 inline bool operator<(const point2d<T>& point1, const point2d<T>& point2);
4687 template <typename T>
4688 inline bool operator<(const point3d<T>& point1, const point3d<T>& point2);
4689 template <typename T>
4690 inline bool operator>(const point2d<T>& point1, const point2d<T>& point2);
4691 template <typename T>
4692 inline bool operator>(const point3d<T>& point1, const point3d<T>& point2);
4693 
4694 template <typename T>
4695 inline bool operator==(const point2d<T>& point1, const point2d<T>& point2);
4696 template <typename T>
4697 inline bool operator==(const point3d<T>& point1, const point3d<T>& point2);
4698 
4699 template <typename T>
4700 inline bool is_degenerate(const T& x1, const T& y1, const T& x2, const T& y2);
4701 template <typename T>
4702 inline bool is_degenerate(const segment<T, 2>& segment);
4703 template <typename T>
4704 inline bool is_degenerate(const line<T, 2>& line);
4705 
4706 template <typename T>
4707 inline bool is_degenerate(const T& x1, const T& y1, const T& z1, const T& x2,
4708  const T& y2, const T& z2);
4709 template <typename T>
4710 inline bool is_degenerate(const segment<T, 3>& segment);
4711 template <typename T>
4712 inline bool is_degenerate(const line<T, 3>& line);
4713 
4714 template <typename T>
4715 inline bool is_degenerate(const triangle<T, 2>& triangle);
4716 template <typename T>
4717 inline bool is_degenerate(const triangle<T, 3>& triangle);
4718 
4719 template <typename T>
4720 inline bool is_degenerate(const quadix<T, 2>& quadix);
4721 template <typename T>
4722 inline bool is_degenerate(const quadix<T, 3>& quadix);
4723 
4724 template <typename T>
4725 inline bool is_degenerate(const rectangle<T>& rectangle);
4726 template <typename T>
4727 inline bool is_degenerate(const circle<T>& circle);
4728 template <typename T>
4729 inline bool is_degenerate(const sphere<T>& sphere);
4730 template <typename T>
4731 inline bool is_degenerate(const circular_arc<T>& arc);
4732 
4733 template <typename T>
4734 inline point2d<T> degenerate_point2d();
4735 template <typename T>
4736 inline point3d<T> degenerate_point3d();
4737 template <typename T>
4738 inline vector2d<T> degenerate_vector2d();
4739 template <typename T>
4740 inline vector3d<T> degenerate_vector3d();
4741 template <typename T>
4742 inline ray<T, 2> degenerate_ray2d();
4743 template <typename T>
4744 inline ray<T, 3> degenerate_ray3d();
4745 template <typename T>
4746 inline line<T, 2> degenerate_line2d();
4747 template <typename T>
4748 inline line<T, 3> degenerate_line3d();
4749 template <typename T>
4750 inline segment<T, 2> degenerate_segment2d();
4751 template <typename T>
4752 inline segment<T, 3> degenerate_segment3d();
4753 template <typename T>
4754 inline triangle<T, 2> degenerate_triangle2d();
4755 template <typename T>
4756 inline triangle<T, 3> degenerate_triangle3d();
4757 template <typename T>
4758 inline quadix<T, 2> degenerate_quadix2d();
4759 template <typename T>
4760 inline quadix<T, 3> degenerate_quadix3d();
4761 template <typename T>
4762 inline rectangle<T> degenerate_rectangle();
4763 template <typename T>
4764 inline circle<T> degenerate_circle();
4765 template <typename T>
4766 inline sphere<T> degenerate_sphere();
4767 
4768 template <typename T>
4769 inline point2d<T> positive_infinite_point2d();
4770 template <typename T>
4771 inline point2d<T> negative_infinite_point2d();
4772 template <typename T>
4773 inline point3d<T> positive_infinite_point3d();
4774 template <typename T>
4775 inline point3d<T> negative_infinite_point3d();
4776 
4777 template <typename T>
4778 inline void swap(point2d<T>& point1, point2d<T>& point2);
4779 template <typename T>
4780 inline void swap(point3d<T>& point1, point3d<T>& point2);
4781 
4782 template <typename T>
4783 inline point2d<T> make_point(const T& x, const T& y);
4784 template <typename T>
4785 inline point3d<T> make_point(const T& x, const T& y, const T& z);
4786 
4787 template <typename T>
4788 inline point2d<T> make_point(const point3d<T> point);
4789 template <typename T>
4790 inline point3d<T> make_point(const point2d<T> point, const T& z = T(0.0));
4791 
4792 template <typename T>
4793 inline point2d<T> make_point(const circle<T>& circle);
4794 template <typename T>
4795 inline point3d<T> make_point(const sphere<T>& sphere);
4796 
4797 template <typename T>
4798 inline vector2d<T> make_vector(const T& x, const T& y);
4799 template <typename T>
4800 inline vector3d<T> make_vector(const T& x, const T& y, const T& z);
4801 
4802 template <typename T>
4803 inline vector2d<T> make_vector(const vector3d<T> v);
4804 template <typename T>
4805 inline vector3d<T> make_vector(const vector2d<T> v, const T& z = T(0.0));
4806 
4807 template <typename T>
4808 inline vector2d<T> make_vector(const point2d<T> point);
4809 template <typename T>
4810 inline vector3d<T> make_vector(const point3d<T> point);
4811 
4812 template <typename T>
4813 inline ray<T, 2> make_ray(const T& ox, const T& oy, const T& dir_x,
4814  const T& dir_y);
4815 template <typename T>
4816 inline ray<T, 3> make_ray(const T& ox, const T& oy, const T& oz, const T& dir_x,
4817  const T& dir_y, const T& dir_z);
4818 
4819 template <typename T>
4820 inline ray<T, 2> make_ray(const point2d<T>& origin,
4821  const vector2d<T>& direction);
4822 template <typename T>
4823 inline ray<T, 3> make_ray(const point3d<T>& origin,
4824  const vector3d<T>& direction);
4825 
4826 template <typename T>
4827 inline ray<T, 2> make_ray(const point2d<T>& origin, const T& bearing);
4828 
4829 template <typename T>
4830 inline curve_point<T, 2> make_curve_point(const T& x, const T& y, const T& t);
4831 template <typename T>
4832 inline curve_point<T, 3> make_curve_point(const T& x, const T& y, const T& z,
4833  const T& t);
4834 
4835 template <typename T>
4836 inline curve_point<T, 2> make_curve_point(const point2d<T>& point, const T& t);
4837 template <typename T>
4838 inline curve_point<T, 3> make_curve_point(const point3d<T>& point, const T& t);
4839 
4840 template <typename T>
4841 inline segment<T, 2> make_segment(const T& x1, const T& y1, const T& x2,
4842  const T& y2);
4843 template <typename T>
4844 inline segment<T, 3> make_segment(const T& x1, const T& y1, const T& z1,
4845  const T& x2, const T& y2, const T& z2);
4846 
4847 template <typename T>
4848 inline segment<T, 2> make_segment(const point2d<T>& point1,
4849  const point2d<T>& point2);
4850 template <typename T>
4851 inline segment<T, 3> make_segment(const point3d<T>& point1,
4852  const point3d<T>& point2);
4853 
4854 template <typename T>
4855 inline segment<T, 2> make_segment(const line<T, 2>& line);
4856 template <typename T>
4857 inline segment<T, 3> make_segment(const line<T, 3>& line);
4858 
4859 template <typename T>
4860 inline line<T, 2> make_line(const T& x1, const T& y1, const T& x2, const T& y2);
4861 template <typename T>
4862 inline line<T, 3> make_line(const T& x1, const T& y1, const T& z1, const T& x2,
4863  const T& y2, const T& z2);
4864 
4865 template <typename T>
4866 inline line<T, 2> make_line(const point2d<T>& point1, const point2d<T>& point2);
4867 template <typename T>
4868 inline line<T, 3> make_line(const point3d<T>& point1, const point3d<T>& point2);
4869 
4870 template <typename T>
4871 inline line<T, 2> make_line(const segment<T, 2>& segment);
4872 template <typename T>
4873 inline line<T, 3> make_line(const segment<T, 3>& segment);
4874 
4875 template <typename T>
4876 inline line<T, 2> make_line(const ray<T, 2>& ray);
4877 template <typename T>
4878 inline line<T, 3> make_line(const ray<T, 3>& ray);
4879 
4880 template <typename T>
4881 inline rectangle<T> make_rectangle(const T& x1, const T& y1, const T& x2,
4882  const T& y2);
4883 template <typename T>
4884 inline rectangle<T> make_rectangle(const point2d<T>& point1,
4885  const point2d<T>& point2);
4886 
4887 template <typename T>
4888 inline box<T, 3> make_box(const T& x1, const T& y1, const T& z1, const T& x2,
4889  const T& y2, const T& z2);
4890 template <typename T>
4891 inline box<T, 3> make_box(const point3d<T>& point1, const point3d<T>& point2);
4892 
4893 template <typename T>
4894 inline triangle<T, 2> make_triangle(const T& x1, const T& y1, const T& x2,
4895  const T& y2, const T& x3, const T& y3);
4896 
4897 template <typename T>
4898 inline triangle<T, 3> make_triangle(const T& x1, const T& y1, const T& z1,
4899  const T& x2, const T& y2, const T& z2,
4900  const T& x3, const T& y3, const T& z3);
4901 
4902 template <typename T>
4903 inline triangle<T, 2> make_triangle(const point2d<T>& point1,
4904  const point2d<T>& point2,
4905  const point2d<T>& point3);
4906 template <typename T>
4907 inline triangle<T, 3> make_triangle(const point3d<T>& point1,
4908  const point3d<T>& point2,
4909  const point3d<T>& point3);
4910 
4911 template <typename T>
4912 inline quadix<T, 2> make_quadix(const T& x1, const T& y1, const T& x2,
4913  const T& y2, const T& x3, const T& y3,
4914  const T& x4, const T& y4);
4915 
4916 template <typename T>
4917 inline quadix<T, 3> make_quadix(const T& x1, const T& y1, const T& z1,
4918  const T& x2, const T& y2, const T& z2,
4919  const T& x3, const T& y3, const T& z3,
4920  const T& x4, const T& y4, const T& z4);
4921 
4922 template <typename T>
4923 inline quadix<T, 2> make_quadix(const point2d<T>& point1,
4924  const point2d<T>& point2,
4925  const point2d<T>& point3,
4926  const point2d<T>& point4);
4927 template <typename T>
4928 inline quadix<T, 3> make_quadix(const point3d<T>& point1,
4929  const point3d<T>& point2,
4930  const point3d<T>& point3,
4931  const point3d<T>& point4);
4932 
4933 template <typename T>
4934 inline quadix<T, 2> make_quadix(const T& x1, const T& y1, const T& x2,
4935  const T& y2);
4936 template <typename T>
4937 inline quadix<T, 2> make_quadix(const rectangle<T>& rectangle);
4938 
4939 template <typename T>
4940 inline circle<T> make_circle(const T& x, const T& y, const T& radius);
4941 template <typename T>
4942 inline circle<T> make_circle(const point2d<T>& point, const T& radius);
4943 template <typename T>
4944 inline circle<T> make_circle(const point2d<T>& point1,
4945  const point2d<T>& point2);
4946 template <typename T>
4947 inline circle<T> make_circle(const point2d<T>& point1, const point2d<T>& point2,
4948  const point2d<T>& point3);
4949 template <typename T>
4950 inline circle<T> make_circle(const triangle<T, 2>& triangle);
4951 
4952 template <typename T>
4953 inline sphere<T> make_sphere(const T& x, const T& y, const T& z,
4954  const T& radius);
4955 template <typename T>
4956 inline sphere<T> make_sphere(const point3d<T>& point, const T& radius);
4957 template <typename T>
4958 inline sphere<T> make_sphere(const point3d<T>& point1,
4959  const point3d<T>& point2);
4960 
4961 template <typename T>
4962 inline plane<T, 3> make_plane(const T& x1, const T& y1, const T& z1,
4963  const T& x2, const T& y2, const T& z2,
4964  const T& x3, const T& y3, const T& z3);
4965 
4966 template <typename T>
4967 inline plane<T, 3> make_plane(const T& px, const T& py, const T& pz,
4968  const T& nx, const T& ny, const T& nz);
4969 
4970 template <typename T>
4971 inline plane<T, 3> make_plane(const point3d<T>& point1,
4972  const point3d<T>& point2,
4973  const point3d<T>& point3);
4974 template <typename T>
4975 inline plane<T, 3> make_plane(const point3d<T>& point,
4976  const vector3d<T>& normal);
4977 template <typename T>
4978 inline plane<T, 3> make_plane(const triangle<T, 3>& triangle);
4979 
4980 template <typename T, std::size_t D, typename InputIterator>
4981 inline polygon<T, D> make_polygon(const InputIterator begin,
4982  const InputIterator end);
4983 
4984 template <typename T>
4985 inline polygon<T, 2> make_polygon(const std::vector<point2d<T> >& point_list);
4986 template <typename T>
4987 inline polygon<T, 3> make_polygon(const std::vector<point3d<T> >& point_list);
4988 
4989 template <typename T>
4990 inline polygon<T, 2> make_polygon(const triangle<T, 2>& triangle);
4991 template <typename T>
4992 inline polygon<T, 2> make_polygon(const quadix<T, 2>& quadix);
4993 template <typename T>
4994 inline polygon<T, 2> make_polygon(const rectangle<T>& rectangle);
4995 template <typename T>
4996 inline polygon<T, 2> make_polygon(const circle<T>& circle,
4997  const unsigned int point_count = 360);
4998 
4999 } // namespace wykobi
5000 
5001 #include "wykobi.inl"
5002 
5003 #endif
wykobi::point3d::const_reference
const typedef Type & const_reference
Definition: wykobi.hpp:111
wykobi::circle_in_circle
bool circle_in_circle(const circle< T > &circle1, const circle< T > &circle2)
wykobi::quadix_within_box
bool quadix_within_box(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &x3, const T &y3, const T &z3, const T &x4, const T &y4, const T &z4, const T &x5, const T &y5, const T &z5, const T &x6, const T &y6, const T &z6)
wykobi::create_antipedal_triangle
triangle< T, 2 > create_antipedal_triangle(const point2d< T > &point, const triangle< T, 2 > &triangle)
wykobi::circular_arc::y1
T y1
Definition: wykobi.hpp:454
wykobi::make_circle
circle< T > make_circle(const T &x, const T &y, const T &radius)
wykobi::closest_point_on_ray_from_point
void closest_point_on_ray_from_point(const T &ox, const T &oy, const T &dx, const T &dy, const T &px, const T &py, T &nx, T &ny)
wykobi::segment
Definition: wykobi.hpp:263
wykobi::point_in_focus_area
bool point_in_focus_area(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::hypersphere::reference
PointType & reference
Definition: wykobi.hpp:444
wykobi::polygon::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:402
wykobi::minimum_distance_from_point_to_line
T minimum_distance_from_point_to_line(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::degenerate_point3d
point3d< T > degenerate_point3d()
wykobi::line::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:295
wykobi::circle::radius
T radius
Definition: wykobi.hpp:428
wykobi::project_point0
void project_point0(const T &px, const T &py, const T &distance, T &nx, T &ny)
wykobi::trig_luts::tan
const T & tan(const unsigned int angle) const
Definition: wykobi.hpp:771
wykobi::quadratic_bezier
Definition: wykobi.hpp:468
wykobi::generate_random_points
void generate_random_points(const T &x1, const T &y1, const T &x2, const T &y2, const std::size_t &point_count, OutputIterator out)
wykobi::etEquilateral
@ etEquilateral
Definition: wykobi.hpp:727
wykobi::make_curve_point
curve_point< T, 2 > make_curve_point(const T &x, const T &y, const T &t)
wykobi::ray
Definition: wykobi.hpp:674
wykobi::triangle_symmedian
line< T, 2 > triangle_symmedian(const triangle< T, 2 > &triangle, const std::size_t &symmedian)
wykobi::pointnd::~pointnd
~pointnd()
Definition: wykobi.hpp:200
wykobi::curve_point::operator()
const_reference operator()() const
Definition: wykobi.hpp:570
wykobi::point_in_sphere
bool point_in_sphere(const T &px, const T &py, const T &pz, const T &cx, const T &cy, const T &cz, const T &radius)
wykobi::sphere::x
T x
Definition: wykobi.hpp:435
wykobi::vector3d::operator=
vector3d< T > & operator=(const vectornd< T, 3 > &vec)
Definition: wykobi.hpp:605
wykobi::out_code
int out_code(const point2d< T > &point, const rectangle< T > &rectangle)
wykobi::eSphere
@ eSphere
Definition: wykobi.hpp:65
wykobi::minimum_distance_from_point_to_triangle
T minimum_distance_from_point_to_triangle(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::minkowski_difference
point2d< T > minkowski_difference(const point2d< T > &point1, const point2d< T > &point2)
wykobi::polygon::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:389
wykobi::create_outer_vecten_triangle
triangle< T, 2 > create_outer_vecten_triangle(const triangle< T, 2 > &triangle)
wykobi::triangle::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:319
wykobi::eCircle
@ eCircle
Definition: wykobi.hpp:64
wykobi::degenerate_sphere
sphere< T > degenerate_sphere()
wykobi::operator+
vector2d< T > operator+(const vector2d< T > &v1, const vector2d< T > &v2)
wykobi::box_to_box_intersect
bool box_to_box_intersect(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &x3, const T &y3, const T &z3, const T &x4, const T &y4, const T &z4)
wykobi::lay_distance
T lay_distance(const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::point3d::operator=
point3d< T > & operator=(const pointnd< T, 3 > &point)
Definition: wykobi.hpp:118
wykobi::pointnd::pointnd
pointnd(const point3d< T > &point)
Definition: wykobi.hpp:196
wykobi::line::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:302
wykobi::create_line_from_bisector
line< T, 2 > create_line_from_bisector(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::ePoint2D
@ ePoint2D
Definition: wykobi.hpp:50
wykobi::quadratic_bezier::~quadratic_bezier
~quadratic_bezier()
Definition: wykobi.hpp:474
wykobi::CLIP_RIGHT
const int CLIP_RIGHT
Definition: wykobi.hpp:753
wykobi::CollinearOrientation
const int CollinearOrientation
Definition: wykobi.hpp:740
wykobi::define_point_type
Definition: wykobi.hpp:244
wykobi::is_isosceles_triangle
bool is_isosceles_triangle(const triangle< T, 2 > &triangle)
wykobi::exmedian_point
point2d< T > exmedian_point(const triangle< T, 2 > &triangle, const std::size_t &corner)
wykobi::segment::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:270
wykobi::update_circle
circle< T > update_circle(const circle< T > &circle, point2d< T > &point)
wykobi::intersect
bool intersect(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::degenerate_rectangle
rectangle< T > degenerate_rectangle()
wykobi::curve_point::size
std::size_t size() const
Definition: wykobi.hpp:571
wykobi::create_pedal_triangle
triangle< T, 2 > create_pedal_triangle(const point2d< T > &point, const triangle< T, 2 > &triangle)
wykobi::chebyshev_distance
T chebyshev_distance(const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::cartesian_angle
T cartesian_angle(const T &x, const T &y)
wykobi::hypersphere::radius
T radius
Definition: wykobi.hpp:447
wykobi::circle
Definition: wykobi.hpp:426
wykobi::triangle_within_box
bool triangle_within_box(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &x3, const T &y3, const T &z3, const T &x4, const T &y4, const T &z4, const T &x5, const T &y5, const T &z5)
wykobi::define_bezier_type< T, 2, eCubicBezier >::BezierType
cubic_bezier< T, 2 > BezierType
Definition: wykobi.hpp:534
wykobi::circumcircle
circle< T > circumcircle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::degenerate_line3d
line< T, 3 > degenerate_line3d()
wykobi::fast_rotate
void fast_rotate(const trig_luts< T > &lut, const int rotation_angle, const T &x, const T &y, T &nx, T &ny)
wykobi::line::reference
PointType & reference
Definition: wykobi.hpp:296
wykobi::degenerate_circle
circle< T > degenerate_circle()
wykobi::box::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:710
wykobi::segment_within_box
bool segment_within_box(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &x3, const T &y3, const T &z3, const T &x4, const T &y4, const T &z4)
wykobi::in_sphere
int in_sphere(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &x3, const T &y3, const T &z3, const T &x4, const T &y4, const T &z4, const T &px, const T &py, const T &pz)
wykobi::operator-
vector2d< T > operator-(const vector2d< T > &v1, const vector2d< T > &v2)
wykobi::polygon::front
const_reference front() const
Definition: wykobi.hpp:418
wykobi::invert_circle_across_circle
circle< T > invert_circle_across_circle(const circle< T > &circle1, const circle< T > &circle2)
wykobi::vector_norm
T vector_norm(const vector2d< T > &v)
wykobi::trig_luts::sin
const T & sin(const unsigned int angle) const
Definition: wykobi.hpp:769
wykobi::vector3d
Definition: wykobi.hpp:597
wykobi::span_length
T span_length(const rectangle< T > &rectangle)
wykobi::point_in_triangle
bool point_in_triangle(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::box::reference
PointType & reference
Definition: wykobi.hpp:711
wykobi::box::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:718
wykobi::plane::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:693
wykobi::rectangle::PointCount
const static std::size_t PointCount
Definition: wykobi.hpp:337
wykobi::vectornd::vectornd
vectornd(const T &v0, const T &v1)
Definition: wykobi.hpp:620
wykobi::curve_point::operator()
reference operator()()
Definition: wykobi.hpp:569
wykobi::create_segment_from_bisector
segment< T, 2 > create_segment_from_bisector(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::remove_consecutive_collinear_points
polygon< T, 2 > remove_consecutive_collinear_points(const polygon< T, 2 > &polygon)
wykobi::cubic_bezier::~cubic_bezier
~cubic_bezier()
Definition: wykobi.hpp:499
wykobi::closest_point_on_sphere_from_segment
point3d< T > closest_point_on_sphere_from_segment(const sphere< T > &sphere, const segment< T, 3 > &segment)
wykobi::nonsymmetric_mirror
void nonsymmetric_mirror(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2, const T &ratio, T &nx, T &ny)
wykobi::antipodal_point
point2d< T > antipodal_point(const point2d< T > &point, const circle< T > &circle)
wykobi::trig_luts::cos
const T & cos(const unsigned int angle) const
Definition: wykobi.hpp:770
wykobi::box
Definition: wykobi.hpp:702
wykobi::vertex_triangle
triangle< T, 2 > vertex_triangle(const std::size_t &index, const polygon< T, 2 > polygon)
wykobi::operator/
vector2d< T > operator/(const vector2d< T > &v1, const T &scale)
wykobi::create_morley_triangle
triangle< T, 2 > create_morley_triangle(const triangle< T, 2 > &triangle)
wykobi::not_equal
bool not_equal(const T &val1, const T &val2, const T &epsilon)
wykobi::create_equilateral_quadix
void create_equilateral_quadix(const T &x1, const T &y1, const T &x2, const T &y2, T &x3, T &y3, T &x4, T &y4)
wykobi::polygon
Definition: wykobi.hpp:383
wykobi::vertical_mirror
T vertical_mirror(const T &angle)
wykobi::point2d::const_reference
const typedef type & const_reference
Definition: wykobi.hpp:77
wykobi::geometric_type
geometric_type
Definition: wykobi.hpp:49
wykobi::define_vector_type
Definition: wykobi.hpp:655
wykobi::circle_outer_tangent_segments
void circle_outer_tangent_segments(const circle< T > &circle0, const circle< T > &circle1, std::vector< segment< T, 2 > > &segments)
wykobi::triangle::~triangle
~triangle()
Definition: wykobi.hpp:316
wykobi::closest_point_on_bezier_from_point
point2d< T > closest_point_on_bezier_from_point(const quadratic_bezier< T, 2 > &bezier, const point2d< T > &point, const std::size_t &steps=1000)
wykobi::polygon::end
iterator end()
Definition: wykobi.hpp:416
wykobi::plane::VectorType
define_vector_type< T, Dimension >::VectorType VectorType
Definition: wykobi.hpp:694
wykobi::point2d::operator()
reference operator()(const std::size_t &index)
Definition: wykobi.hpp:90
wykobi::eRay3D
@ eRay3D
Definition: wykobi.hpp:63
wykobi::etUnknown
@ etUnknown
Definition: wykobi.hpp:732
wykobi::vector3d::vector3d
vector3d(const T &_x=T(0.0), const T &_y=T(0.0), const T &_z=T(0.0))
Definition: wykobi.hpp:599
wykobi::degenerate_segment2d
segment< T, 2 > degenerate_segment2d()
wykobi::signed_area
T signed_area(const T &x1, const T &y1, const T &x2, const T &y2, const T &px, const T &py)
wykobi::rectangle_within_rectangle
bool rectangle_within_rectangle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::triangle_external_bisector
line< T, 2 > triangle_external_bisector(const triangle< T, 2 > &triangle, const std::size_t &corner, const std::size_t &opposing_corner)
wykobi::quadratic_bezier::size
std::size_t size() const
Definition: wykobi.hpp:488
wykobi::circular_arc
Definition: wykobi.hpp:452
wykobi::project_object
point2d< T > project_object(const point2d< T > &point, const T &angle, const T &distance)
wykobi::epsilon< float >
float epsilon< float >()
Definition: wykobi.hpp:797
wykobi::is_point_collinear
bool is_point_collinear(const T &x1, const T &y1, const T &x2, const T &y2, const T &px, const T &py, const bool robust=false)
wykobi::CLIP_TOP
const int CLIP_TOP
Definition: wykobi.hpp:751
wykobi::generate_point_on_segment
point2d< T > generate_point_on_segment(const segment< T, 2 > &segment, const T &t)
wykobi::centroid
void centroid(const T &x1, const T &y1, const T &x2, const T &y2, T &x, T &y)
wykobi::rectangle::~rectangle
~rectangle()
Definition: wykobi.hpp:340
wykobi::sphere::radius
T radius
Definition: wykobi.hpp:435
wykobi::point_on_circle
bool point_on_circle(const T &px, const T &py, const T &cx, const T &cy, const T &radius)
wykobi::polygon::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:401
wykobi::line
Definition: wykobi.hpp:287
wykobi::eTriangleType
eTriangleType
Definition: wykobi.hpp:726
wykobi::rectangle
Definition: wykobi.hpp:335
wykobi::dot_product
T dot_product(const vector2d< T > &v1, const vector2d< T > &v2)
wykobi::line::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:303
wykobi::calculate_bezier_coefficients
void calculate_bezier_coefficients(const quadratic_bezier< T, 2 > &bezier, T &ax, T &bx, T &ay, T &by)
wykobi::is_right_triangle
bool is_right_triangle(const wykobi::triangle< T, 2 > &triangle)
wykobi::polygon::~polygon
~polygon()
Definition: wykobi.hpp:386
wykobi::point2d::~point2d
~point2d()
Definition: wykobi.hpp:82
wykobi::project_point135
void project_point135(const T &px, const T &py, const T &distance, T &nx, T &ny)
wykobi::curve_point::t
T t
Definition: wykobi.hpp:573
wykobi::ePoint3D
@ ePoint3D
Definition: wykobi.hpp:51
wykobi_math.hpp
wykobi::eBox
@ eBox
Definition: wykobi.hpp:55
wykobi::degenerate_vector3d
vector3d< T > degenerate_vector3d()
wykobi::polygon::begin
iterator begin()
Definition: wykobi.hpp:414
wykobi::box::size
std::size_t size() const
Definition: wykobi.hpp:721
wykobi::signed_volume
T signed_volume(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &x3, const T &y3, const T &z3, const T &px, const T &py, const T &pz)
wykobi::differing_orientation
bool differing_orientation(const T &x1, const T &y1, const T &x2, const T &y2, const T &p1x, const T &p1y, const T &p2x, const T &p2y)
wykobi::cos
T cos(const T &value)
Definition: wykobi_math.hpp:143
wykobi::is_skinny_triangle
bool is_skinny_triangle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::invert_point
point2d< T > invert_point(const point2d< T > &point, const circle< T > &circle)
wykobi::segment::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:271
wykobi::rectangle::rectangle
rectangle()
Definition: wykobi.hpp:339
wykobi::hypersphere
Definition: wykobi.hpp:440
wykobi::quadix::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:375
wykobi::create_triangle
triangle< T, 2 > create_triangle(const point2d< T > &point1, const point2d< T > &point2, const T &angle1, const T &angle2)
wykobi::CounterClockwise
const int CounterClockwise
Definition: wykobi.hpp:739
wykobi::brocard_circle
circle< T > brocard_circle(const triangle< T, 2 > &triangle)
wykobi::segment_within_rectangle
bool segment_within_rectangle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::ray::~ray
~ray()
Definition: wykobi.hpp:677
wykobi::tan
T tan(const T &value)
Definition: wykobi_math.hpp:148
wykobi::intersect_vertical_horizontal
bool intersect_vertical_horizontal(const segment< T, 2 > &segment1, const segment< T, 2 > &segment2)
wykobi::create_anticomplementary_triangle
triangle< T, 2 > create_anticomplementary_triangle(const triangle< T, 2 > &triangle)
wykobi::pointnd::operator=
pointnd< T, D > & operator=(const point3d< T > &point)
Definition: wykobi.hpp:220
wykobi::create_feuerbach_triangle
triangle< T, 2 > create_feuerbach_triangle(const triangle< T, 2 > &triangle)
wykobi::minkowski_sum
point2d< T > minkowski_sum(const point2d< T > &point1, const point2d< T > &point2)
wykobi::polygon::size
std::size_t size() const
Definition: wykobi.hpp:412
wykobi::triangle_within_rectangle
bool triangle_within_rectangle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4, const T &x5, const T &y5)
wykobi::triangle::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:327
wykobi::closest_point_on_line_from_point
void closest_point_on_line_from_point(const T &x1, const T &y1, const T &x2, const T &y2, const T &px, const T &py, T &nx, T &ny)
wykobi::quadratic_bezier::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:484
wykobi::create_excentral_triangle
triangle< T, 2 > create_excentral_triangle(const triangle< T, 2 > &triangle)
wykobi::define_point_type::PointType
pointnd< T, Dimension > PointType
Definition: wykobi.hpp:246
wykobi::triangle::size
std::size_t size() const
Definition: wykobi.hpp:330
wykobi::operator<
bool operator<(const point2d< T > &point1, const point2d< T > &point2)
wykobi::euler_line
line< T, 2 > euler_line(const triangle< T, 2 > &triangle)
wykobi::ray::VectorType
define_vector_type< T, Dimension >::VectorType VectorType
Definition: wykobi.hpp:680
wykobi::manhattan_distance
T manhattan_distance(const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::perpendicular_product
T perpendicular_product(const vector2d< T > &v1, const vector2d< T > &v2)
wykobi::point_in_three_point_circle
bool point_in_three_point_circle(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::sphere_within_box
bool sphere_within_box(const T &x, const T &y, const T &z, const T &radius, const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2)
wykobi::inverse_chebyshev_distance
T inverse_chebyshev_distance(const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::make_rectangle
rectangle< T > make_rectangle(const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::make_plane
plane< T, 3 > make_plane(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &x3, const T &y3, const T &z3)
wykobi::segment_mid_point
void segment_mid_point(const T &x1, const T &y1, const T &x2, const T &y2, T &midx, T &midy)
wykobi::closest_point_on_segment_from_point
void closest_point_on_segment_from_point(const T &x1, const T &y1, const T &x2, const T &y2, const T &px, const T &py, T &nx, T &ny)
wykobi::project_point180
void project_point180(const T &px, const T &py, const T &distance, T &nx, T &ny)
wykobi::pointnd::pointnd
pointnd(const T &v0, const T &v1, const T &v2)
Definition: wykobi.hpp:177
wykobi::confined_triangle_median
line< T, 2 > confined_triangle_median(const triangle< T, 2 > &triangle, const point2d< T > &point, const std::size_t &median)
wykobi::curve_point
Definition: wykobi.hpp:555
wykobi::curve_point::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:562
wykobi::create_cevian_triangle
triangle< T, 2 > create_cevian_triangle(const triangle< T, 2 > &triangle, const point2d< T > &point)
wykobi::eTriangle3D
@ eTriangle3D
Definition: wykobi.hpp:59
wykobi::robust_cartesian_angle
T robust_cartesian_angle(const T &x, const T &y)
wykobi::curve_point::reference
PointType & reference
Definition: wykobi.hpp:563
wykobi::quadrant
unsigned int quadrant(const T &angle)
wykobi::translate
point2d< T > translate(const T &dx, const T &dy, const point2d< T > &point)
wykobi::opposing_edge
segment< T, 2 > opposing_edge(const triangle< T, 2 > &triangle, const std::size_t &corner)
wykobi::define_point_type< T, 2 >::PointType
point2d< T > PointType
Definition: wykobi.hpp:252
wykobi::generate_random_value
T generate_random_value(const T &range)
wykobi::LeftHandSide
const int LeftHandSide
Definition: wykobi.hpp:737
wykobi::in_circle
int in_circle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &px, const T &py)
wykobi::circular_arc::x1
T x1
Definition: wykobi.hpp:454
wykobi::create_extouch_triangle
triangle< T, 2 > create_extouch_triangle(const triangle< T, 2 > &triangle)
wykobi::excenter
point2d< T > excenter(const triangle< T, 2 > &triangle, const std::size_t &corner)
wykobi::point2d::y
T y
Definition: wykobi.hpp:104
wykobi::inscribed_circle
circle< T > inscribed_circle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::define_point_type< T, 3 >::PointType
point3d< T > PointType
Definition: wykobi.hpp:258
wykobi::point_in_quadix
bool point_in_quadix(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::create_symmedial_triangle
triangle< T, 2 > create_symmedial_triangle(const triangle< T, 2 > &triangle, const point2d< T > &point)
wykobi::lay_distance_segment_to_segment
T lay_distance_segment_to_segment(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::plane
Definition: wykobi.hpp:688
wykobi::polygon::push_back
void push_back(const PointType &value)
Definition: wykobi.hpp:405
wykobi::triangle::triangle
triangle()
Definition: wykobi.hpp:315
wykobi::quadratic_bezier::reference
PointType & reference
Definition: wykobi.hpp:478
wykobi::intersection_point_line_to_line
void intersection_point_line_to_line(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &x3, const T &y3, const T &z3, const T &x4, const T &y4, const T &z4, T &Ix, T &Iy, T &Iz, const T &fuzzy=T(0.0))
wykobi::BezierType
BezierType
Definition: wykobi.hpp:464
wykobi::eLine3D
@ eLine3D
Definition: wykobi.hpp:57
wykobi::epsilon< double >
double epsilon< double >()
Definition: wykobi.hpp:793
wykobi::segment::size
std::size_t size()
Definition: wykobi.hpp:282
wykobi::geometric_entity
Definition: wykobi.hpp:47
wykobi::parallel
bool parallel(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4, const T &epsilon=T(Epsilon))
wykobi::pointnd::reference
T & reference
Definition: wykobi.hpp:169
wykobi::segment::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:279
wykobi::polygon::begin
const_iterator begin() const
Definition: wykobi.hpp:413
wykobi::less_than_or_equal
bool less_than_or_equal(const T &val1, const T &val2, const T &epsilon)
wykobi::create_perpendicular_bisector
line< T, 2 > create_perpendicular_bisector(const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::ray::ray
ray()
Definition: wykobi.hpp:676
wykobi::circular_arc::py
T py
Definition: wykobi.hpp:457
wykobi::create_incentral_triangle
triangle< T, 2 > create_incentral_triangle(const triangle< T, 2 > &triangle)
wykobi::project_point270
void project_point270(const T &px, const T &py, const T &distance, T &nx, T &ny)
wykobi::rectangle_to_rectangle_intersect
bool rectangle_to_rectangle_intersect(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::rectangle::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:343
wykobi::create_ray_from_bisector
ray< T, 2 > create_ray_from_bisector(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::eQuadix3D
@ eQuadix3D
Definition: wykobi.hpp:61
wykobi::mirror
void mirror(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2, T &nx, T &ny)
wykobi::generate_random_point
point2d< T > generate_random_point(const T &dx, const T &dy)
wykobi::segment::reference
PointType & reference
Definition: wykobi.hpp:272
wykobi::circular_arc::cy
T cy
Definition: wykobi.hpp:456
wykobi::pointnd::operator=
pointnd< T, D > & operator=(const pointnd< T, D > &point)
Definition: wykobi.hpp:206
wykobi::Cospherical
const int Cospherical
Definition: wykobi.hpp:747
wykobi::perimeter
T perimeter(const point2d< T > &point1, const point2d< T > &point2, const point2d< T > &point3)
wykobi::box::box
box()
Definition: wykobi.hpp:706
wykobi::circular_arc::y2
T y2
Definition: wykobi.hpp:455
wykobi::robust_collinear
bool robust_collinear(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &epsilon=T(Epsilon))
wykobi::point_on_polygon_edge
bool point_on_polygon_edge(const T &px, const T &py, const polygon< T, 2 > &polygon)
wykobi::project_point
void project_point(const T &srcx, const T &srcy, const T &destx, const T &desty, const T &dist, T &nx, T &ny)
wykobi::quadix_within_rectangle
bool quadix_within_rectangle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4, const T &x5, const T &y5, const T &x6, const T &y6)
wykobi::lengthen_segment
void lengthen_segment(T &x1, T &y1, T &x2, T &y2, const T &amount)
wykobi::box::PointCount
const static std::size_t PointCount
Definition: wykobi.hpp:704
wykobi::closest_point_on_circle_from_circle
point2d< T > closest_point_on_circle_from_circle(const circle< T > &circle1, const circle< T > &circle2)
wykobi::lay_distance_from_point_to_sphere_center
T lay_distance_from_point_to_sphere_center(const point3d< T > &point, const sphere< T > &sphere)
wykobi::curve_point::curve_point
curve_point()
Definition: wykobi.hpp:557
wykobi::point2d::point2d
point2d(const pointnd< T, 2 > &point)
Definition: wykobi.hpp:81
wykobi::create_isosceles_triangle
triangle< T, 2 > create_isosceles_triangle(const point2d< T > &point1, const point2d< T > &point2, const T &angle)
wykobi::symmedian_point
point2d< T > symmedian_point(const triangle< T, 2 > &triangle)
wykobi::plane::constant
T constant
Definition: wykobi.hpp:696
wykobi::make_ray
ray< T, 2 > make_ray(const T &ox, const T &oy, const T &dir_x, const T &dir_y)
wykobi::make_triangle
triangle< T, 2 > make_triangle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::rectangle_corner
point2d< T > rectangle_corner(const rectangle< T > &rectangle, const std::size_t &corner_index)
wykobi::clip
bool clip(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4, T &cx1, T &cy1, T &cx2, T &cy2)
wykobi::normalize
vector2d< T > normalize(const vector2d< T > &v)
wykobi::eRay2D
@ eRay2D
Definition: wykobi.hpp:62
wykobi::circle::x
T x
Definition: wykobi.hpp:428
wykobi::update_box
box< T, 3 > update_box(const box< T, 3 > &box, point3d< T > &point)
wykobi::segment::PointCount
const static std::size_t PointCount
Definition: wykobi.hpp:265
wykobi::create_parallel_line_on_point
line< T, 2 > create_parallel_line_on_point(const line< T, 2 > &line, const point2d< T > &point)
wykobi::rectangle::PointType
define_point_type< T, 2 >::PointType PointType
Definition: wykobi.hpp:342
wykobi::eSegment3D
@ eSegment3D
Definition: wykobi.hpp:53
wykobi::point3d::reference
Type & reference
Definition: wykobi.hpp:112
wykobi::degenerate_point2d
point2d< T > degenerate_point2d()
wykobi::eCubicBezier
@ eCubicBezier
Definition: wykobi.hpp:464
wykobi::plane::plane
plane()
Definition: wykobi.hpp:690
wykobi::line3d
line< Float, 3 > line3d
Definition: wykobi.hpp:786
wykobi::greater_than_or_equal
bool greater_than_or_equal(const T &val1, const T &val2, const T &epsilon)
wykobi::point3d::operator()
const_reference operator()(const std::size_t &index) const
Definition: wykobi.hpp:126
wykobi::cubic_bezier::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:501
wykobi::point_in_box
bool point_in_box(const T &px, const T &py, const T &pz, const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2)
wykobi::vertex_is_ear
bool vertex_is_ear(const std::size_t &index, const polygon< T, 2 > &polygon)
wykobi::lay_distance_from_point_to_circle_center
T lay_distance_from_point_to_circle_center(const point2d< T > &point, const circle< T > &circle)
wykobi::define_bezier_type< T, 3, eCubicBezier >::BezierType
cubic_bezier< T, 3 > BezierType
Definition: wykobi.hpp:540
wykobi::ray::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:679
wykobi::triangle::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:318
wykobi::point2d
Definition: wykobi.hpp:74
wykobi::pointnd::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:234
wykobi::is_degenerate
bool is_degenerate(const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::pointnd::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:235
wykobi::circular_arc::orientation
int orientation
Definition: wykobi.hpp:460
wykobi::trig_luts::trig_luts
trig_luts()
Definition: wykobi.hpp:761
wykobi::eLine2D
@ eLine2D
Definition: wykobi.hpp:56
wykobi::pointnd::operator()
const_reference operator()(const std::size_t &index) const
Definition: wykobi.hpp:230
wykobi::pointnd::pointnd
pointnd(const T &v0, const T &v1)
Definition: wykobi.hpp:173
wykobi::shorten_segment
void shorten_segment(T &x1, T &y1, T &x2, T &y2, const T &amount)
wykobi::point3d::~point3d
~point3d()
Definition: wykobi.hpp:116
wykobi::circle_within_rectangle
bool circle_within_rectangle(const T &x, const T &y, const T &radius, const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::bezier_coefficients::reference
PointType & reference
Definition: wykobi.hpp:548
wykobi::polygon::back
const_reference back() const
Definition: wykobi.hpp:420
wykobi::circumcenter
void circumcenter(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, T &px, T &py)
wykobi::eSegment2D
@ eSegment2D
Definition: wykobi.hpp:52
wykobi::eUnknown
@ eUnknown
Definition: wykobi.hpp:724
wykobi::point_on_ray
bool point_on_ray(const T &px, const T &py, const T &ox, const T &oy, const T &dx, const T &dy)
wykobi::perpendicular
bool perpendicular(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4, const T &epsilon=T(Epsilon))
wykobi::rectangle::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:350
wykobi::orientation
int orientation(const T &x1, const T &y1, const T &x2, const T &y2, const T &px, const T &py)
wykobi::vectornd::vectornd
vectornd()
Definition: wykobi.hpp:616
wykobi::etIsosceles
@ etIsosceles
Definition: wykobi.hpp:728
wykobi::is_equilateral_triangle
bool is_equilateral_triangle(const triangle< T, 2 > &triangle)
wykobi::pointnd::pointnd
pointnd(const T &v0)
Definition: wykobi.hpp:172
wykobi::segment::~segment
~segment()
Definition: wykobi.hpp:268
wykobi::orthocenter
point2d< T > orthocenter(const triangle< T, 2 > &triangle)
wykobi::polygon_within_rectangle
bool polygon_within_rectangle(const polygon< T, 2 > &polygon, const rectangle< T > &rectangle)
wykobi::polygon_orientation
int polygon_orientation(const polygon< T, 2 > &polygon)
wykobi::plane::normal
VectorType normal
Definition: wykobi.hpp:697
wykobi::cubic_bezier::Type
const static BezierType Type
Definition: wykobi.hpp:496
wykobi::circle::y
T y
Definition: wykobi.hpp:428
wykobi::quadratic_bezier::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:476
wykobi::polygon::iterator
std::vector< PointType >::iterator iterator
Definition: wykobi.hpp:396
wykobi::define_vector_type::VectorType
vectornd< T, Dimension > VectorType
Definition: wykobi.hpp:657
wykobi::bezier_coefficients::value
PointType value[Type]
Definition: wykobi.hpp:550
wykobi::pointnd::pointnd
pointnd(const T &v0, const T &v1, const T &v2, const T &v3)
Definition: wykobi.hpp:182
wykobi::polygon::reference
PointType & reference
Definition: wykobi.hpp:390
wykobi::box::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:717
wykobi::curve_point::PointCount
const static std::size_t PointCount
Definition: wykobi.hpp:560
wykobi::triangle_bisector
line< T, 2 > triangle_bisector(const triangle< T, 2 > &triangle, const std::size_t &bisector)
wykobi::point_on_bezier
bool point_on_bezier(const point2d< T > &point, const quadratic_bezier< T, 2 > &bezier, const std::size_t &steps=1000, const T &fuzzy=T(Epsilon))
wykobi::polygon::reserve
void reserve(const std::size_t amount)
Definition: wykobi.hpp:406
wykobi::polygon::back
reference back()
Definition: wykobi.hpp:419
wykobi::segment3d
segment< Float, 3 > segment3d
Definition: wykobi.hpp:785
wykobi::point3d::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:130
wykobi::cyclocevian_conjugate
point2d< T > cyclocevian_conjugate(const point2d< T > &point, const triangle< T, 2 > &triangle)
wykobi::closest_point_on_polygon_from_point
point2d< T > closest_point_on_polygon_from_point(const polygon< T, 2 > &polygon, const point2d< T > &point)
wykobi::define_vector_type< T, 3 >::VectorType
vector3d< T > VectorType
Definition: wykobi.hpp:669
wykobi::vectornd::vectornd
vectornd(const T &v0, const T &v1, const T &v2, const T &v3)
Definition: wykobi.hpp:631
wykobi::vertex_angle
T vertex_angle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::circle_internal_tangent_segments
void circle_internal_tangent_segments(const circle< T > &circle0, const circle< T > &circle1, std::vector< segment< T, 2 > > &segments)
wykobi::epsilon
T epsilon()
wykobi::normalize_angle
T normalize_angle(const T &angle)
wykobi::operator>
bool operator>(const point2d< T > &point1, const point2d< T > &point2)
wykobi::vectornd::vectornd
vectornd(const T &v0)
Definition: wykobi.hpp:618
wykobi::degenerate_triangle2d
triangle< T, 2 > degenerate_triangle2d()
wykobi::bezier_curve_length
T bezier_curve_length(const quadratic_bezier< T, 2 > &bezier, const std::size_t &point_count)
wykobi::vector2d
Definition: wykobi.hpp:582
wykobi::closest_point_on_quadix_from_point
void closest_point_on_quadix_from_point(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4, const T &px, const T &py, T &nx, T &ny)
wykobi::make_line
line< T, 2 > make_line(const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::polygon::end
const_iterator end() const
Definition: wykobi.hpp:415
wykobi::polygon::front
reference front()
Definition: wykobi.hpp:417
wykobi::hypersphere::center
PointType center
Definition: wykobi.hpp:446
wykobi::etRight
@ etRight
Definition: wykobi.hpp:729
wykobi::closest_point_on_box_from_point
void closest_point_on_box_from_point(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &px, const T &py, const T &pz, T &nx, T &ny, T &nz)
wykobi::project_point45
void project_point45(const T &px, const T &py, const T &distance, T &nx, T &ny)
wykobi::polygon::clear
void clear()
Definition: wykobi.hpp:408
wykobi::generate_random_object
void generate_random_object(const T &x1, const T &y1, const T &x2, const T &y2, segment< T, 2 > &segment)
wykobi::point_in_polygon
bool point_in_polygon(const T &px, const T &py, const polygon< T, 2 > &polygon)
wykobi::project_point90
void project_point90(const T &px, const T &py, const T &distance, T &nx, T &ny)
wykobi::project_point_t
void project_point_t(const T &srcx, const T &srcy, const T &destx, const T &desty, const T &t, T &nx, T &ny)
wykobi::circular_arc::px
T px
Definition: wykobi.hpp:457
wykobi::intersection_point
void intersection_point(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4, T &ix, T &iy)
wykobi::cubic_bezier::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:502
wykobi::quadratic_bezier::quadratic_bezier
quadratic_bezier()
Definition: wykobi.hpp:473
wykobi::minimum_distance_from_point_to_segment
T minimum_distance_from_point_to_segment(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::intersect_vertical_vertical
bool intersect_vertical_vertical(const segment< T, 2 > &segment1, const segment< T, 2 > &segment2)
wykobi::eOutside
@ eOutside
Definition: wykobi.hpp:724
wykobi::RightHandSide
const int RightHandSide
Definition: wykobi.hpp:736
wykobi::line::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:294
wykobi::closest_point_on_sphere_from_point
point3d< T > closest_point_on_sphere_from_point(const sphere< T > &sphere, const point3d< T > &point)
wykobi::point2d::type
T type
Definition: wykobi.hpp:76
wykobi::perspectrix
line< T, 2 > perspectrix(const triangle< T, 2 > &triangle1, const triangle< T, 2 > &triangle2)
wykobi::minimum_distance_from_point_to_rectangle
T minimum_distance_from_point_to_rectangle(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::quadix::~quadix
~quadix()
Definition: wykobi.hpp:364
wykobi::vector2d::operator=
vector2d< T > & operator=(const vectornd< T, 2 > &vec)
Definition: wykobi.hpp:589
wykobi::circle_internal_tangent_lines
void circle_internal_tangent_lines(const circle< T > &circle0, const circle< T > &circle1, std::vector< line< T, 2 > > &lines)
wykobi::etObtuse
@ etObtuse
Definition: wykobi.hpp:731
wykobi::intersect_horizontal_horizontal
bool intersect_horizontal_horizontal(const segment< T, 2 > &segment1, const segment< T, 2 > &segment2)
wykobi::rectangle::size
std::size_t size() const
Definition: wykobi.hpp:354
wykobi::robust_orientation
int robust_orientation(const T &x1, const T &y1, const T &x2, const T &y2, const T &px, const T &py)
wykobi::closest_point_on_rectangle_from_point
void closest_point_on_rectangle_from_point(const T &x1, const T &y1, const T &x2, const T &y2, const T &px, const T &py, T &nx, T &ny)
wykobi::rotate
void rotate(const T &rotation_angle, const T &x, const T &y, T &nx, T &ny)
wykobi::point3d::point3d
point3d(const pointnd< T, 3 > &point)
Definition: wykobi.hpp:115
wykobi::BelowOrientation
const int BelowOrientation
Definition: wykobi.hpp:742
wykobi::circle_tangent_points
void circle_tangent_points(const circle< T > &circle, const point2d< T > &point, point2d< T > &point1, point2d< T > &point2)
wykobi::vectornd::vectornd
vectornd(const T &v0, const T &v1, const T &v2)
Definition: wykobi.hpp:625
wykobi::cubic_bezier::size
std::size_t size() const
Definition: wykobi.hpp:513
wykobi::circular_arc::angle1
T angle1
Definition: wykobi.hpp:458
wykobi::collinear_vertex
bool collinear_vertex(const std::size_t &index, const polygon< T, 2 > &polygon)
wykobi::eFully
@ eFully
Definition: wykobi.hpp:724
wykobi::make_box
box< T, 3 > make_box(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2)
wykobi::line::~line
~line()
Definition: wykobi.hpp:292
wykobi::excircle
circle< T > excircle(const triangle< T, 2 > &triangle, const std::size_t &i)
wykobi::make_polygon
polygon< T, D > make_polygon(const InputIterator begin, const InputIterator end)
wykobi::circumsphere
sphere< T > circumsphere(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &x3, const T &y3, const T &z3)
wykobi::common_center
bool common_center(const circle< T > &circle1, const circle< T > &circle2)
wykobi::reverse_segment
segment< T, 2 > reverse_segment(const segment< T, 2 > &segment)
wykobi::quadratic_bezier::PointCount
const static std::size_t PointCount
Definition: wykobi.hpp:470
wykobi::quadix
Definition: wykobi.hpp:359
wykobi::bezier_convex_hull
triangle< T, 2 > bezier_convex_hull(const quadratic_bezier< T, 2 > &bezier)
wykobi::horizontal_mirror
T horizontal_mirror(const T &angle)
wykobi::define_bezier_type< T, 3, eQuadraticBezier >::BezierType
quadratic_bezier< T, 3 > BezierType
Definition: wykobi.hpp:528
wykobi::degenerate_quadix3d
quadix< T, 3 > degenerate_quadix3d()
wykobi::closest_point_on_aabbb_from_point
point2d< T > closest_point_on_aabbb_from_point(const rectangle< T > &rectangle, const point2d< T > &point)
wykobi::triangle_median
line< T, 2 > triangle_median(const triangle< T, 2 > &triangle, const std::size_t &median)
wykobi::eTriangle2D
@ eTriangle2D
Definition: wykobi.hpp:58
wykobi::generate_point_on_ray
point2d< T > generate_point_on_ray(const ray< T, 2 > &ray, const T &t)
wykobi::oriented_vertex_angle
T oriented_vertex_angle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const int orient=Clockwise)
wykobi::etScalene
@ etScalene
Definition: wykobi.hpp:730
wykobi::Cocircular
const int Cocircular
Definition: wykobi.hpp:746
wykobi::triangle
Definition: wykobi.hpp:311
wykobi::make_point
point2d< T > make_point(const T &x, const T &y)
wykobi::swap
void swap(point2d< T > &point1, point2d< T > &point2)
wykobi::quadix::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:374
wykobi::hypersphere::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:442
wykobi::sphere::z
T z
Definition: wykobi.hpp:435
wykobi::degenerate_ray2d
ray< T, 2 > degenerate_ray2d()
wykobi::point2d::operator=
point2d< T > & operator=(const pointnd< T, 2 > &point)
Definition: wykobi.hpp:84
wykobi::closest_point_on_triangle_from_point
void closest_point_on_triangle_from_point(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &px, const T &py, T &nx, T &ny)
wykobi::quadix::quadix
quadix()
Definition: wykobi.hpp:363
wykobi::convex_vertex
bool convex_vertex(const std::size_t &index, const polygon< T, 2 > &polygon, const int &polygon_orientation=LeftHandSide)
wykobi::bezier_coefficients::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:546
wykobi::AboveOrientation
const int AboveOrientation
Definition: wykobi.hpp:741
wykobi::feuerbach_point
point2d< T > feuerbach_point(const triangle< T, 2 > &triangle)
wykobi::eQuadix2D
@ eQuadix2D
Definition: wykobi.hpp:60
wykobi::quadix::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:366
wykobi::sin
T sin(const T &value)
Definition: wykobi_math.hpp:138
wykobi::negative_infinite_point2d
point2d< T > negative_infinite_point2d()
wykobi::make_vector
vector2d< T > make_vector(const T &x, const T &y)
wykobi::invert_sphere_across_sphere
sphere< T > invert_sphere_across_sphere(const sphere< T > &sphere1, const sphere< T > &sphere2)
wykobi::distance_from_point_to_sphere_center
T distance_from_point_to_sphere_center(const point3d< T > &point, const sphere< T > &sphere)
wykobi::eQuadraticBezier
@ eQuadraticBezier
Definition: wykobi.hpp:464
wykobi::right_shift
triangle< T, 2 > right_shift(const triangle< T, 2 > &triangle, const std::size_t &shift)
wykobi::CoplanarOrientation
const int CoplanarOrientation
Definition: wykobi.hpp:743
wykobi::define_bezier_type
Definition: wykobi.hpp:517
wykobi::box_corner
point3d< T > box_corner(const box< T, 3 > &box, const std::size_t &corner_index)
wykobi::mandart_circle
circle< T > mandart_circle(const triangle< T, 2 > &triangle)
wykobi::cubic_bezier::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:509
wykobi::point2d::operator()
const_reference operator()(const std::size_t &index) const
Definition: wykobi.hpp:93
wykobi::circular_arc::x2
T x2
Definition: wykobi.hpp:455
wykobi::project_onto_axis
segment< T, 2 > project_onto_axis(const point2d< T > &point, const line< T, 2 > &axis)
wykobi::pointnd::const_reference
const typedef T & const_reference
Definition: wykobi.hpp:168
wykobi::quadratic_bezier::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:477
wykobi
Definition: wykobi.hpp:32
wykobi::point3d::operator()
reference operator()(const std::size_t &index)
Definition: wykobi.hpp:125
wykobi::degenerate_ray3d
ray< T, 3 > degenerate_ray3d()
wykobi::cubic_bezier::reference
PointType & reference
Definition: wykobi.hpp:503
wykobi::box::~box
~box()
Definition: wykobi.hpp:707
wykobi::closest_point_on_circle_from_segment
point2d< T > closest_point_on_circle_from_segment(const circle< T > &circle, const segment< T, 2 > &segment)
wykobi::point2d::x
T x
Definition: wykobi.hpp:104
wykobi::quadix::size
std::size_t size() const
Definition: wykobi.hpp:378
wykobi::tangent_line
line< T, 2 > tangent_line(const circle< T > &circle, const point2d< T > &point)
wykobi::cubic_bezier
Definition: wykobi.hpp:493
wykobi::create_medial_triangle
triangle< T, 2 > create_medial_triangle(const triangle< T, 2 > &triangle)
wykobi::closest_point_on_sphere_from_sphere
point3d< T > closest_point_on_sphere_from_sphere(const sphere< T > &sphere1, const sphere< T > &sphere2)
wykobi::operator*
T operator*(const vector2d< T > &v1, const vector2d< T > &v2)
wykobi::closest_point_on_circle_from_point
point2d< T > closest_point_on_circle_from_point(const circle< T > &circle, const point2d< T > &point)
wykobi::inscribed_sphere
sphere< T > inscribed_sphere(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &x3, const T &y3, const T &z3)
wykobi::circular_arc::angle2
T angle2
Definition: wykobi.hpp:459
wykobi::create_circumcevian_triangle
triangle< T, 2 > create_circumcevian_triangle(const triangle< T, 2 > &triangle, const point2d< T > &point)
wykobi::aabb
rectangle< T > aabb(const segment< T, 2 > &segment)
wykobi::point3d::z
T z
Definition: wykobi.hpp:135
wykobi::cocircular
bool cocircular(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4, const T &epsilon=T(Epsilon))
wykobi::point_in_convex_polygon
bool point_in_convex_polygon(const T &px, const T &py, const polygon< T, 2 > &polygon)
wykobi::triangle3d
triangle< Float, 3 > triangle3d
Definition: wykobi.hpp:787
wykobi::degenerate_segment3d
segment< T, 3 > degenerate_segment3d()
wykobi::order_sensitive_closest_point_on_segment_from_point
void order_sensitive_closest_point_on_segment_from_point(const T &x1, const T &y1, const T &x2, const T &y2, const T &px, const T &py, T &nx, T &ny)
wykobi::trig_luts
Definition: wykobi.hpp:757
wykobi::create_inner_napoleon_triangle
triangle< T, 2 > create_inner_napoleon_triangle(const triangle< T, 2 > &triangle)
wykobi::polygon::clear
void clear() const
Definition: wykobi.hpp:407
wykobi::point3d::point3d
point3d()
Definition: wykobi.hpp:114
wykobi::isogonal_conjugate
point2d< T > isogonal_conjugate(const point2d< T > &point, const triangle< T, 2 > &triangle)
wykobi::simplex_to_bezier_intersect
bool simplex_to_bezier_intersect(const Simplex &simplex, const Bezier &bezier, const std::size_t &steps)
wykobi::polygon::polygon
polygon(const std::size_t initial_size=0)
Definition: wykobi.hpp:385
wykobi::vectornd
Definition: wykobi.hpp:579
wykobi::triangle::reference
PointType & reference
Definition: wykobi.hpp:320
wykobi::degenerate_triangle3d
triangle< T, 3 > degenerate_triangle3d()
wykobi::line::size
std::size_t size()
Definition: wykobi.hpp:306
wykobi::point_of_reflection
bool point_of_reflection(const T &sx1, const T &sy1, const T &sx2, const T &sy2, const T &p1x, const T &p1y, const T &p2x, const T &p2y, T &rpx, T &rpy)
wykobi::order_sensitive_closest_point_on_line_from_point
void order_sensitive_closest_point_on_line_from_point(const T &x1, const T &y1, const T &x2, const T &y2, const T &px, const T &py, T &nx, T &ny)
wykobi::segment2d
segment< Float, 2 > segment2d
Definition: wykobi.hpp:780
wykobi::pointnd::pointnd
pointnd()
Definition: wykobi.hpp:171
wykobi::PointInside
const int PointInside
Definition: wykobi.hpp:744
wykobi::polygon::value_type
PointType value_type
Definition: wykobi.hpp:398
wykobi::incenter
void incenter(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, T &px, T &py)
wykobi::polygon_within_box
bool polygon_within_box(const polygon< T, 3 > &polygon, const box< T, 3 > &box)
wykobi::ePartially
@ ePartially
Definition: wykobi.hpp:724
wykobi::degenerate_line2d
line< T, 2 > degenerate_line2d()
wykobi::positive_infinite_point2d
point2d< T > positive_infinite_point2d()
wykobi::quadix3d
quadix< Float, 3 > quadix3d
Definition: wykobi.hpp:788
wykobi::distance_from_point_to_circle_center
T distance_from_point_to_circle_center(const point2d< T > &point, const circle< T > &circle)
wykobi::point2d::point2d
point2d()
Definition: wykobi.hpp:80
wykobi::create_perpendicular_line_at_end_point
line< T, 2 > create_perpendicular_line_at_end_point(const line< T, 2 > &line)
wykobi::point2d::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:100
wykobi::negative_infinite_point3d
point3d< T > negative_infinite_point3d()
wykobi::vectornd::vectornd
vectornd(const vector2d< T > &vec)
Definition: wykobi.hpp:642
wykobi::scale
point2d< T > scale(const T &dx, const T &dy, const point2d< T > &point)
wykobi::create_inner_vecten_triangle
triangle< T, 2 > create_inner_vecten_triangle(const triangle< T, 2 > &triangle)
wykobi::CLIP_BOTTOM
const int CLIP_BOTTOM
Definition: wykobi.hpp:750
wykobi::is_equal
bool is_equal(const T &val1, const T &val2, const T &epsilon)
wykobi::Clockwise
const int Clockwise
Definition: wykobi.hpp:738
wykobi::torricelli_point
void torricelli_point(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, T &px, T &py)
wykobi::circle_outer_tangent_lines
void circle_outer_tangent_lines(const circle< T > &circle0, const circle< T > &circle1, std::vector< line< T, 2 > > &lines)
wykobi::polygon::reverse
void reverse()
Definition: wykobi.hpp:421
wykobi::create_intouch_triangle
triangle< T, 2 > create_intouch_triangle(const triangle< T, 2 > &triangle)
wykobi::circular_arc::cx
T cx
Definition: wykobi.hpp:456
wykobi::nine_point_circle
circle< T > nine_point_circle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::segment::segment
segment()
Definition: wykobi.hpp:267
wykobi::eInclusion
eInclusion
Definition: wykobi.hpp:724
wykobi::pointnd::pointnd
pointnd(const point2d< T > &point)
Definition: wykobi.hpp:192
wykobi::define_bezier_type< T, 2, eQuadraticBezier >::BezierType
quadratic_bezier< T, 2 > BezierType
Definition: wykobi.hpp:522
wykobi::ray::direction
VectorType direction
Definition: wykobi.hpp:683
wykobi::triangle::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:326
wykobi::make_quadix
quadix< T, 2 > make_quadix(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::trig_luts::TableSize
const static unsigned int TableSize
Definition: wykobi.hpp:759
wykobi::create_orthic_triangle
triangle< T, 2 > create_orthic_triangle(const triangle< T, 2 > &triangle)
wykobi::curve_point::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:561
wykobi::generate_bezier
void generate_bezier(const quadratic_bezier< T, 2 > &bezier, OutputIterator out, const std::size_t &point_count=1000)
wykobi::polygon::erase
void erase(const std::size_t index)
Definition: wykobi.hpp:409
wykobi::line::line
line()
Definition: wykobi.hpp:291
wykobi::closest_point_on_plane_from_point
point3d< T > closest_point_on_plane_from_point(const plane< T, 3 > &plane, const point3d< T > &point)
wykobi::point_on_triangle
bool point_on_triangle(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3)
wykobi::robust_parallel
bool robust_parallel(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4, const T &epsilon=T(Epsilon))
wykobi::edge
segment< T, 2 > edge(const triangle< T, 2 > &triangle, const std::size_t &edge_index)
wykobi::make_sphere
sphere< T > make_sphere(const T &x, const T &y, const T &z, const T &radius)
wykobi::pointnd::v
T v[D]
Definition: wykobi.hpp:240
wykobi::robust_perpendicular
bool robust_perpendicular(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4, const T &epsilon=T(Epsilon))
wykobi::trilateration
bool trilateration(const T &c0x, const T &c0y, const T &c0r, const T &c1x, const T &c1y, const T &c1r, const T &c2x, const T &c2y, const T &c2r, T &px, T &py)
wykobi::project_point225
void project_point225(const T &px, const T &py, const T &distance, T &nx, T &ny)
wykobi::point3d::y
T y
Definition: wykobi.hpp:135
wykobi::bezier_coefficients
Definition: wykobi.hpp:545
wykobi::quadratic_bezier::Type
const static BezierType Type
Definition: wykobi.hpp:471
wykobi::point_in_circle
bool point_in_circle(const T &px, const T &py, const T &cx, const T &cy, const T &radius)
wykobi::degenerate_quadix2d
quadix< T, 2 > degenerate_quadix2d()
wykobi::point_in_rectangle
bool point_in_rectangle(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::coplanar
bool coplanar(const ray< T, 3 > &ray1, const ray< T, 3 > &ray2)
wykobi::cubic_bezier::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:510
wykobi::cubic_bezier::cubic_bezier
cubic_bezier()
Definition: wykobi.hpp:498
wykobi::curve_point::~curve_point
~curve_point()
Definition: wykobi.hpp:558
wykobi::create_parallel_segment_on_point
segment< T, 2 > create_parallel_segment_on_point(const line< T, 2 > &line, const point2d< T > &point)
wykobi::segment::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:278
wykobi::define_vector_type< T, 2 >::VectorType
vector2d< T > VectorType
Definition: wykobi.hpp:663
wykobi::sphere
Definition: wykobi.hpp:433
wykobi::point3d::Type
T Type
Definition: wykobi.hpp:110
wykobi::pointnd
Definition: wykobi.hpp:71
wykobi::hypersphere::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:443
wykobi::center_at_location
segment< T, 2 > center_at_location(const segment< T, 2 > &segment, const T &x, const T &y)
wykobi::vectornd::vectornd
vectornd(const vectornd< T, D > &vec)
Definition: wykobi.hpp:638
wykobi::CLIP_LEFT
const int CLIP_LEFT
Definition: wykobi.hpp:752
wykobi::vector2d::vector2d
vector2d(const T &_x=T(0.0), const T &_y=T(0.0))
Definition: wykobi.hpp:584
wykobi::point3d
Definition: wykobi.hpp:108
wykobi::plane::~plane
~plane()
Definition: wykobi.hpp:691
wykobi::create_anticevian_triangle
triangle< T, 2 > create_anticevian_triangle(const triangle< T, 2 > &triangle, const point2d< T > &point)
wykobi::quadix::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:367
wykobi::pointnd::clear
void clear()
Definition: wykobi.hpp:202
wykobi::point_on_rectangle
bool point_on_rectangle(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::box::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:709
wykobi::positive_infinite_point3d
point3d< T > positive_infinite_point3d()
wykobi::pointnd::operator=
pointnd< T, D > & operator=(const point2d< T > &point)
Definition: wykobi.hpp:212
wykobi::distance_line_to_line
T distance_line_to_line(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::pointnd::operator()
reference operator()(const std::size_t &index)
Definition: wykobi.hpp:229
wykobi::create_contact_triangle
triangle< T, 2 > create_contact_triangle(const triangle< T, 2 > &triangle)
wykobi::point_on_segment
bool point_on_segment(const point2d< T > &point, const segment< T, 2 > &segment)
wykobi::point_on_quadix
bool point_on_quadix(const T &px, const T &py, const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::sphere::y
T y
Definition: wykobi.hpp:435
wykobi::operator==
bool operator==(const point2d< T > &point1, const point2d< T > &point2)
wykobi::quadratic_bezier::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:485
wykobi::update_sphere
sphere< T > update_sphere(const sphere< T > &sphere, point3d< T > &point)
wykobi::point2d::operator[]
reference operator[](const std::size_t &index)
Definition: wykobi.hpp:97
wykobi::polygon::PointType
define_point_type< T, Dimension >::PointType PointType
Definition: wykobi.hpp:388
wykobi::vectornd::vectornd
vectornd(const vector3d< T > &vec)
Definition: wykobi.hpp:647
wykobi::degenerate_vector2d
vector2d< T > degenerate_vector2d()
wykobi::simple_intersect
bool simple_intersect(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::project_point315
void project_point315(const T &px, const T &py, const T &distance, T &nx, T &ny)
wykobi::triangle2d
triangle< Float, 2 > triangle2d
Definition: wykobi.hpp:782
wykobi::triple_product
T triple_product(const vector3d< T > &v1, const vector3d< T > &v2, const vector3d< T > &v3)
wykobi::point3d::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:131
wykobi::distance
T distance(const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::ray::origin
PointType origin
Definition: wykobi.hpp:682
wykobi::lay_distance_line_to_line
T lay_distance_line_to_line(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::distance_segment_to_segment
T distance_segment_to_segment(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::make_segment
segment< T, 2 > make_segment(const T &x1, const T &y1, const T &x2, const T &y2)
wykobi::point3d::x
T x
Definition: wykobi.hpp:135
wykobi::is_convex_polygon
bool is_convex_polygon(const polygon< T, 2 > &polygon)
wykobi::are_perspective_triangles
bool are_perspective_triangles(const triangle< T, 2 > &triangle1, const triangle< T, 2 > &triangle2)
wykobi::box_within_box
bool box_within_box(const T &x1, const T &y1, const T &z1, const T &x2, const T &y2, const T &z2, const T &x3, const T &y3, const T &z3, const T &x4, const T &y4, const T &z4)
wykobi::point2d::reference
type & reference
Definition: wykobi.hpp:78
wykobi::create_first_brocard_triangle
triangle< T, 2 > create_first_brocard_triangle(const triangle< T, 2 > &triangle)
wykobi::polygon::const_iterator
std::vector< PointType >::const_iterator const_iterator
Definition: wykobi.hpp:397
wykobi::create_right_triangle
void create_right_triangle(const wykobi::point2d< T > &p1, const wykobi::point2d< T > &p2, wykobi::point2d< T > &c1, wykobi::point2d< T > &c2)
wykobi::collinear
bool collinear(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &epsilon=T(Epsilon))
wykobi::line_to_line_intersect
bool line_to_line_intersect(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3, const T &x4, const T &y4)
wykobi::rectangle::reference
PointType & reference
Definition: wykobi.hpp:344
wykobi::create_circummedial_triangle
triangle< T, 2 > create_circummedial_triangle(const triangle< T, 2 > &triangle)
wykobi::quadix2d
quadix< Float, 2 > quadix2d
Definition: wykobi.hpp:783
wykobi::area
T area(const point2d< T > &point1, const point2d< T > &point2, const point2d< T > &point3)
wykobi::create_outer_napoleon_triangle
triangle< T, 2 > create_outer_napoleon_triangle(const triangle< T, 2 > &triangle)
wykobi::rectangle::operator[]
const_reference operator[](const std::size_t &index) const
Definition: wykobi.hpp:351
wykobi::eRectangle
@ eRectangle
Definition: wykobi.hpp:54
wykobi::create_equilateral_triangle
void create_equilateral_triangle(const T &x1, const T &y1, const T &x2, const T &y2, T &x3, T &y3)
wykobi::point_in_polygon_winding_number
bool point_in_polygon_winding_number(const T &px, const T &py, const polygon< T, 2 > &polygon)
wykobi::robust_coplanar
bool robust_coplanar(const point3d< T > point1, const point3d< T > point2, const point3d< T > point3, const point3d< T > point4, const T &epsilon=T(Epsilon))
wykobi::line::PointCount
const static std::size_t PointCount
Definition: wykobi.hpp:289
wykobi::quadix::PointCount
const static std::size_t PointCount
Definition: wykobi.hpp:361
wykobi::quadix::reference
PointType & reference
Definition: wykobi.hpp:368
wykobi::cubic_bezier::PointCount
const static std::size_t PointCount
Definition: wykobi.hpp:495
wykobi::is_tangent
bool is_tangent(const segment< T, 2 > &segment, const circle< T > &circle)
wykobi::create_point_on_bezier
point2d< T > create_point_on_bezier(const point2d< T > &start_point, const T &ax, const T &bx, const T &ay, const T &by, const T &t)
wykobi::convex_quadix
bool convex_quadix(const quadix< T, 2 > &quadix)
wykobi::pointnd::pointnd
pointnd(const pointnd< T, D > &point)
Definition: wykobi.hpp:188
wykobi::update_rectangle
rectangle< T > update_rectangle(const rectangle< T > &rectangle, point2d< T > &point)
wykobi::bezier_coefficients::const_reference
const typedef PointType & const_reference
Definition: wykobi.hpp:547
wykobi::triangle::PointCount
const static std::size_t PointCount
Definition: wykobi.hpp:313
wykobi::PointOutside
const int PointOutside
Definition: wykobi.hpp:745
wykobi::line2d
line< Float, 2 > line2d
Definition: wykobi.hpp:781