Navigation
Unreal Engine C++ API Reference > Plugins > ModelingComponents > Snapping
Inheritance Hierarchy
- FBasePositionSnapSolver3
- FPointPlanarSnapSolver
- FRaySpatialSnapSolver
References
Module | ModelingComponents |
Header | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Snapping/BasePositionSnapSolver3.h |
Include | #include "Snapping/BasePositionSnapSolver3.h" |
Syntax
class FBasePositionSnapSolver3
Remarks
FBasePositionSnapSolver3 is a base class for 3D position snapping implementations. It is not usable on its own and the split between this class and the implementations is not incredibly clean. However there is lots of shared functionality that is placed here.
3D Point and Line targets are supported. Targets can also be "ignored".
The actual snap "solve" must be implemented by subclasses, depending on their input data (ray, point, line, etc)
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
FVector3d | ActiveSnapFromPoint | |
![]() |
FSnapTargetPoint | ActiveSnapTarget | |
![]() |
FVector3d | ActiveSnapToPoint | |
![]() |
bool | bEnableStableSnap | If true, then we will prefer to keep current snap point over a new one |
![]() |
bool | bHaveActiveSnap | Information about active snap |
![]() |
TSet< int > | IgnoreTargets | List of TargetID values to ignore in snap queries |
![]() |
TFunction< double(const FVector3d &, const FVector3d &)> | SnapMetricFunc | ParametersThis is the function we use to measure distances between snap points. |
![]() |
double | SnapMetricTolerance | Tolerance for snapping, in unit relative to SnapMetricFunc |
![]() |
double | SnappedPointMetric | |
![]() |
double | StableSnapImproveThresh | How much we have to improve the snap metric to discard the current stable snap |
![]() |
TArray< FSnapTargetCircle > | TargetCircles | |
![]() |
TArray< FSnapTargetLine > | TargetLines | |
![]() |
TArray< FSnapTargetPoint > | TargetPoints |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | AddCircleTarget
(
const FCircle3d& Circle, |
Add a snap target Circle |
![]() ![]() |
void | AddIgnoreTarget
(
int TargetID |
Add given TargetID to the ignore list, so any points/lines with that ID will not be snapped-to |
![]() ![]() |
void | AddLineTarget
(
const FLine3d& Line, |
Add a snap target line |
![]() ![]() |
void | AddPointTarget
(
const FVector3d& Position, |
Add a snap target point at the given Position |
![]() ![]() |
void | AddPointTarget
(
const FVector3d& Position, |
Add a snap target point at the given Position |
![]() ![]() |
void | ||
![]() |
const FSnapTargetPoint * | FindBestSnapInSet
(
const TArray< FSnapTargetPoint >& TestTargets, |
|
![]() |
int32 | FindIndexOfBestSnapInSet
(
const TArray< FSnapTargetPoint >& TestTargets, |
Snap measurement functions |
![]() ![]() |
int | ||
![]() ![]() |
FVector3d | ||
![]() ![]() |
const FLine3d & | ||
![]() ![]() |
int | ||
![]() ![]() |
FVector3d | ||
![]() ![]() |
bool | Solving output | |
![]() ![]() |
bool | ||
![]() ![]() |
bool | ||
![]() ![]() ![]() |
bool | IsIgnored
(
int TargetID |
|
![]() ![]() |
bool | RemoveCircleTargetsByID
(
int TargetID |
Remove any line targets with this TargetID |
![]() ![]() |
void | RemoveIgnoreTarget
(
int TargetID |
Add given TargetID from the ignore list |
![]() ![]() |
bool | RemoveLineTargetsByID
(
int TargetID |
Remove any line targets with this TargetID |
![]() ![]() |
bool | RemovePointTargetsByID
(
int TargetID |
Remove any point targets with this TargetID |
![]() ![]() |
void | Reset () |
Discard the set of snap points and lines and clear the active snap |
![]() ![]() |
void | Clear the active snap | |
![]() ![]() |
void | SetActiveSnapData
(
const FSnapTargetPoint& TargetPoint, |
|
![]() |
bool | TestSnapTarget
(
const FSnapTargetPoint& Target, |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FCustomMetric | FCustomMetric overrides/modifies the default should-snap-happen metric | |
![]() |
FSnapTargetCircle | ||
![]() |
FSnapTargetLine | Target line that might be snapped to | |
![]() |
FSnapTargetPoint | Target point that might be snapped to |
Enums
Type | Name | Description | |
---|---|---|---|
![]() |
ECustomMetricType | SetupECustomMetricType defines how a FCustomMetric should be interpreted |
Constants
Name | Description |
---|---|
BaseExternalLineID | Subclasses may have internal TargetID values, so external lines should have IDs larger than this |
BaseExternalPointID | Subclasses may have internal TargetID values, so external points should have IDs larger than this |