Files
UnrealEngineUWP/Engine/Source/Runtime/InteractiveToolsFramework/Public/Changes/TransformChange.h
henrik karlsson 5db685f97d [Engine]
* Moved dllexport from type to methods/staticvar in all Engine runtime code. This improves compile times, memory and performance in dll builds

[CL 26082269 by henrik karlsson in ue5-main branch]
2023-06-17 18:13:06 -04:00

41 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/UnrealString.h"
#include "CoreMinimal.h"
#include "InteractiveToolChange.h"
#include "Math/Transform.h"
#include "Templates/Function.h"
class UObject;
/**
* FComponentWorldTransformChange represents an undoable change to the world transform of a USceneComponent.
*/
class FComponentWorldTransformChange : public FToolCommandChange
{
public:
INTERACTIVETOOLSFRAMEWORK_API FComponentWorldTransformChange();
INTERACTIVETOOLSFRAMEWORK_API FComponentWorldTransformChange(const FTransform& From, const FTransform& To);
FTransform FromWorldTransform;
FTransform ToWorldTransform;
/** This function is called on Apply and Revert (last argument is true on Apply)*/
TFunction<void(FComponentWorldTransformChange*, UObject*, bool)> OnChangeAppliedFunc;
/** Makes the change to the object */
INTERACTIVETOOLSFRAMEWORK_API virtual void Apply(UObject* Object) override;
/** Reverts change to the object */
INTERACTIVETOOLSFRAMEWORK_API virtual void Revert(UObject* Object) override;
/** Describes this change (for debugging) */
INTERACTIVETOOLSFRAMEWORK_API virtual FString ToString() const override;
};