UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::TIntrTriangle3Triangle3< Real > Class Template Reference

#include <IntrTriangle3Triangle3.h>

Public Member Functions

 TIntrTriangle3Triangle3 ()
 
 TIntrTriangle3Triangle3 (const TTriangle3< Real > &T0, const TTriangle3< Real > &T1)
 
void SetResult (const TVector< Real > &A, const TVector< Real > &B)
 
void SetResultNone ()
 
void SetResult (bool IsIntersecting)
 
TTriangle3< Real > GetTriangle0 () const
 
TTriangle3< Real > GetTriangle1 () const
 
bool GetReportCoplanarIntersection () const
 
Real GetTolerance () const
 
void SetTriangle0 (const TTriangle3< Real > &Triangle0In)
 
void SetTriangle1 (const TTriangle3< Real > &Triangle1In)
 
void SetReportCoplanarIntersection (bool bReportCoplanarIntersectionIn)
 
void SetTolerance (Real ToleranceIn)
 
TIntrTriangle3Triangle3Compute ()
 
bool Find ()
 
bool Test ()
 

Static Public Member Functions

static bool Intersects (const TTriangle3< Real > &Triangle0, const TTriangle3< Real > &Triangle1, Real Tolerance=TMathUtil< Real >::ZeroTolerance)
 
static void ProjectOntoAxis (const TTriangle3< Real > &triangle, const TVector< Real > &axis, Real &fmin, Real &fmax)
 
static void TrianglePlaneRelations (const TTriangle3< Real > &triangle, const TPlane3< Real > &plane, TVector< Real > &distance, FIndex3i &sign, int &positive, int &negative, int &zero, Real Tolerance)
 
static int IntersectTriangleWithCoplanarSegment (const TPlane3< Real > &plane, const TTriangle3< Real > &triangle, const TVector< Real > &end0, const TVector< Real > &end1, TVector< Real > &OutA, TVector< Real > &OutB, Real Tolerance)
 

Public Attributes

EIntersectionResult Result = EIntersectionResult::NotComputed
 
EIntersectionType Type = EIntersectionType::Empty
 
int Quantity = 0
 
TVector< Real > Points [6]
 

Protected Member Functions

bool ContainsPoint (const TTriangle3< Real > &triangle, const TPlane3< Real > &plane, const TVector< Real > &point)
 
bool IntersectsSegment (const TPlane3< Real > &plane, const TTriangle3< Real > &triangle, const TVector< Real > &end0, const TVector< Real > &end1)
 
bool GetCoplanarIntersection (const TPlane3< Real > &plane, const TTriangle3< Real > &tri0, const TTriangle3< Real > &tri1)
 

Protected Attributes

TTriangle3< Real > Triangle0
 
TTriangle3< Real > Triangle1
 
Real Tolerance = TMathUtil<Real>::ZeroTolerance
 
bool bReportCoplanarIntersection = false
 

Detailed Description

template<typename Real>
class UE::Geometry::TIntrTriangle3Triangle3< Real >

Compute intersection between 3D triangles use Test() for fast boolean query, does not compute intersection info use Find() to compute full information By default fully-contained co-planar triangles are not reported as intersecting. Call SetReportCoplanarIntersection(true) to handle this case (more expensive)

Constructor & Destructor Documentation

◆ TIntrTriangle3Triangle3() [1/2]

template<typename Real >
UE::Geometry::TIntrTriangle3Triangle3< Real >::TIntrTriangle3Triangle3 ( )
inline

◆ TIntrTriangle3Triangle3() [2/2]

template<typename Real >
UE::Geometry::TIntrTriangle3Triangle3< Real >::TIntrTriangle3Triangle3 ( const TTriangle3< Real > &  T0,
const TTriangle3< Real > &  T1 
)
inline

Member Function Documentation

◆ Compute()

template<typename Real >
TIntrTriangle3Triangle3 * UE::Geometry::TIntrTriangle3Triangle3< Real >::Compute ( )
inline

◆ ContainsPoint()

template<typename Real >
bool UE::Geometry::TIntrTriangle3Triangle3< Real >::ContainsPoint ( const TTriangle3< Real > &  triangle,
const TPlane3< Real > &  plane,
const TVector< Real > &  point 
)
inlineprotected

◆ Find()

template<typename Real >
bool UE::Geometry::TIntrTriangle3Triangle3< Real >::Find ( )
inline

◆ GetCoplanarIntersection()

template<typename Real >
bool UE::Geometry::TIntrTriangle3Triangle3< Real >::GetCoplanarIntersection ( const TPlane3< Real > &  plane,
const TTriangle3< Real > &  tri0,
const TTriangle3< Real > &  tri1 
)
inlineprotected

◆ GetReportCoplanarIntersection()

template<typename Real >
bool UE::Geometry::TIntrTriangle3Triangle3< Real >::GetReportCoplanarIntersection ( ) const
inline

◆ GetTolerance()

template<typename Real >
Real UE::Geometry::TIntrTriangle3Triangle3< Real >::GetTolerance ( ) const
inline

◆ GetTriangle0()

template<typename Real >
TTriangle3< Real > UE::Geometry::TIntrTriangle3Triangle3< Real >::GetTriangle0 ( ) const
inline

