Navigation
API > API/Plugins > API/Plugins/ModelingComponents
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.
| Name | FPointPlanarSnapSolver |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Snapping/PointPlanarSnapSolver.h |
| Include Path | #include "Snapping/PointPlanarSnapSolver.h" |
Syntax
class FPointPlanarSnapSolver : public UE::Geometry::FBasePositionSnapSolver3
Inheritance Hierarchy
- FBasePositionSnapSolver3 → FPointPlanarSnapSolver
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPointPlanarSnapSolver() |
Snapping/PointPlanarSnapSolver.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CardinalAxisTargetID | int | Snapping/PointPlanarSnapSolver.h | |
| IntersectionTargetID | int | Snapping/PointPlanarSnapSolver.h | |
| LastSegmentTargetID | int | Snapping/PointPlanarSnapSolver.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bEnableSnapToKnownLengths | bool | Snapping/PointPlanarSnapSolver.h | ||
| CardinalAxisPriority | int | Snapping/PointPlanarSnapSolver.h | ||
| IntersectionPriorityDelta | int32 | How much more important an intersection is than the more important of the intersecting lines. | Snapping/PointPlanarSnapSolver.h | |
| KnownLengthPriorityDelta | int | How much more important a known length is than its line's priority. | Snapping/PointPlanarSnapSolver.h | |
| LastSegmentPriority | int | Snapping/PointPlanarSnapSolver.h | ||
| Plane | FFrame3d | Configuration variables | Snapping/PointPlanarSnapSolver.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AppendHistoryPoint
(
const FVector3d& Point |
Snapping/PointPlanarSnapSolver.h | ||
void DebugRender
(
IToolsContextRenderAPI* RenderAPI |
Draws the current snap targets (for debugging) | Snapping/PointPlanarSnapSolver.h | |
const FLine3d & GetIntersectionSecondLine() |
When the active snap is an intersection, holds the second intersecting line (the first can be obtained with GetActiveSnapLine()) | Snapping/PointPlanarSnapSolver.h | |
bool HaveActiveSnapIntersection () |
Returns true when the active snap represents an intersection of multiple target lines in the plane. | Snapping/PointPlanarSnapSolver.h | |
void InsertHistoryPoint
(
const FVector3d& Point, |
Snapping/PointPlanarSnapSolver.h | ||
int MinInternalPriority() |
Snapping/PointPlanarSnapSolver.h | ||
int32 PointHistoryLength() |
Snapping/PointPlanarSnapSolver.h | ||
void RegenerateTargetLines
(
bool bCardinalAxes, |
Creates snap lines based on the last point in the point history. | Snapping/PointPlanarSnapSolver.h | |
void RegenerateTargetLinesAround
(
int32 HistoryIndex, |
Sets the snapping lines to be based on the history points adjacent to the point with a given history index. | Snapping/PointPlanarSnapSolver.h | |
void RemoveHistoryPoint
(
int32 Index |
Snapping/PointPlanarSnapSolver.h | ||
void UpdatePointHistory
(
const TArray< FVector3d >& Points |
Point history manipulation functions. All of them remove the currently generated snap | Snapping/PointPlanarSnapSolver.h | |
void UpdatePointHistory
(
const TArray< FVector3f >& Points |
Snapping/PointPlanarSnapSolver.h | ||
void UpdateSnappedPoint
(
const FVector3d& PointIn |
Snapping/PointPlanarSnapSolver.h |
Overridden from FBasePositionSnapSolver3
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Reset() |
Discard the set of snap points and lines and clear the active snap | Snapping/PointPlanarSnapSolver.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void GenerateLineIntersectionTargets() |
Snapping/PointPlanarSnapSolver.h | ||
void GenerateTargets
(
const FVector3d& PointIn |
Snapping/PointPlanarSnapSolver.h | ||
void ResetGenerated() |
Clears any existing generated snap targets. | Snapping/PointPlanarSnapSolver.h |