#include <BV_Overlap.h>
Static Public Member Functions | |
| static bool | doCoplanarTriTriOverlap (const bvTriangle &tri1, const bvTriangle &tri2, fpreal tol=0.0f) |
| Returns true if two coplanar triangles overlap. | |
| static bool | doTriTriOverlap (const bvTriangle &tri1, const bvTriangle &tri2, fpreal tol=0.0f) |
| Returns true if two triangles overlap. | |
| static bool | doTriTriOverlap (const bvTriangle &tri1, const bvTriangle &tri2, bool &coplanar, UT_Vector3 &isectpt1, UT_Vector3 &isectpt2, fpreal tol=0.0f) |
| Returns the intersection points when two triangles overlap. | |
| static bool | doCoplanarQuadQuadOverlap (const bvQuad &q1, const bvQuad &q2, fpreal tol=0.0f) |
| Returns true if two coplanar quadrilaterals overlap. | |
| static bool | doPlaneBoxOverlap (const UT_Vector3 &normal, const fpreal d, const UT_Vector3 &maxbox, fpreal tol=0.0f) |
| Returns true if a plane and a box overlap. | |
| static bool | doTriBoxOverlap (const bvTriangle &tri, const UT_Vector3 &ra, const UT_Matrix3 &R, const UT_Vector3 &T, bool lite=false) |
| static bool | doBoxBoxOverlap (const UT_Vector3 &ra, const UT_Vector3 &rb, const UT_Matrix3 &R, const UT_Vector3 &T, fpreal tol=0.f, bool lite=false) |
| static void | calcAABB (const UT_Vector3 &ra, const UT_DMatrix4 &xform, UT_Vector3 &rnew, UT_Vector3 &Tnew) |
| static void | calcAABB (const UT_Vector3 &ra, const UT_DMatrix4 &xform, const UT_Matrix3 &R, const UT_Vector3 &T, UT_Vector3 &rnew, UT_Vector3 &Tnew) |
| static bool | doBoxBoxOverlap (const UT_Vector3 &ra, const UT_Vector3 &rb, const UT_DMatrix4 &xform1, const UT_DMatrix4 &xform2, const UT_Matrix3 &R, const UT_Vector3 &T, fpreal tol, bool lite=false, bool useOBB=true) |
Definition at line 46 of file BV_Overlap.h.
| static void BV_Overlap::calcAABB | ( | const UT_Vector3 & | ra, | |
| const UT_DMatrix4 & | xform, | |||
| const UT_Matrix3 & | R, | |||
| const UT_Vector3 & | T, | |||
| UT_Vector3 & | rnew, | |||
| UT_Vector3 & | Tnew | |||
| ) | [static] |
| static void BV_Overlap::calcAABB | ( | const UT_Vector3 & | ra, | |
| const UT_DMatrix4 & | xform, | |||
| UT_Vector3 & | rnew, | |||
| UT_Vector3 & | Tnew | |||
| ) | [static] |
Given an AABB (with radii ra -- half of dimension) and center at origin calculate an AABB (parallel to the original AABB) that contains the original AABB and an OBB by applying xform to the original AABB.
| static bool BV_Overlap::doBoxBoxOverlap | ( | const UT_Vector3 & | ra, | |
| const UT_Vector3 & | rb, | |||
| const UT_DMatrix4 & | xform1, | |||
| const UT_DMatrix4 & | xform2, | |||
| const UT_Matrix3 & | R, | |||
| const UT_Vector3 & | T, | |||
| fpreal | tol, | |||
| bool | lite = false, |
|||
| bool | useOBB = true | |||
| ) | [static] |
Given two OBBs (second determined by a relative transform R & T), checks for overlaps between the OBBs with each containing one original OBB and the OBB after applying xform.
| static bool BV_Overlap::doBoxBoxOverlap | ( | const UT_Vector3 & | ra, | |
| const UT_Vector3 & | rb, | |||
| const UT_Matrix3 & | R, | |||
| const UT_Vector3 & | T, | |||
| fpreal | tol = 0.f, |
|||
| bool | lite = false | |||
| ) | [static] |
This checks for overlaps for two static OBBs. This method is based on the Seperating Axis Theorem (SAT). The lite version of this, algorithm, dubbed SAT-lite, satistically has only about 15% chance of reporting disjoint bounding boxes as intersecting. However, this may improve runtime in some situations since this is 2.5 times faster than the original SAT, by only checking the face-face axis (and ignoring the edges). This may generate false positives however.
| static bool BV_Overlap::doCoplanarQuadQuadOverlap | ( | const bvQuad & | q1, | |
| const bvQuad & | q2, | |||
| fpreal | tol = 0.0f | |||
| ) | [static] |
Returns true if two coplanar quadrilaterals overlap.
| static bool BV_Overlap::doCoplanarTriTriOverlap | ( | const bvTriangle & | tri1, | |
| const bvTriangle & | tri2, | |||
| fpreal | tol = 0.0f | |||
| ) | [static] |
Returns true if two coplanar triangles overlap.
| static bool BV_Overlap::doPlaneBoxOverlap | ( | const UT_Vector3 & | normal, | |
| const fpreal | d, | |||
| const UT_Vector3 & | maxbox, | |||
| fpreal | tol = 0.0f | |||
| ) | [static] |
Returns true if a plane and a box overlap.
| static bool BV_Overlap::doTriBoxOverlap | ( | const bvTriangle & | tri, | |
| const UT_Vector3 & | ra, | |||
| const UT_Matrix3 & | R, | |||
| const UT_Vector3 & | T, | |||
| bool | lite = false | |||
| ) | [static] |
Uses the Seperating Axis Theorem (SAT) to test for triangle/box intersection. The lite version avoids edge tests, but may generate false positives.
| static bool BV_Overlap::doTriTriOverlap | ( | const bvTriangle & | tri1, | |
| const bvTriangle & | tri2, | |||
| bool & | coplanar, | |||
| UT_Vector3 & | isectpt1, | |||
| UT_Vector3 & | isectpt2, | |||
| fpreal | tol = 0.0f | |||
| ) | [static] |
Returns the intersection points when two triangles overlap.
| static bool BV_Overlap::doTriTriOverlap | ( | const bvTriangle & | tri1, | |
| const bvTriangle & | tri2, | |||
| fpreal | tol = 0.0f | |||
| ) | [static] |
Returns true if two triangles overlap.
1.5.9