Navigation
API > API/Plugins > API/Plugins/GeometryScriptingCore
FGeometryScriptMeshSelection is a container for a Mesh Selection used in Geometry Script. The actual selection representation is not exposed to BP, use functions in MeshSelectionFunctions/etc to manipulate the selection.
Internally the selection is stored as a SharedPtr to a FGeometrySelection, which stores a TSet (so unique add and remove are efficient, but the selection cannot be directly indexed without converting to an Array).
Note that the Selection storage is not a UProperty, and is not serialized. FGeometryScriptMeshSelection instances cannot be serialized, they are only transient data structures, that can be created and used Blueprint instances.
| Name | FGeometryScriptMeshSelection |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/GeometryScriptSelectionTypes.h |
| Include Path | #include "GeometryScript/GeometryScriptSelectionTypes.h" |
Syntax
USTRUCT (BlueprintType , Meta=(DisplayName="Mesh Selection"))
struct FGeometryScriptMeshSelection
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGeometryScriptMeshSelection() |
GeometryScript/GeometryScriptSelectionTypes.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| GeoSelection | TSharedPtr< UE::Geometry::FGeometrySelection > | Keeping this private for now in case it needs to be revised in 5.2+ | GeometryScript/GeometryScriptSelectionTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearSelection() |
GeometryScript/GeometryScriptSelectionTypes.h | ||
void CombineSelectionInPlace
(
const FGeometryScriptMeshSelection& SelectionB, |
Combine SelectionB with current selection, updating current selection, using CombineMode to control how combining happens | GeometryScript/GeometryScriptSelectionTypes.h | |
EGeometryScriptIndexType ConvertToMeshIndexArray
(
const UE::Geometry::FDynamicMesh3& Mesh, |
Convert the current selection to a TArray, optionally converting to ConvertToType. | GeometryScript/GeometryScriptSelectionTypes.h | |
void DebugPrint() |
GeometryScript/GeometryScriptSelectionTypes.h | ||
int32 GetNumSelected () |
Note that for edge selections, this can return more elements than expected because both can be redundantly represented i.e. an edge can be in the selection once per 'half edge', since it is represented by triangle/index-in-triangle pair. | GeometryScript/GeometryScriptSelectionTypes.h | |
int32 GetNumUniqueSelected
(
const UE::Geometry::FDynamicMesh3& Mesh |
Return the number of valid, unique elements in the selection; e.g., with no double-counting of selected edges. | GeometryScript/GeometryScriptSelectionTypes.h | |
EGeometryScriptMeshSelectionType GetSelectionType() |
GeometryScript/GeometryScriptSelectionTypes.h | ||
bool IsEmpty() |
GeometryScript/GeometryScriptSelectionTypes.h | ||
void ProcessByEdgeID
(
const UE::Geometry::FDynamicMesh3& Mesh, |
Call PerEdgeFunc for each EdgeID in the Selection. | GeometryScript/GeometryScriptSelectionTypes.h | |
void ProcessByTriangleID
(
const UE::Geometry::FDynamicMesh3& Mesh, |
Call PerTriangleFunc for each TriangleID in the Selection. | GeometryScript/GeometryScriptSelectionTypes.h | |
void ProcessByVertexID
(
const UE::Geometry::FDynamicMesh3& Mesh, |
Call PerVertexFunc for each VertexID in the Selection. | GeometryScript/GeometryScriptSelectionTypes.h | |
void SetSelection
(
const FGeometryScriptMeshSelection& Selection |
GeometryScript/GeometryScriptSelectionTypes.h | ||
void SetSelection
(
const UE::Geometry::FGeometrySelection& Selection |
GeometryScript/GeometryScriptSelectionTypes.h | ||
void SetSelection
(
UE::Geometry::FGeometrySelection&& Selection |
GeometryScript/GeometryScriptSelectionTypes.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool ConvertIndexTypeToSelectionType
(
EGeometryScriptIndexType IndexType, |
GeometryScript/GeometryScriptSelectionTypes.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FGeometryScriptMeshSelection& Other |
GeometryScript/GeometryScriptSelectionTypes.h | ||
bool operator==
(
const FGeometryScriptMeshSelection& Other |
GeometryScript/GeometryScriptSelectionTypes.h |