16 template <
int N,
typename Real>
31 template <
int N,
typename Real>
34 template <
typename Real>
37 template <
typename Real>
41 template <
int N,
typename Real>
43 DCPQuery<Real, Ray<N, Real>, Ray<N, Real>>::operator()(
44 Ray<N, Real>
const& ray0, Ray<N, Real>
const& ray1)
49 Real a01 = -
Dot(ray0.direction, ray1.direction);
50 Real b0 =
Dot(diff, ray0.direction), b1;
56 b1 = -
Dot(diff, ray1.direction);
65 Real det = (Real)1 - a01 * a01;
139 b1 = -
Dot(diff, ray1.direction);
151 result.parameter[0] =
s0;
152 result.parameter[1] =
s1;
153 result.closestPoint[0] = ray0.origin + s0 * ray0.direction;
154 result.closestPoint[1] = ray1.origin + s1 * ray1.direction;
155 diff = result.closestPoint[0] - result.closestPoint[1];
156 result.sqrDistance =
Dot(diff, diff);
157 result.distance = sqrt(result.sqrDistance);
gte::BSNumber< UIntegerType > abs(gte::BSNumber< UIntegerType > const &number)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s0
GLsizei GLsizei GLfloat distance
Result operator()(Type0 const &primitive0, Type1 const &primitive1)
DualQuaternion< Real > Dot(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1