22 #ifndef __dgIntersections__ 23 #define __dgIntersections__ 34 DG_MSC_VECTOR_ALIGMENT
42 dgFloat32 PolygonIntersect(
const dgVector &normal,
const dgFloat32 *
const polygon, dgInt32 strideInBytes,
const dgInt32 *
const indexArray, dgInt32 indexCount)
const;
43 dgFloat32 PolygonIntersectSimd(
const dgVector &normal,
const dgFloat32 *
const polygon, dgInt32 strideInBytes,
const dgInt32 *
const indexArray, dgInt32 indexCount)
const;
45 void Reset(dgFloat32 t) {
46 m_dpInv = m_dpBaseInv.Scale(dgFloat32(1.0f) / t);
61 dgInt32 m_isParallel[4];
64 dgFloat32 m_magRayTest;
65 } DG_GCC_VECTOR_ALIGMENT;
69 enum dgIntersectStatus {
74 typedef dgIntersectStatus(*dgAABBIntersectCallback)(
void *context,
75 const dgFloat32 *
const polygon, dgInt32 strideInBytes,
76 const dgInt32 *
const indexArray, dgInt32 indexCount);
78 typedef dgFloat32(*dgRayIntersectCallback)(
void *context,
79 const dgFloat32 *
const polygon, dgInt32 strideInBytes,
80 const dgInt32 *
const indexArray, dgInt32 indexCount);
87 dgObject *m_HitObjectOut;
88 dgFloat32 m_ParametricIntersctionOut;
115 void dgApi dgRayToRayDistance(
const dgVector &ray_p0,
125 bool dgApi dgPointToPolygonDistance(
const dgVector &point,
const dgFloat32 *
const polygon, dgInt32 strideInInBytes,
126 const dgInt32 *
const indexArray, dgInt32 indexCount, dgFloat32 bailOutDistance,
dgVector &pointOut);
159 return ((p0.m_x < q1.m_x) && (p1.m_x > q0.m_x) && (p0.m_z < q1.m_z) && (p1.m_z > q0.m_z) && (p0.m_y < q1.m_y) && (p1.m_y > q0.m_y));
163 #ifdef DG_BUILD_SIMD_CODE 164 simd_type test = simd_and_v(simd_cmplt_v((simd_type &)p0, (simd_type &) q1), simd_cmpgt_v((simd_type &)p1, (simd_type &) q0));
165 dgInt32 ret = _mm_movemask_ps(test);
166 return ((ret & 0x07) == 0x07);
Definition: dgIntersections.h:35
Definition: dgIntersections.h:83
Definition: dgVector.h:86
Definition: dgPolyhedra.h:76
Definition: dgVector.h:104