FGeometrySet3::CollectPointsNearRay

Like FindNearestPointToRay, but gives all elements within tolerance, rather than just the closest.

Choose your operating system:

Windows

macOS

Linux

Warnings

  • PointWithinToleranceTest is called in parallel and hence must be thread-safe/re-entrant!

References

Module

GeometryCore

Header

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

Include

#include "Spatial/GeometrySet3.h"

Source

/Engine/Source/Runtime/GeometryCore/Private/Spatial/GeometrySet3.cpp

Syntax

bool CollectPointsNearRay
(
    const FRay3d & Ray,
    TArray< FNearest > & ResultsOut,
    TFunction< bool &, const FVector3d &)> PointWithinToleranceTest
) const

Remarks

Like FindNearestPointToRay, but gives all elements within tolerance, rather than just the closest.

PointWithinToleranceTest is called in parallel and hence must be thread-safe/re-entrant!

Returns

true if at least one result was added (ie, passed PointWithinToleranceTest).

Parameters

Parameter

Description

Ray

query ray

ResultsOut

populated with information about successful nearest point results. Not cleared in advance.

PointWithinToleranceTest

should return true if two 3D points are "close enough" to be considered a hit