Choose your operating system:
Windows
macOS
Linux
| UObjectBase
|
Module |
|
Header |
/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Mechanics/PolyLassoMarqueeMechanic.h |
Include |
#include "Mechanics/PolyLassoMarqueeMechanic.h" |
UCLASS()
class UPolyLassoMarqueeMechanic :
public UInteractionMechanic,
public IClickDragBehaviorTarget,
public IHoverBehaviorTarget
Mechanic for a PolyLasso "marquee" selection. It creates and maintains the 2D PolyLasso associated with a mouse drag. It does not test against any scene geometry, nor does it maintain any sort of list of selected objects.
The PolyLasso has two potential modes, a freehand polyline and a multi-click polygon. By default both are enabled but this can be selectively controlled with flags below. If a click-and-release is within a small distance tolerance, then a multi-click polygon is entered, and must be exited by clicking again at the start point. The freehand polyline is drawn by click-dragging, and exited by releasing the mouse.
When using this mechanic, you should call DrawHUD() in the tool's DrawHUD() call so that it can draw the box.
Attach to the mechanic's delegates and use the passed PolyLasso to test against your geometry.
Name | Description | ||
---|---|---|---|
|
BasePriority |
||
|
bEnableFreehandPolygons |
If true, freehand polygons can be drawn by click-dragging the mouse |
|
|
bEnableMultiClickPolygons |
If true, if click and release are within SpacingTolerance, mechanic enters a multi-click mode, where each click adds a vertex to a polygon. |
|
|
CachedCameraState |
Camera state for currently active PolyLasso |
|
|
TObjectPtr< UCl... |
ClickDragBehavior |
|
|
ClosedColor |
PolyLasso path is drawn in this color if the cursor is at a point that would close the loop |
|
|
TObjectPtr< UMo... |
HoverBehavior |
|
|
LineColor |
PolyLasso path is drawn in this color |
|
|
float |
LineThickness |
Thickness of the 2D PolyLasso drawing path |
|
OnDrawPolyLassoChanged |
||
|
OnDrawPolyLassoFinished |
||
|
FSimpleMulticas... |
OnDrawPolyLassoStarted |
Called when user starts dragging a new PolyLasso. |
|
float |
SpacingTolerance |
Tolerance for PolyLasso points and closure test |
Name | Description | ||
---|---|---|---|
|
DrawHUD ( |
||
|
GetPriorityRange() |
Gets the current priority range used by behaviors in the mechanic, higher priority to lower. |
|
|
IsEnabled() |
||
|
SetBasePriority ( |
Sets the base priority so that users can make sure that their own behaviors are higher priority. |
|
|
SetIsEnabled ( |
Enable/disable the PolyLasso mechanic (effectively controls whether the mechanic's behaviors will be allowed to capture the mouse) |
Name | Description | ||
---|---|---|---|
|
Setup ( |
Name |
Description |
---|---|
OnDrawPolyLassoChangedEvent |
Called as the user drags the other corner of the PolyLasso around. |
OnDrawPolyLassoFinishedEvent |
Called once the user lets go of the mouse button after dragging out a PolyLasso. |