Files
UnrealEngineUWP/Engine/Source/Editor/ComponentVisualizers/Public/Manipulator.h
Chris Gagnon 8fc25ea18e Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor)
#rb none

[CL 4676797 by Chris Gagnon in Dev-Editor branch]
2019-01-02 14:54:39 -05:00

47 lines
1.5 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "GameFramework/Actor.h"
#include "ViewportInteractableInterface.h"
#include "Manipulator.generated.h"
UCLASS()
class COMPONENTVISUALIZERS_API AManipulator : public AActor, public IViewportInteractableInterface
{
GENERATED_BODY()
public:
AManipulator();
// Begin AActor
virtual void PostEditMove(bool bFinished) override;
virtual bool IsEditorOnly() const final;
// End AActor
// Begin IViewportInteractableInterface
virtual void OnPressed(UViewportInteractor* Interactor, const FHitResult& InHitResult, bool& bOutResultedInDrag) override;
virtual void OnHover(UViewportInteractor* Interactor) override;
virtual void OnHoverEnter(UViewportInteractor* Interactor, const FHitResult& InHitResult) override;
virtual void OnHoverLeave(UViewportInteractor* Interactor, const UActorComponent* NewComponent) override;
virtual void OnDragRelease(UViewportInteractor* Interactor) override;
virtual bool CanBeSelected() override { return true; };
// End IViewportInteractableInterface
/** Set the component that should be moved when the manipulator was moved. */
void SetAssociatedComponent(USceneComponent* SceneComponent);
private:
/** The component to transform when this manipulator was moved. */
UPROPERTY()
USceneComponent* AssociatedComponent;
/** Visual representation of this manipulator. */
UPROPERTY()
class UStaticMeshComponent* StaticMeshComponent;
};