2#include <muda/muda_def.h>
3#include <muda/ext/geo/distance/distance_type.h>
4#include <muda/ext/geo/distance/distance_unclassified.h>
8namespace muda::distance
10template <
typename T,
int dim>
11MUDA_GENERIC
bool point_edge_cd_broadphase(
const Eigen::Matrix<T, dim, 1>& x0,
12 const Eigen::Matrix<T, dim, 1>& x1,
13 const Eigen::Matrix<T, dim, 1>& x2,
17MUDA_GENERIC
bool point_edge_ccd_broadphase(
const Eigen::Matrix<T, 2, 1>& p,
18 const Eigen::Matrix<T, 2, 1>& e0,
19 const Eigen::Matrix<T, 2, 1>& e1,
20 const Eigen::Matrix<T, 2, 1>& dp,
21 const Eigen::Matrix<T, 2, 1>& de0,
22 const Eigen::Matrix<T, 2, 1>& de1,
26MUDA_GENERIC
bool point_triangle_cd_broadphase(
const Eigen::Matrix<T, 3, 1>& p,
27 const Eigen::Matrix<T, 3, 1>& t0,
28 const Eigen::Matrix<T, 3, 1>& t1,
29 const Eigen::Matrix<T, 3, 1>& t2,
32MUDA_GENERIC
bool edge_edge_cd_broadphase(
const Eigen::Matrix<T, 3, 1>& ea0,
33 const Eigen::Matrix<T, 3, 1>& ea1,
34 const Eigen::Matrix<T, 3, 1>& eb0,
35 const Eigen::Matrix<T, 3, 1>& eb1,
39MUDA_GENERIC
bool point_triangle_ccd_broadphase(
const Eigen::Matrix<T, 3, 1>& p,
40 const Eigen::Matrix<T, 3, 1>& t0,
41 const Eigen::Matrix<T, 3, 1>& t1,
42 const Eigen::Matrix<T, 3, 1>& t2,
43 const Eigen::Matrix<T, 3, 1>& dp,
44 const Eigen::Matrix<T, 3, 1>& dt0,
45 const Eigen::Matrix<T, 3, 1>& dt1,
46 const Eigen::Matrix<T, 3, 1>& dt2,
50MUDA_GENERIC
bool edge_edge_ccd_broadphase(
const Eigen::Matrix<T, 3, 1>& ea0,
51 const Eigen::Matrix<T, 3, 1>& ea1,
52 const Eigen::Matrix<T, 3, 1>& eb0,
53 const Eigen::Matrix<T, 3, 1>& eb1,
54 const Eigen::Matrix<T, 3, 1>& dea0,
55 const Eigen::Matrix<T, 3, 1>& dea1,
56 const Eigen::Matrix<T, 3, 1>& deb0,
57 const Eigen::Matrix<T, 3, 1>& deb1,
61MUDA_GENERIC
bool point_edge_ccd_broadphase(
const Eigen::Matrix<T, 3, 1>& p,
62 const Eigen::Matrix<T, 3, 1>& e0,
63 const Eigen::Matrix<T, 3, 1>& e1,
64 const Eigen::Matrix<T, 3, 1>& dp,
65 const Eigen::Matrix<T, 3, 1>& de0,
66 const Eigen::Matrix<T, 3, 1>& de1,
69MUDA_GENERIC
bool point_point_ccd_broadphase(
const Eigen::Matrix<T, 3, 1>& p0,
70 const Eigen::Matrix<T, 3, 1>& p1,
71 const Eigen::Matrix<T, 3, 1>& dp0,
72 const Eigen::Matrix<T, 3, 1>& dp1,
76MUDA_GENERIC
bool point_triangle_ccd(Eigen::Matrix<T, 3, 1> p,
77 Eigen::Matrix<T, 3, 1> t0,
78 Eigen::Matrix<T, 3, 1> t1,
79 Eigen::Matrix<T, 3, 1> t2,
80 Eigen::Matrix<T, 3, 1> dp,
81 Eigen::Matrix<T, 3, 1> dt0,
82 Eigen::Matrix<T, 3, 1> dt1,
83 Eigen::Matrix<T, 3, 1> dt2,
90MUDA_GENERIC
bool edge_edge_ccd(Eigen::Matrix<T, 3, 1> ea0,
91 Eigen::Matrix<T, 3, 1> ea1,
92 Eigen::Matrix<T, 3, 1> eb0,
93 Eigen::Matrix<T, 3, 1> eb1,
94 Eigen::Matrix<T, 3, 1> dea0,
95 Eigen::Matrix<T, 3, 1> dea1,
96 Eigen::Matrix<T, 3, 1> deb0,
97 Eigen::Matrix<T, 3, 1> deb1,
104MUDA_GENERIC
bool point_edge_ccd(
const Eigen::Matrix<T, 2, 1>& x0,
105 const Eigen::Matrix<T, 2, 1>& x1,
106 const Eigen::Matrix<T, 2, 1>& x2,
107 const Eigen::Matrix<T, 2, 1>& d0,
108 const Eigen::Matrix<T, 2, 1>& d1,
109 const Eigen::Matrix<T, 2, 1>& d2,
114MUDA_GENERIC
bool point_edge_ccd(Eigen::Matrix<T, 3, 1> p,
115 Eigen::Matrix<T, 3, 1> e0,
116 Eigen::Matrix<T, 3, 1> e1,
117 Eigen::Matrix<T, 3, 1> dp,
118 Eigen::Matrix<T, 3, 1> de0,
119 Eigen::Matrix<T, 3, 1> de1,
125MUDA_GENERIC
bool point_point_ccd(Eigen::Matrix<T, 3, 1> p0,
126 Eigen::Matrix<T, 3, 1> p1,
127 Eigen::Matrix<T, 3, 1> dp0,
128 Eigen::Matrix<T, 3, 1> dp1,
135#include "details/ccd.inl"