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]
119 lines
2.8 KiB
C++
119 lines
2.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/Array.h"
|
|
#include "Containers/Set.h"
|
|
#include "CoreMinimal.h"
|
|
#include "Delegates/Delegate.h"
|
|
#include "HAL/Platform.h"
|
|
#include "UObject/Object.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "UObject/UObjectGlobals.h"
|
|
|
|
#include "SelectionSet.generated.h"
|
|
|
|
class USelectionSet;
|
|
|
|
/** This delegate is used by UInteractiveToolPropertySet */
|
|
DECLARE_MULTICAST_DELEGATE_OneParam(FSelectionSetModifiedSignature, USelectionSet*);
|
|
|
|
|
|
/**
|
|
* USelectionSet is a base class for Selection objects.
|
|
* For example the UMeshSelectionSet implementation stores information on selected
|
|
* triangles, vertices, etc.
|
|
*/
|
|
UCLASS(Transient)
|
|
class INTERACTIVETOOLSFRAMEWORK_API USelectionSet : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
protected:
|
|
FSelectionSetModifiedSignature OnModified;
|
|
|
|
|
|
public:
|
|
|
|
/** @return the multicast delegate that is called when properties are modified */
|
|
FSelectionSetModifiedSignature& GetOnModified()
|
|
{
|
|
return OnModified;
|
|
}
|
|
|
|
/** posts a message to the OnModified delegate with the modified FProperty */
|
|
void NotifySelectionSetModified()
|
|
{
|
|
OnModified.Broadcast(this);
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum class EMeshSelectionElementType
|
|
{
|
|
Vertex = 0,
|
|
Face = 1,
|
|
Edge = 2,
|
|
Group = 3
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* UMeshSelectionSet is an implementation of USelectionSet that represents selections on indexed meshes.
|
|
* Vertices, Edges, Faces, and Groups can be selected.
|
|
*/
|
|
UCLASS(Transient)
|
|
class INTERACTIVETOOLSFRAMEWORK_API UMeshSelectionSet : public USelectionSet
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UMeshSelectionSet();
|
|
|
|
UPROPERTY()
|
|
TArray<int32> Vertices;
|
|
|
|
UPROPERTY()
|
|
TArray<int32> Edges;
|
|
|
|
UPROPERTY()
|
|
TArray<int32> Faces;
|
|
|
|
UPROPERTY()
|
|
TArray<int32> Groups;
|
|
|
|
|
|
public:
|
|
/** @return current selected elements of the given ElementType */
|
|
TArray<int>& GetElements(EMeshSelectionElementType ElementType);
|
|
|
|
/** @return current selected elements of the given ElementType */
|
|
const TArray<int>& GetElements(EMeshSelectionElementType ElementType) const;
|
|
|
|
/**
|
|
* Add list of Indices to the current selection for the given ElementType
|
|
* @warning no duplicate detection is currently done
|
|
*/
|
|
void AddIndices(EMeshSelectionElementType ElementType, const TArray<int32>& Indices);
|
|
|
|
/**
|
|
* Add list of Indices to the current selection for the given ElementType
|
|
* @warning no duplicate detection is currently done
|
|
*/
|
|
void AddIndices(EMeshSelectionElementType ElementType, const TSet<int32>& Indices);
|
|
|
|
|
|
/**
|
|
* Remove list of Indices from the current selection for the given ElementType
|
|
*/
|
|
void RemoveIndices(EMeshSelectionElementType ElementType, const TArray<int32>& Indices);
|
|
|
|
/**
|
|
* Remove list of Indices from the current selection for the given ElementType
|
|
*/
|
|
void RemoveIndices(EMeshSelectionElementType ElementType, const TSet<int32>& Indices);
|
|
}; |