UInteractionMechanic

A [UInteractionMechanic](API\Runtime\InteractiveToolsFramework\UInteractionMechanic) implements a "user interaction".

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

InteractiveToolsFramework

Header

/Engine/Source/Runtime/Experimental/InteractiveToolsFramework/Public/InteractionMechanic.h

Include

#include "InteractionMechanic.h"

Syntax

class UInteractionMechanic : public UObject

Remarks

A UInteractionMechanic implements a "user interaction". This is generally a subset of an InteractiveTool, for example an interaction to draw a polygon could be used in many tools, but requires handling input events and converting them to click points on a plane, handling various cases like closing a loop, undo/redo of points, etc. Ideally all these aspects should be able to be wrapped up in an UInteractionMechanic that multiple Tools can use.

(This class is still a work in progress)

Variables

Name Description

Protected variable

TWeakObjectPtr<...

 

ParentTool

Constructors

Name Description

Public function

UInteractionMechanic()

Functions

Name Description

Protected function Virtual

void

 

AddToolPropertySource

(
    UInteractiveToolPropertySet* P...
)

Add a PropertySet object for this Mechanic to parent Tool

Protected function Const

UInteractive...

 

GetParentTool()

Public function Virtual

void

 

Render

(
    IToolsContextRenderAPI* Render...
)

Allow the Mechanic to do any custom drawing (ie via PDI/RHI)

Public function Virtual

void

 

Setup

(
    UInteractiveTool* ParentTool
)

Called to initialize the InteractionMechanic

Public function Virtual

void

 

Shutdown()

Called to clean up the InteractionMechanic

Public function Virtual

void

 

Tick

(
    float DeltaTime
)

ALlow the Mechanic to Tick

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss