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.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback