UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DataflowSelection.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5
6#include "UObject/NameTypes.h"
7#include "DataflowSelection.generated.h"
8
10
11USTRUCT()
13{
15
18
22
25 DATAFLOWCORE_API void InitializeFromCollection(const FManagedArrayCollection& InCollection, bool Value);
27 int32 Num() const { return SelectionArray.Num(); }
28 DATAFLOWCORE_API int32 NumSelected() const;
29 DATAFLOWCORE_API bool AnySelected() const;
30 inline bool IsValidIndex(int32 Idx) const
31 {
32 return SelectionArray.IsValidIndex(Idx);
33 }
34 bool IsSelected(int32 Idx) const { return SelectionArray[Idx]; }
35 void SetSelected(int32 Idx) { SelectionArray[Idx] = true; }
36 DATAFLOWCORE_API void SetSelected(TArray<int32> Indices);
37 void SetNotSelected(int32 Idx) { SelectionArray[Idx] = false; }
38 DATAFLOWCORE_API void AsArray(TArray<int32>& SelectionArr) const;
39 DATAFLOWCORE_API TArray<int32> AsArray() const;
42
47 DATAFLOWCORE_API bool SetFromArray(const TArray<int32>& SelectionArr);
48
53 DATAFLOWCORE_API void SetFromArray(const TArray<bool>& SelectionArr);
54 DATAFLOWCORE_API void AND(const FDataflowSelection& Other, FDataflowSelection& Result) const;
55 DATAFLOWCORE_API void OR(const FDataflowSelection& Other, FDataflowSelection& Result) const;
56 DATAFLOWCORE_API void XOR(const FDataflowSelection& Other, FDataflowSelection& Result) const;
57 // subtract the selected elements of 'Other' from this selection
59 void Invert() { SelectionArray.BitwiseNOT(); }
60 DATAFLOWCORE_API void SetWithMask(const bool Value, const FDataflowSelection& Mask);
61 const TBitArray<>& GetBitArray() const { return SelectionArray; };
62
68
69 // @return true if this selection is valid for the given collection -- i.e., if the selection expects the group to have the correct number of elements
70 DATAFLOWCORE_API bool IsValidForCollection(const FManagedArrayCollection& InCollection) const;
71
76 DATAFLOWCORE_API FString ToString();
77
78private:
79 FName GroupName;
80 TBitArray<> SelectionArray;
81};
82
83USTRUCT()
94
95
96USTRUCT()
98{
100
101 inline static const FName VerticesGroupName = "Vertices";
102
104 : FDataflowSelection(VerticesGroupName)
105 {}
106};
107
108
109USTRUCT()
111{
113
114 inline static const FName FacesGroupName = "Faces";
115
117 : FDataflowSelection(FacesGroupName)
118 {}
119};
120
121USTRUCT()
132
133USTRUCT()
144
145USTRUCT()
147{
149
150 inline static const FName CurveGroupName = "Curves";
151
153 : FDataflowSelection(CurveGroupName)
154 {}
155};
156
157UENUM(BlueprintType)
159{
160 Transform UMETA(DisplayName = "Transform"),
161 Vertices UMETA(DisplayName = "Vertices"),
162 Faces UMETA(DisplayName = "Faces"),
163 Geometry UMETA(DisplayName = "Geometry"),
164 Curves UMETA(DisplayName = "Curves"),
165};
166
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EDataflowSelectionType
Definition DataflowSelection.h:159
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition NameTypes.h:617
Definition Array.h:670
Definition DataflowSelection.h:147
Definition DataflowSelection.h:111
Definition DataflowSelection.h:123
Definition DataflowSelection.h:135
Definition DataflowSelection.h:13
void SetNotSelected(int32 Idx)
Definition DataflowSelection.h:37
void SetSelected(int32 Idx)
Definition DataflowSelection.h:35
void Invert()
Definition DataflowSelection.h:59
const TBitArray & GetBitArray() const
Definition DataflowSelection.h:61
FDataflowSelection(FName InGroupName)
Definition DataflowSelection.h:19
bool IsValidIndex(int32 Idx) const
Definition DataflowSelection.h:30
bool IsSelected(int32 Idx) const
Definition DataflowSelection.h:34
int32 Num() const
Definition DataflowSelection.h:27
Definition DataflowSelection.h:85
Definition DataflowSelection.h:98
Definition ManagedArrayCollection.h:56
CHAOS_API FString ToString() const
Definition ManagedArrayCollection.cpp:687