MeshLib Documentation
Loading...
Searching...
No Matches
MRTriangleIntersection.h File Reference
#include "MRVector3.h"
#include "MRIntersectionPrecomputes.h"
#include "MRTriPoint.h"
#include <algorithm>
#include <optional>

Go to the source code of this file.

Classes

struct  MR::TriIntersectResult
 

Namespaces

namespace  MR
 

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::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< TriIntersectResultMR::rayTriangleIntersect_ (const Vector3< T > &oriA, const Vector3< T > &oriB, const Vector3< T > &oriC, const IntersectionPrecomputes< T > &prec)
 
std::optional< TriIntersectResultMR::rayTriangleIntersect (const Vector3f &oriA, const Vector3f &oriB, const Vector3f &oriC, const IntersectionPrecomputes< float > &prec)
 
std::optional< TriIntersectResultMR::rayTriangleIntersect (const Vector3f &oriA, const Vector3f &oriB, const Vector3f &oriC, const Vector3f &dir)
 
std::optional< TriIntersectResultMR::rayTriangleIntersect (const Vector3d &oriA, const Vector3d &oriB, const Vector3d &oriC, const IntersectionPrecomputes< double > &prec)
 
std::optional< TriIntersectResultMR::rayTriangleIntersect (const Vector3d &oriA, const Vector3d &oriB, const Vector3d &oriC, const Vector3d &dir)