You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#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]
87 lines
2.2 KiB
C++
87 lines
2.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "UObject/Object.h"
|
|
#include "ViewportDragOperation.h"
|
|
#include "ViewportInteractionDragOperations.generated.h"
|
|
|
|
/**
|
|
* Gizmo translation on one axis.
|
|
*/
|
|
UCLASS()
|
|
class VIEWPORTINTERACTION_API UTranslationDragOperation : public UViewportDragOperation
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual void ExecuteDrag(struct FDraggingTransformableData& DraggingData) override;
|
|
};
|
|
|
|
/**
|
|
* Gizmo translation on two axes.
|
|
*/
|
|
UCLASS()
|
|
class VIEWPORTINTERACTION_API UPlaneTranslationDragOperation: public UViewportDragOperation
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPlaneTranslationDragOperation();
|
|
virtual void ExecuteDrag(struct FDraggingTransformableData& DraggingData) override;
|
|
};
|
|
|
|
/**
|
|
* Rotation around one axis based on input angle.
|
|
*/
|
|
UCLASS()
|
|
class VIEWPORTINTERACTION_API URotateOnAngleDragOperation: public UViewportDragOperation
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
URotateOnAngleDragOperation();
|
|
|
|
virtual void ExecuteDrag(struct FDraggingTransformableData& DraggingData) override;
|
|
|
|
/** When RotateOnAngle we intersect on a plane to rotate the transform gizmo. This is the local point from the transform gizmo location of that intersect */
|
|
FVector GetLocalIntersectPointOnRotationGizmo() const;
|
|
|
|
private:
|
|
|
|
/** Starting angle when rotating an object with ETransformGizmoInteractionType::RotateOnAngle */
|
|
TOptional<float> StartDragAngleOnRotation;
|
|
|
|
/** The direction of where the rotation handle is facing when starting rotation */
|
|
TOptional<FVector> DraggingRotationHandleDirection;
|
|
|
|
/** Where the laser intersected on the gizmo rotation aligned plane. */
|
|
FVector LocalIntersectPointOnRotationGizmo;
|
|
};
|
|
|
|
/**
|
|
* Scale on one axis.
|
|
*/
|
|
UCLASS()
|
|
class VIEWPORTINTERACTION_API UScaleDragOperation : public UViewportDragOperation
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual void ExecuteDrag(struct FDraggingTransformableData& DraggingData) override;
|
|
};
|
|
|
|
/**
|
|
* Scale on all axes.
|
|
*/
|
|
UCLASS()
|
|
class VIEWPORTINTERACTION_API UUniformScaleDragOperation : public UViewportDragOperation
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual void ExecuteDrag(struct FDraggingTransformableData& DraggingData) override;
|
|
};
|