UPreviewMesh::FindNearestPoint

Find nearest point on current mesh to given WorldPoint Requires that bBuildSpatialDataStructure = true unless bLinearSearch = true

Windows
MacOS
Linux

References

Module

ModelingComponents

Header

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Public/PreviewMesh.h

Include

#include "PreviewMesh.h"

Source

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Private/PreviewMesh.cpp

Syntax

FVector3d FindNearestPoint
(
    const FVector3d & WorldPoint,
    bool bLinearSearch
)

Remarks

Find nearest point on current mesh to given WorldPoint Requires that bBuildSpatialDataStructure = true unless bLinearSearch = true

Returns

nearest point in world space

Parameters

Parameter

Description

WorldPoint

point in world space

bLinearSearch

test every triangle. On a mesh where only a few queries will be run, this is faster than building the spatial data structure.

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