FPointPlanarSnapSolver

[FPointPlanarSnapSolver](API\Plugins\ModelingComponents\Snapping\FPointPlanarSnapSolver) solves for a Point snap location on a plane, based on an input Point and a set of target points and lines in the plane.

Windows
MacOS
Linux

Inheritance Hierarchy

FBasePositionSnapSolver3

FPointPlanarSnapSolver

References

Module

ModelingComponents

Header

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Public/Snapping/PointPlanarSnapSolver.h

Include

#include "Snapping/PointPlanarSnapSolver.h"

Syntax

class FPointPlanarSnapSolver : public FBasePositionSnapSolver3

Remarks

FPointPlanarSnapSolver solves for a Point snap location on a plane, based on an input Point and a set of target points and lines in the plane.

This implementation has the notion of a "history" of previous points, from which line and distance constraints can be inferred. This is useful for snapping in 2D polygon drawing.

See FBasePositionSnapSolver3 for details on how to set up the snap problem and get results.

Variables

Name Description

Protected variable

bool

 

bActiveSnapIsIntersection

Public variable

bool

 

bEnableSnapToKnownLengths

Public variable

int

 

CardinalAxisPriority

Protected variable

TArray< FSnapTa...

 

GeneratedLines

Protected variable

TArray< FSnapTa...

 

GeneratedTargets

Protected variable

TSet< int >

 

IgnoreTargets

Protected variable

TArray< FSnapTa...

 

IntersectionPoints

Public variable

int32

 

IntersectionPriorityDelta

How much more important an intersection is than the more important of the intersecting lines.

Protected variable

FLine3d

 

IntersectionSecondLine

Protected variable

TArray< const F...

 

IntersectionSecondLinePointers

Public variable

int

 

KnownLengthPriorityDelta

How much more important a known length is than its line's priority.

Public variable

int

 

LastSegmentPriority

Public variable

FFrame3d

 

Plane

Configuration variables

Protected variable

TArray< FVector...

 

PointHistory

Constructors

Name Description

Public function

FPointPlanarSnapSolver()

Functions

Name Description

Public function

void

 

AppendHistoryPoint

(
    const FVector3d& Point
)

Public function

void

 

DebugRender

(
    IToolsContextRenderAPI* Render...
)

Draws the current snap targets (for debugging)

Protected function

void

 

GenerateLineIntersectionTargets()

Protected function

void

 

GenerateTargets

(
    const FVector3d& PointIn
)

Public function

const FLine3...

 

GetIntersectionSecondLine()

When the active snap is an intersection, holds the second intersecting line (the first can be obtained with GetActiveSnapLine())

Public function

bool

 

HaveActiveSnapIntersection()

Returns true when the active snap represents an intersection of multiple target lines in the plane.

Public function

void

 

InsertHistoryPoint

(
    const FVector3d& Point,
    int32 Index
)

Public function Const

int

 

MinInternalPriority()

Public function

int32

 

PointHistoryLength()

Public function

void

 

RegenerateTargetLines

(
    bool bCardinalAxes,
    bool bLastHistorySegment
)

Creates snap lines based on the last point in the point history.

Public function

void

 

RegenerateTargetLinesAround

(
    int32 HistoryIndex,
    bool bWrapAround,
    bool bGenerateIntersections
)

Sets the snapping lines to be based on the history points adjacent to the point with a given history index.

Public function

void

 

RemoveHistoryPoint

(
    int32 Index
)

Protected function

void

 

ResetGenerated()

Clears any existing generated snap targets.

Public function

void

 

UpdatePointHistory

(
    const TArray< FVector3d >& Points
)

Point history manipulation functions. All of them remove the currently generated snap

Public function

void

 

UpdatePointHistory

(
    const TArray< FVector >& Points
)

Point history manipulation functions. All of them remove the currently generated snap

Public function

void

 

UpdateSnappedPoint

(
    const FVector3d& PointIn
)

Overridden from FBasePositionSnapSolver3

Name Description

Public function Virtual

void

 

Reset()

Discard the set of snap points and lines and clear the active snap

Constants

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