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

#include <IntrRay3AxisAlignedBox3.h>

Static Public Member Functions

static bool TestIntersection (const TRay< RealType > &Ray, const TAxisAlignedBox3< RealType > &Box, RealType ExpandExtents=0)
 
static bool FindIntersection (const TRay< RealType > &Ray, const TAxisAlignedBox3< RealType > &Box, RealType &RayParamOut)
 
static bool FindIntersection (const TVector< RealType > &Origin, const TVector< RealType > &Direction, const TAxisAlignedBox3< RealType > &Box, RealType &RayParamOut)
 

Static Protected Member Functions

static bool DoClipping (RealType &t0, RealType &t1, const TVector< RealType > &RayOrigin, const TVector< RealType > &RayDirection, const TAxisAlignedBox3< RealType > &Box, bool solid, int &quantity, TVector< RealType > &Point0, TVector< RealType > &Point1, EIntersectionType &intrType)
 
static bool Clip (RealType denom, RealType numer, RealType &t0, RealType &t1)
 

Detailed Description

template<typename RealType>
class UE::Geometry::TIntrRay3AxisAlignedBox3< RealType >

Compute intersection between 3D ray and 3D axis-aligned box

Member Function Documentation

◆ Clip()

template<typename RealType >
static bool UE::Geometry::TIntrRay3AxisAlignedBox3< RealType >::Clip ( RealType  denom,
RealType  numer,
RealType &  t0,
RealType &  t1 
)
inlinestaticprotected

◆ DoClipping()

template<typename RealType >
static bool UE::Geometry::TIntrRay3AxisAlignedBox3< RealType >::DoClipping ( RealType &  t0,
RealType &  t1,
const TVector< RealType > &  RayOrigin,
const TVector< RealType > &  RayDirection,
const TAxisAlignedBox3< RealType > &  Box,
bool  solid,
int &  quantity,
TVector< RealType > &  Point0,
TVector< RealType > &  Point1,
EIntersectionType intrType 
)
inlinestaticprotected

◆ FindIntersection() [1/2]

template<typename RealType >
static bool UE::Geometry::TIntrRay3AxisAlignedBox3< RealType >::FindIntersection ( const TRay< RealType > &  Ray,
const TAxisAlignedBox3< RealType > &  Box,
RealType &  RayParamOut 
)
inlinestatic

Find intersection of ray with AABB and returns ray T-value of intersection point (or TNumericLimits::Max() on miss)

Parameters
Rayquery ray
Boxquery box
RayParamOutray intersect T-value, or TNumericLimits::Max()
Returns
true if ray intersects box

◆ FindIntersection() [2/2]

template<typename RealType >
static bool UE::Geometry::TIntrRay3AxisAlignedBox3< RealType >::FindIntersection ( const TVector< RealType > &  Origin,
const TVector< RealType > &  Direction,
const TAxisAlignedBox3< RealType > &  Box,
RealType &  RayParamOut 
)
inlinestatic

Find intersection of ray with AABB and returns ray T-value of intersection point (or TNumericLimits::Max() on miss)

Parameters
Originquery ray origin
Directionquery ray direction
Boxquery box
RayParamOutray intersect T-value, or TNumericLimits::Max()
Returns
true if ray intersects box

◆ TestIntersection()

template<typename RealType >
static bool UE::Geometry::TIntrRay3AxisAlignedBox3< RealType >::TestIntersection ( const TRay< RealType > &  Ray,
const TAxisAlignedBox3< RealType > &  Box,
RealType  ExpandExtents = 0 
)
inlinestatic

Test if ray intersects box

Parameters
Rayquery ray
Boxquery box
ExpandExtentsbox is expanded by this amount in each direction, useful for dealing with float imprecision
Returns
true if ray intersects box

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