◆ GetTriangle1()

template<typename Real >
TTriangle3< Real > UE::Geometry::TIntrTriangle3Triangle3< Real >::GetTriangle1 ( ) const
inline

◆ Intersects()

template<typename Real >
static bool UE::Geometry::TIntrTriangle3Triangle3< Real >::Intersects ( const TTriangle3< Real > &  Triangle0,
const TTriangle3< Real > &  Triangle1,
Real  Tolerance = TMathUtil<Real>::ZeroTolerance 
)
inlinestatic

◆ IntersectsSegment()

template<typename Real >
bool UE::Geometry::TIntrTriangle3Triangle3< Real >::IntersectsSegment ( const TPlane3< Real > &  plane,
const TTriangle3< Real > &  triangle,
const TVector< Real > &  end0,
const TVector< Real > &  end1 
)
inlineprotected

◆ IntersectTriangleWithCoplanarSegment()

template<typename Real >
static int UE::Geometry::TIntrTriangle3Triangle3< Real >::IntersectTriangleWithCoplanarSegment ( const TPlane3< Real > &  plane,
const TTriangle3< Real > &  triangle,
const TVector< Real > &  end0,
const TVector< Real > &  end1,
TVector< Real > &  OutA,
TVector< Real > &  OutB,
Real  Tolerance 
)
inlinestatic

Solve a common sub-problem for triangle-triangle intersection – find the sub-segment (or point) where a triangle intersects a coplanar segment

Parameters
planeThe plane the triangle is on
triangleThe triangle to intersect
end0First point of line segment
end1Second point of line segment
OutAFirst point of intersection between line segment and triangle (if any)
OutBSecond point of intersection between line segment and triangle (if any)
ToleranceTolerance to use for segment-triangle intersection
Returns
Number of points representing the intersection result (0 for none, 1 for point, 2 for segment)

◆ ProjectOntoAxis()

template<typename Real >
static void UE::Geometry::TIntrTriangle3Triangle3< Real >::ProjectOntoAxis ( const TTriangle3< Real > &  triangle,
const TVector< Real > &  axis,
Real &  fmin,
Real &  fmax 
)
inlinestatic

◆ SetReportCoplanarIntersection()

template<typename Real >
void UE::Geometry::TIntrTriangle3Triangle3< Real >::SetReportCoplanarIntersection ( bool  bReportCoplanarIntersectionIn)
inline

◆ SetResult() [1/2]

template<typename Real >
void UE::Geometry::TIntrTriangle3Triangle3< Real >::SetResult ( bool  IsIntersecting)
inline

Store an externally-computed binary yes/no result

◆ SetResult() [2/2]

template<typename Real >
void UE::Geometry::TIntrTriangle3Triangle3< Real >::SetResult ( const TVector< Real > &  A,
const TVector< Real > &  B 
)
inline

Store an externally-computed segment intersection result

◆ SetResultNone()

template<typename Real >
void UE::Geometry::TIntrTriangle3Triangle3< Real >::SetResultNone ( )
inline

Store an externally-computed no-intersection result

◆ SetTolerance()

template<typename Real >
void UE::Geometry::TIntrTriangle3Triangle3< Real >::SetTolerance ( Real  ToleranceIn)
inline

◆ SetTriangle0()

template<typename Real >
void UE::Geometry::TIntrTriangle3Triangle3< Real >::SetTriangle0 ( const TTriangle3< Real > &  Triangle0In)
inline

◆ SetTriangle1()

template<typename Real >
void UE::Geometry::TIntrTriangle3Triangle3< Real >::SetTriangle1 ( const TTriangle3< Real > &  Triangle1In)
inline

◆ Test()

template<typename Real >
bool UE::Geometry::TIntrTriangle3Triangle3< Real >::Test ( )
inline

◆ TrianglePlaneRelations()

template<typename Real >
static void UE::Geometry::TIntrTriangle3Triangle3< Real >::TrianglePlaneRelations ( const TTriangle3< Real > &  triangle,
const TPlane3< Real > &  plane,
TVector< Real > &  distance,
FIndex3i sign,
int &  positive,
int &  negative,
int &  zero,
Real  Tolerance 
)
inlinestatic

Member Data Documentation

◆ bReportCoplanarIntersection

template<typename Real >
bool UE::Geometry::TIntrTriangle3Triangle3< Real >::bReportCoplanarIntersection = false
protected

◆ Points

template<typename Real >
TVector<Real> UE::Geometry::TIntrTriangle3Triangle3< Real >::Points[6]

◆ Quantity

template<typename Real >
int UE::Geometry::TIntrTriangle3Triangle3< Real >::Quantity = 0

◆ Result

◆ Tolerance

template<typename Real >
Real UE::Geometry::TIntrTriangle3Triangle3< Real >::Tolerance = TMathUtil<Real>::ZeroTolerance
protected

◆ Triangle0

template<typename Real >
TTriangle3<Real> UE::Geometry::TIntrTriangle3Triangle3< Real >::Triangle0
protected

◆ Triangle1

template<typename Real >
TTriangle3<Real> UE::Geometry::TIntrTriangle3Triangle3< Real >::Triangle1
protected

◆ Type


The documentation for this class was generated from the following file: