You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Headers are updated to contain any missing #includes needed to compile and #includes are sorted. Nothing is removed. #ushell-cherrypick of 21065896 by bryan.sefcik #preflight 62d4b1a5a6141b6adfb0c892 #jira #ROBOMERGE-OWNER: Bryan.sefcik #ROBOMERGE-AUTHOR: bryan.sefcik #ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824) #ROBOMERGE-CONFLICT from-shelf [CL 21181076 by Bryan sefcik in ue5-main branch]
72 lines
2.0 KiB
C++
72 lines
2.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "InputBehaviorSet.h"
|
|
#include "InteractiveTool.h"
|
|
#include "ToolContextInterfaces.h"
|
|
#include "UObject/Object.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "UObject/UObjectGlobals.h"
|
|
#include "UObject/WeakObjectPtrTemplates.h"
|
|
|
|
#include "InteractionMechanic.generated.h"
|
|
|
|
class IToolsContextRenderAPI;
|
|
class UInteractiveTool;
|
|
class UInteractiveToolPropertySet;
|
|
|
|
/**
|
|
* 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)
|
|
*/
|
|
UCLASS(Transient)
|
|
class INTERACTIVETOOLSFRAMEWORK_API UInteractionMechanic : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UInteractionMechanic();
|
|
|
|
/**
|
|
* Called to initialize the InteractionMechanic
|
|
*/
|
|
virtual void Setup(UInteractiveTool* ParentTool);
|
|
|
|
/**
|
|
* Called to clean up the InteractionMechanic
|
|
*/
|
|
virtual void Shutdown();
|
|
|
|
/**
|
|
* Allow the Mechanic to do any custom drawing (ie via PDI/RHI)
|
|
* @param RenderAPI Abstraction that provides access to Rendering in the current ToolsContext
|
|
*/
|
|
virtual void Render(IToolsContextRenderAPI* RenderAPI);
|
|
|
|
/**
|
|
* ALlow the Mechanic to Tick
|
|
*/
|
|
virtual void Tick(float DeltaTime);
|
|
|
|
protected:
|
|
TWeakObjectPtr<UInteractiveTool> ParentTool;
|
|
|
|
UInteractiveTool* GetParentTool() const;
|
|
|
|
/**
|
|
* Add a PropertySet object for this Mechanic to parent Tool
|
|
* @param PropertySet Property Set object to add
|
|
*/
|
|
virtual void AddToolPropertySource(UInteractiveToolPropertySet* PropertySet);
|
|
|
|
/** Enable/Disable a PropertySet object for the parent tool. */
|
|
virtual bool SetToolPropertySourceEnabled(UInteractiveToolPropertySet* PropertySet, bool bEnabled);
|
|
};
|
|
|