UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IntersectionUtil Namespace Reference

Functions

template<typename RealType >
bool RayTriangleTest (const TVector< RealType > &RayOrigin, const TVector< RealType > &RayDirection, const TVector< RealType > &V0, const TVector< RealType > &V1, const TVector< RealType > &V2)
 
template<typename RealType >
bool LineSphereTest (const TVector< RealType > &LineOrigin, const TVector< RealType > &LineDirection, const TVector< RealType > &SphereCenter, RealType SphereRadius)
 
template<typename RealType >
bool LineSphereIntersection (const TVector< RealType > &LineOrigin, const TVector< RealType > &LineDirection, const TVector< RealType > &SphereCenter, RealType SphereRadius, FLinearIntersection &ResultOut)
 
template<typename RealType >
FLinearIntersection LineSphereIntersection (const TVector< RealType > &LineOrigin, const TVector< RealType > &LineDirection, const TVector< RealType > &SphereCenter, RealType SphereRadius)
 
template<typename RealType >
bool RaySphereTest (const TVector< RealType > &RayOrigin, const TVector< RealType > &RayDirection, const TVector< RealType > &SphereCenter, RealType SphereRadius)
 
template<typename RealType >
bool RaySphereIntersection (const TVector< RealType > &RayOrigin, const TVector< RealType > &RayDirection, const TVector< RealType > &SphereCenter, RealType SphereRadius, FLinearIntersection &Result)
 
template<typename RealType >
FLinearIntersection RaySphereIntersection (const TVector< RealType > &RayOrigin, const TVector< RealType > &RayDirection, const TVector< RealType > &SphereCenter, RealType SphereRadius)
 
template<typename RealType >
bool RayCircleIntersection (const TVector< RealType > &RayOrigin, const TVector< RealType > &RayDirection, const TVector< RealType > &CircleCenter, RealType CircleRadius, const TVector< RealType > &CircleNormal, FLinearIntersection &Result)
 

Detailed Description

IntersectionUtil contains functions to compute intersections between geometric objects

Function Documentation

◆ LineSphereIntersection() [1/2]

template<typename RealType >
FLinearIntersection IntersectionUtil::LineSphereIntersection ( const TVector< RealType > &  LineOrigin,
const TVector< RealType > &  LineDirection,
const TVector< RealType > &  SphereCenter,
RealType  SphereRadius 
)

◆ LineSphereIntersection() [2/2]

template<typename RealType >
bool IntersectionUtil::LineSphereIntersection ( const TVector< RealType > &  LineOrigin,
const TVector< RealType > &  LineDirection,
const TVector< RealType > &  SphereCenter,
RealType  SphereRadius,
FLinearIntersection ResultOut 
)

Intersect line with sphere and return intersection info (# hits, ray parameters)

Returns
true if line intersects sphere

◆ LineSphereTest()

template<typename RealType >
bool IntersectionUtil::LineSphereTest ( const TVector< RealType > &  LineOrigin,
const TVector< RealType > &  LineDirection,
const TVector< RealType > &  SphereCenter,
RealType  SphereRadius 
)

Test if line intersects sphere

Returns
true if line intersects sphere

◆ RayCircleIntersection()

template<typename RealType >
bool IntersectionUtil::RayCircleIntersection ( const TVector< RealType > &  RayOrigin,
const TVector< RealType > &  RayDirection,
const TVector< RealType > &  CircleCenter,
RealType  CircleRadius,
const TVector< RealType > &  CircleNormal,
FLinearIntersection Result 
)

Intersect ray with circle and return intersection info (# hits, ray parameters)

Returns
true if ray intersects circle

◆ RaySphereIntersection() [1/2]

template<typename RealType >
FLinearIntersection IntersectionUtil::RaySphereIntersection ( const TVector< RealType > &  RayOrigin,
const TVector< RealType > &  RayDirection,
const TVector< RealType > &  SphereCenter,
RealType  SphereRadius 
)

◆ RaySphereIntersection() [2/2]

template<typename RealType >
bool IntersectionUtil::RaySphereIntersection ( const TVector< RealType > &  RayOrigin,
const TVector< RealType > &  RayDirection,
const TVector< RealType > &  SphereCenter,
RealType  SphereRadius,
FLinearIntersection Result 
)

Intersect ray with sphere and return intersection info (# hits, ray parameters)

Returns
true if ray intersects sphere

◆ RaySphereTest()

template<typename RealType >
bool IntersectionUtil::RaySphereTest ( const TVector< RealType > &  RayOrigin,
const TVector< RealType > &  RayDirection,
const TVector< RealType > &  SphereCenter,
RealType  SphereRadius 
)
Returns
true if ray intersects sphere

◆ RayTriangleTest()

template<typename RealType >
bool IntersectionUtil::RayTriangleTest ( const TVector< RealType > &  RayOrigin,
const TVector< RealType > &  RayDirection,
const TVector< RealType > &  V0,
const TVector< RealType > &  V1,
const TVector< RealType > &  V2 
)