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]
71 lines
1.9 KiB
C++
71 lines
1.9 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/UnrealString.h"
|
|
#include "CoreMinimal.h"
|
|
#include "GeometryBase.h"
|
|
#include "InteractiveToolChange.h"
|
|
#include "Templates/Function.h"
|
|
#include "Templates/SharedPointer.h"
|
|
#include "UObject/Interface.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "UObject/UObjectGlobals.h"
|
|
|
|
#include "MeshReplacementChange.generated.h"
|
|
|
|
PREDECLARE_USE_GEOMETRY_CLASS(FDynamicMesh3);
|
|
class UObject;
|
|
|
|
|
|
/**
|
|
* FMeshReplacementChange represents an undoable *complete* change to a FDynamicMesh3.
|
|
* Currently only valid to call Apply/Revert when the Object is a UDynamicMeshComponent
|
|
*/
|
|
class GEOMETRYFRAMEWORK_API FMeshReplacementChange : public FToolCommandChange
|
|
{
|
|
TSharedPtr<const FDynamicMesh3, ESPMode::ThreadSafe> Before, After;
|
|
|
|
public:
|
|
FMeshReplacementChange();
|
|
FMeshReplacementChange(TSharedPtr<const FDynamicMesh3, ESPMode::ThreadSafe> Before, TSharedPtr<const FDynamicMesh3, ESPMode::ThreadSafe> After);
|
|
|
|
const TSharedPtr<const FDynamicMesh3, ESPMode::ThreadSafe>& GetMesh(bool bRevert) const
|
|
{
|
|
return bRevert ? Before : After;
|
|
}
|
|
|
|
/** This function is called on Apply and Revert (last argument is true on Apply)*/
|
|
TFunction<void(FMeshReplacementChange*, UObject*, bool)> OnChangeAppliedFunc;
|
|
|
|
/** Makes the change to the object */
|
|
virtual void Apply(UObject* Object) override;
|
|
|
|
/** Reverts change to the object */
|
|
virtual void Revert(UObject* Object) override;
|
|
|
|
/** Describes this change (for debugging) */
|
|
virtual FString ToString() const override;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
UINTERFACE()
|
|
class GEOMETRYFRAMEWORK_API UMeshReplacementCommandChangeTarget : public UInterface
|
|
{
|
|
GENERATED_BODY()
|
|
};
|
|
/**
|
|
* IMeshReplacementCommandChangeTarget is an interface which is used to apply a mesh replacement change
|
|
*/
|
|
class GEOMETRYFRAMEWORK_API IMeshReplacementCommandChangeTarget
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
virtual void ApplyChange(const FMeshReplacementChange* Change, bool bRevert) = 0;
|
|
};
|
|
|
|
|