Navigation
API > API/Plugins > API/Plugins/ModelingToolsEditorMode
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UModelingSelectionInteraction
References
| Module | ModelingToolsEditorMode |
| Header | /Engine/Plugins/Editor/ModelingToolsEditorMode/Source/ModelingToolsEditorMode/Public/ModelingSelectionInteraction.h |
| Include | #include "ModelingSelectionInteraction.h" |
Syntax
UCLASS&40;&41;
class UModelingSelectionInteraction :
public UObject,
public IInputBehaviorSource,
public IClickBehaviorTarget,
public IHoverBehaviorTarget
Remarks
UModelingSelectionInteraction provides element-level selection behavior (ie mesh triangles/edges/vertices) via the UGeometrySelectionManager. The Interaction doesn't actually know about the meshes or interact with them at all, it simply "operates" the SelectionManager based on user input.
In addition to handling selection/deselection behaviors based on user input, the UModelingSelectionInteraction also creates a Gizmo for the active selection if it is transformable, and forwards gizmo transformations to the SelectionManager.
Currently some desired Selection-related interactions require a slightly convoluted path through the code, because (for example) we want the standard UE editor gizmo to have "click precedence" over our selection click behaviors. However we will get the input event first, so we need to be able to check if the gizmo is hit via a callback function provided by the EdMode owning the ToolsContext this Interaction will be registered in. Similarly we need to be able to filter out hits if a closer visible object is hit, because there is no higher-level Behavior that will do that for us. (This may be improved in future, if more of the existing Editor interaction behaviors are re-implemented as InputBehaviors)
Variables
| Type | Name | Description | |
|---|---|---|---|
| EModelingSelectionInteraction_DragMode | ActiveDragMode | ||
| bool | bAddToSelectionEnabled | ||
| bool | bClearSelectionOnClicked | ||
| TObjectPtr< UInputBehaviorSet > | BehaviorSet | Set of all behaviors, will be passed up to UInputRouter | |
| bool | bGizmoUpdatePending | ||
| bool | bInActiveTransform | ||
| bool | bToggleSelectionEnabled | ||
| TUniqueFunction< bool()> | CanChangeSelectionCallback | Default change-selection callback always allows selection change | |
| TObjectPtr< USingleClickOrDragInputBehavior > | ClickOrDragBehavior | Click-to-select behavior, various drag behaviors | |
| TObjectPtr< UDragAlignmentInteraction > | DragAlignmentInteraction | ||
| TObjectPtr< UKeyAsModifierInputBehavior > | DragAlignmentToggleBehavior | ||
| TUniqueFunction< bool(const FInputDeviceRay &)> | ExternalHitCaptureCallback | ||
| TObjectPtr< UMouseHoverBehavior > | HoverBehavior | Mouse hover behavior | |
| UE::Geometry::FFrame3d | InitialGizmoFrame | ||
| FVector3d | InitialGizmoScale | ||
| FVector4d | LastRotateDelta | ||
| FVector3d | LastScaleDelta | ||
| FVector3d | LastTranslationDelta | ||
| UE::Geometry::FFrame3d | LastUpdateGizmoFrame | ||
| FVector3d | LastUpdateGizmoScale | ||
| FDelegateHandle | OnSelectionModifiedDelegate | ||
| FOnBeginTransformInteraction | OnTransformBegin | ||
| FOnEndTransformInteraction | OnTransformEnd | ||
| TObjectPtr< UPathSelectionInteraction > | PathSelectionInteraction | ||
| TObjectPtr< URectangleMarqueeInteraction > | RectangleMarqueeInteraction | ||
| TObjectPtr< UGeometrySelectionManager > | SelectionManager | ||
| TObjectPtr< UCombinedTransformGizmo > | TransformGizmo | ||
| TObjectPtr< UTransformProxy > | TransformProxy |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | This needs to be called from EdMode tick or rendering, to avoid mouse-interrupt priority issues | ||
| void | ComputeSceneHits
(
const FInputDeviceRay& ClickPos, |
||
| void | DrawHUD
(
FCanvas* Canvas, |
||
| EModelingSelectionInteraction_DragMode | Support for drag-style interactions | ||
| UE::Geometry::FGeometrySelectionUpdateConfig | |||
| UGeometrySelectionManager * | |||
| void | Initialize
(
TObjectPtr< UGeometrySelectionManager > SelectionManager, |
Set up the Interaction, creates and registers Behaviors/etc. | |
| void | OnBeginGizmoTransform
(
UTransformProxy* Proxy |
||
| void | OnEndGizmoTransform
(
UTransformProxy* Proxy |
||
| void | OnGizmoTransformChanged
(
UTransformProxy* Proxy, |
||
| void | OnMarqueeRectangleFinished
(
const FCameraRectangle& Rectangle, |
||
| void | |||
| void | Render
(
IToolsContextRenderAPI* RenderAPI |
||
| void | |||
| void | Shutdown () |
||
| void | |||
| void |
Overridden from IInputBehaviorSource
| Type | Name | Description | |
|---|---|---|---|
| const UInputBehaviorSet * | IInputBehaviorSource API |
Overridden from IClickBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| FInputRayHit | IsHitByClick
(
const FInputDeviceRay& ClickPos |
IClickBehaviorTarget implementation | |
| void | OnClicked
(
const FInputDeviceRay& ClickPos |
Notify Target that click ocurred |
Overridden from IModifierToggleBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| void | OnUpdateModifierState
(
int ModifierID, |
IModifierToggleBehaviorTarget implementation |
Overridden from IHoverBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| FInputRayHit | BeginHoverSequenceHitTest
(
const FInputDeviceRay& PressPos |
IHoverBehaviorTarget implementation | |
| void | OnBeginHover
(
const FInputDeviceRay& DevicePos |
Initialize hover sequence at given position | |
| void | OnEndHover () |
Terminate active hover sequence | |
| bool | OnUpdateHover
(
const FInputDeviceRay& DevicePos |
Update active hover sequence with new input position |
Typedefs
| Name | Description |
|---|---|
| FOnBeginTransformInteraction | |
| FOnEndTransformInteraction |
Constants
| Name | Description |
|---|---|
| AddToSelectionModifier | Flags used to identify behavior modifier keys/buttons |
| ToggleSelectionModifier |