IMeshSpatial::FindNearestHitTriangle

Find nearest triangle from the given ray

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

References

Module

GeometryCore

Header

/Engine/Source/Runtime/GeometryCore/Public/Spatial/SpatialInterfaces.h

Include

#include "Spatial/SpatialInterfaces.h"

Syntax

virtual bool FindNearestHitTriangle
(
    const FRay3d & Ray,
    double & NearestT,
    int & TID,
    const FQueryOptions & Options
) const

Remarks

Find nearest triangle from the given ray

Returns

true if hit, false if no hit found

Parameters

Parameter

Description

Ray

query ray

NearestT

returned-by-reference parameter of the nearest hit

TID

returned-by-reference ID of triangle intersected by ray within MaxDistance, or InvalidID if not found

Options

Query options (ex. max distance)