ToolSceneQueriesUtil::PointSnapMetric

Get a measurement for testing whether two points can snap together, useful for choosing the best snap point among multiple options.

Windows
MacOS
Linux

References

Module

ModelingComponents

Header

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

Include

#include "ToolSceneQueriesUtil.h"

Source

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

Syntax

namespace ToolSceneQueriesUtil
{
    double ToolSceneQueriesUtil::PointSnapMetric
    (
        const FViewCameraState & CameraState,
        const FVector3d & Point1,
        const FVector3d & Point2
    )
}

Remarks

Get a measurement for testing whether two points can snap together, useful for choosing the best snap point among multiple options. For perspective mode, the returned metric is the "visual angle" between the points, which is the angle between the points to the camera scaled such that the visual angle between the horizontal bounds of the view is 90. For orthographic mode, it is a projected distance onto the view plane scaled such that the distance between the horizontal bounds of the view is 90. Thus, the metric is suitable for comparing against a visual angle snap threshold to determine if snapping should happen.

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