Files
UnrealEngineUWP/Engine/Source/Editor/ViewportInteraction/Public/ViewportInteractableInterface.h
ryan durand 627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00

50 lines
1.9 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "UObject/Interface.h"
#include "ViewportInteractableInterface.generated.h"
class UActorComponent;
class UViewportInteractor;
struct FHitResult;
UINTERFACE( MinimalAPI )
class UViewportInteractableInterface : public UInterface
{
GENERATED_UINTERFACE_BODY()
};
/**
* Interface for custom objects that can be interacted with by a interactor
*/
class VIEWPORTINTERACTION_API IViewportInteractableInterface
{
GENERATED_IINTERFACE_BODY()
public:
/** Called when an interactor presses this object */
virtual void OnPressed( UViewportInteractor* Interactor, const FHitResult& InHitResult, bool& bOutResultedInDrag ) PURE_VIRTUAL( IViewportInteractableInterface::OnPressed, );
/** Called when an interactor hover over this object */
virtual void OnHover( UViewportInteractor* Interactor ) PURE_VIRTUAL( IViewportInteractableInterface::OnHover, );
/** Called when an interactor starts hovering over this object */
virtual void OnHoverEnter( UViewportInteractor* Interactor, const FHitResult& InHitResult ) PURE_VIRTUAL( IViewportInteractableInterface::OnHoverEnter, );
/** Called when an interactor leave hovering over this object */
virtual void OnHoverLeave( UViewportInteractor* Interactor, const UActorComponent* NewComponent ) PURE_VIRTUAL( IViewportInteractableInterface::OnHoverLeave, );
/** Called when an interactor stops dragging this object */
virtual void OnDragRelease( UViewportInteractor* Interactor ) PURE_VIRTUAL( IViewportInteractableInterface::OnDragRelease, );
/** Get dragging operation */
virtual class UViewportDragOperationComponent* GetDragOperationComponent() PURE_VIRTUAL( IViewportInteractableInterface::GetDragOperationComponent, return nullptr; );
/** Whether this interactable can be selected. */
virtual bool CanBeSelected() PURE_VIRTUAL( IViewportInteractableInterface::CanBeSelected, return false; );
};