Navigation
API > API/Plugins > API/Plugins/ModelingToolsEditorMode
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)
| Name | UModelingSelectionInteraction |
| Type | class |
| Header File | /Engine/Plugins/Editor/ModelingToolsEditorMode/Source/ModelingToolsEditorMode/Public/ModelingSelectionInteraction.h |
| Include Path | #include "ModelingSelectionInteraction.h" |
Syntax
UCLASS ()
class UModelingSelectionInteraction :
public UObject,
public IInputBehaviorSource,
public IClickBehaviorTarget,
public IHoverBehaviorTarget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UModelingSelectionInteraction
Implements Interfaces
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnBeginTransformInteraction | TMulticastDelegate_NoParams< void > | ModelingSelectionInteraction.h | |
| FOnEndTransformInteraction | TMulticastDelegate_NoParams< void > | ModelingSelectionInteraction.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AddToSelectionModifier | const int | Flags used to identify behavior modifier keys/buttons | ModelingSelectionInteraction.h |
| ToggleSelectionModifier | const int | ModelingSelectionInteraction.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnTransformBegin | FOnBeginTransformInteraction | ModelingSelectionInteraction.h | ||
| OnTransformEnd | FOnEndTransformInteraction | ModelingSelectionInteraction.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ApplyPendingTransformInteractions() |
This needs to be called from EdMode tick or rendering, to avoid mouse-interrupt priority issues | ModelingSelectionInteraction.h | |
virtual FInputRayHit BeginHoverSequenceHitTest
(
const FInputDeviceRay& PressPos |
IHoverBehaviorTarget implementation | ModelingSelectionInteraction.h | |
virtual void DrawHUD
(
FCanvas* Canvas, |
ModelingSelectionInteraction.h | ||
EModelingSelectionInteraction_DragMode GetActiveDragMode() |
Support for drag-style interactions | ModelingSelectionInteraction.h | |
UE::Geometry::FGeometrySelectionUpdateConfig GetActiveSelectionUpdateConfig() |
ModelingSelectionInteraction.h | ||
virtual const UInputBehaviorSet * GetInputBehaviors() |
IInputBehaviorSource API | ModelingSelectionInteraction.h | |
EModelingSelectionInteraction_LocalFrameMode GetLocalFrameMode() |
Support for Adjusting Local Frame Mode | ModelingSelectionInteraction.h | |
UGeometrySelectionManager * GetSelectionManager() |
ModelingSelectionInteraction.h | ||
virtual void Initialize
(
TObjectPtr< UGeometrySelectionManager > SelectionManager, |
Set up the Interaction, creates and registers Behaviors/etc. | ModelingSelectionInteraction.h | |
virtual FInputRayHit IsHitByClick
(
const FInputDeviceRay& ClickPos |
IClickBehaviorTarget implementation | ModelingSelectionInteraction.h | |
virtual void OnBeginHover
(
const FInputDeviceRay& DevicePos |
ModelingSelectionInteraction.h | ||
virtual void OnClicked
(
const FInputDeviceRay& ClickPos |
ModelingSelectionInteraction.h | ||
virtual void OnEndHover() |
ModelingSelectionInteraction.h | ||
virtual bool OnUpdateHover
(
const FInputDeviceRay& DevicePos |
ModelingSelectionInteraction.h | ||
virtual void OnUpdateModifierState
(
int ModifierID, |
IModifierToggleBehaviorTarget implementation | ModelingSelectionInteraction.h | |
virtual void Render
(
IToolsContextRenderAPI* RenderAPI |
ModelingSelectionInteraction.h | ||
void SetActiveDragMode
(
EModelingSelectionInteraction_DragMode NewMode |
ModelingSelectionInteraction.h | ||
void SetLocalFrameMode
(
EModelingSelectionInteraction_LocalFrameMode NewLocalFrameMode |
ModelingSelectionInteraction.h | ||
virtual void Shutdown() |
ModelingSelectionInteraction.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ComputeSceneHits
(
const FInputDeviceRay& ClickPos, |
ModelingSelectionInteraction.h | ||
void OnBeginGizmoTransform
(
UTransformProxy* Proxy |
ModelingSelectionInteraction.h | ||
void OnEndGizmoTransform
(
UTransformProxy* Proxy |
ModelingSelectionInteraction.h | ||
void OnGizmoTransformChanged
(
UTransformProxy* Proxy, |
ModelingSelectionInteraction.h | ||
void OnMarqueeRectangleFinished
(
const FCameraRectangle& Rectangle, |
ModelingSelectionInteraction.h | ||
void OnSelectionManager_SelectionModified() |
ModelingSelectionInteraction.h | ||
void UpdateActiveDragMode() |
ModelingSelectionInteraction.h | ||
void UpdateGizmoOnSelectionChange() |
ModelingSelectionInteraction.h |