Classes | |
| struct | MR::TriIntersectResult |
Functions | |
| template<typename T > | |
| bool | MR::doTrianglesIntersect (Vector3< T > a, Vector3< T > b, Vector3< T > c, Vector3< T > d, Vector3< T > e, Vector3< T > f) |
| template<typename T > | |
| bool | MR::isPointInPlane (const Vector3< T > &p, const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c) |
| returns true if ABC plane contains point P | |
| template<typename T > | |
| bool | MR::isPointInTriangle (const Vector3< T > &p, const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c) |
| returns true if ABC triangle contains point P | |
| template<typename T > | |
| bool | MR::doesEdgeXySeparate (const Vector3< T > &x, const Vector3< T > &y, const Vector3< T > &z, const Vector3< T > &u, const Vector3< T > &v, const Vector3< T > &w, Vector3< T > d) |
| returns true if a plane containing edge XY separates point Z from triangle UVW | |
| template<typename T > | |
| bool | MR::doTrianglesIntersectExt (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d, const Vector3< T > &e, const Vector3< T > &f) |
| template<typename T > | |
| bool | MR::doTriangleLineIntersect (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d, const Vector3< T > &e) |
| checks whether triangle ABC and infinite line DE intersect | |
| template<typename T > | |
| bool | MR::doTriangleSegmentIntersect (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d, const Vector3< T > &e) |
| checks whether triangle ABC and segment DE intersect | |
| template<typename T > | |
| Vector3< T > | MR::findTriangleSegmentIntersection (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d, const Vector3< T > &e) |
| this function input should have intersection | |
| template<typename T > | |
| std::optional< Vector3< T > > | MR::findTriangleTriangleIntersection (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d, const Vector3< T > &e, const Vector3< T > &f) |
| template<typename T > | |
| std::optional< TriIntersectResult > | MR::rayTriangleIntersect (const Vector3< T > &oriA, const Vector3< T > &oriB, const Vector3< T > &oriC, const IntersectionPrecomputes< T > &prec) |
| template<typename T > | |
| std::optional< TriIntersectResult > | MR::rayTriangleIntersect (const Vector3< T > &oriA, const Vector3< T > &oriB, const Vector3< T > &oriC, const Vector3< T > &dir) |
| bool MR::doesEdgeXySeparate | ( | const Vector3< T > & | x, |
| const Vector3< T > & | y, | ||
| const Vector3< T > & | z, | ||
| const Vector3< T > & | u, | ||
| const Vector3< T > & | v, | ||
| const Vector3< T > & | w, | ||
| Vector3< T > | d ) |
returns true if a plane containing edge XY separates point Z from triangle UVW
| bool MR::doTriangleLineIntersect | ( | const Vector3< T > & | a, |
| const Vector3< T > & | b, | ||
| const Vector3< T > & | c, | ||
| const Vector3< T > & | d, | ||
| const Vector3< T > & | e ) |
checks whether triangle ABC and infinite line DE intersect
| bool MR::doTriangleSegmentIntersect | ( | const Vector3< T > & | a, |
| const Vector3< T > & | b, | ||
| const Vector3< T > & | c, | ||
| const Vector3< T > & | d, | ||
| const Vector3< T > & | e ) |
checks whether triangle ABC and segment DE intersect
| bool MR::doTrianglesIntersect | ( | Vector3< T > | a, |
| Vector3< T > | b, | ||
| Vector3< T > | c, | ||
| Vector3< T > | d, | ||
| Vector3< T > | e, | ||
| Vector3< T > | f ) |
checks whether triangles ABC and DEF intersect returns false if ABC and DEF are coplanar
| bool MR::doTrianglesIntersectExt | ( | const Vector3< T > & | a, |
| const Vector3< T > & | b, | ||
| const Vector3< T > & | c, | ||
| const Vector3< T > & | d, | ||
| const Vector3< T > & | e, | ||
| const Vector3< T > & | f ) |
checks whether triangles ABC and DEF intersect; performs more checks to avoid false positives of simple doTrianglesIntersect
| Vector3< T > MR::findTriangleSegmentIntersection | ( | const Vector3< T > & | a, |
| const Vector3< T > & | b, | ||
| const Vector3< T > & | c, | ||
| const Vector3< T > & | d, | ||
| const Vector3< T > & | e ) |
this function input should have intersection
| std::optional< Vector3< T > > MR::findTriangleTriangleIntersection | ( | const Vector3< T > & | a, |
| const Vector3< T > & | b, | ||
| const Vector3< T > & | c, | ||
| const Vector3< T > & | d, | ||
| const Vector3< T > & | e, | ||
| const Vector3< T > & | f ) |
returns any intersection point of triangle ABC and triangle DEF, if they intersects returns nullopt if they do not intersect (also might return nullopt in degenerated cases)
| bool MR::isPointInPlane | ( | const Vector3< T > & | p, |
| const Vector3< T > & | a, | ||
| const Vector3< T > & | b, | ||
| const Vector3< T > & | c ) |
returns true if ABC plane contains point P
| bool MR::isPointInTriangle | ( | const Vector3< T > & | p, |
| const Vector3< T > & | a, | ||
| const Vector3< T > & | b, | ||
| const Vector3< T > & | c ) |
returns true if ABC triangle contains point P
| std::optional< TriIntersectResult > MR::rayTriangleIntersect | ( | const Vector3< T > & | oriA, |
| const Vector3< T > & | oriB, | ||
| const Vector3< T > & | oriC, | ||
| const IntersectionPrecomputes< T > & | prec ) |
| std::optional< TriIntersectResult > MR::rayTriangleIntersect | ( | const Vector3< T > & | oriA, |
| const Vector3< T > & | oriB, | ||
| const Vector3< T > & | oriC, | ||
| const Vector3< T > & | dir ) |