FSparseDynamicOctree3::FindNearestHitObject

Find nearest ray-hit point with objects in tree

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Spatial/SparseDynamicOctree3.h

Include

#include "Spatial/SparseDynamicOctree3.h"

Syntax

int32 FindNearestHitObject
(
    const FRay3d & Ray,
    TFunctionRef< FAxisAlignedBox3d> GetObjectBoundsFunc,
    TFunctionRef< double(int, const FRay3d &)> HitObjectDistFunc,
    double MaxDistance
) const

Remarks

Find nearest ray-hit point with objects in tree

Returns

ObjectID of hit object, or -1 on miss

Parameters

Parameter

Description

Ray

the ray

GetObjectBoundsFunc

function that returns bounding box of object identified by ObjectID

HitObjectDistFunc

function that returns distance along ray to hit-point on object identified by ObjectID (or TNumericLimits::Max() on miss)

MaxDistance

maximum hit distance

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss