Navigation
API > API/Plugins > API/Plugins/ModelingComponents
IGeometrySelector is a base API definition for, roughly, "an object that knows how to select elements and/or work with element selections on some other object", where "element" is some "part" of the object, like a mesh edge/vertex/triangle, or intermediate structure (eg a polygroup).
Essentially the purpose of IGeometrySelector is to provide the bridge between "object that can have a selection" and "the active selection on that object". The Selection is stored as a FGeometrySelection which has no reference to a type or target object, and standard target objects (eg a StaticMesh, Volume, etc) have no inherent knowledge of, or support for, low-level geometry selections. So the Selector provides these capabilities, as well as related functionality like being able to transform an active selection and emit necessary transactions/etc.
Generally clients will not create a IGeometrySelector instance directly. For a given implmentation, a IGeometrySelectorFactory is registered with the UGeometrySelectionManager, and it creates instances based on the active selection.
Where possible, the UGeometrySelectionManager will also "sleep" a IGeometrySelector for a given target object instead of destroying it when the object is deselected, and then "restore" it if the object is re-selected. This avoids frequent churn in Selectors as the user clicks between objects.
Selector implementations should ideally have a strategy to lazy-construct any large data structures (eg mesh AABBTrees, etc). Again this is to avoid excessive overhead when the user (for example) selects a large object but has no intention of doing element-level selection.
| Name | IGeometrySelector |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Selection/GeometrySelector.h |
| Include Path | #include "Selection/GeometrySelector.h" |
Syntax
class IGeometrySelector
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~IGeometrySelector() |
Selection/GeometrySelector.h |
Structs
| Name | Remarks |
|---|---|
| FWorldRayQueryInfo | |
| FWorldShapeQueryInfo |
Enums
Public
| Name | Remarks |
|---|---|
| EInitializeSelectionMode |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FGeometrySelection | UE::Geometry::FGeometrySelection | Selection/GeometrySelector.h | |
| FGeometrySelectionBounds | UE::Geometry::FGeometrySelectionBounds | Selection/GeometrySelector.h | |
| FGeometrySelectionEditor | UE::Geometry::FGeometrySelectionEditor | Selection/GeometrySelector.h | |
| FGeometrySelectionElements | UE::Geometry::FGeometrySelectionElements | Selection/GeometrySelector.h | |
| FGeometrySelectionUpdateConfig | UE::Geometry::FGeometrySelectionUpdateConfig | Selection/GeometrySelector.h | |
| FGeometrySelectionUpdateResult | UE::Geometry::FGeometrySelectionUpdateResult | Selection/GeometrySelector.h | |
| FOnGeometryModified | TMulticastDelegate_OneParam< void, IGeometrySelector *Selector > | Selection/GeometrySelector.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AccumulateElementsFromPredicate
(
FGeometrySelectionElements& ElementsInOut, |
Accumulate all geometric elements (currently 3D triangles, line segments, and points) in the provided ElementsInOut by initializing vertex, edge, and face selections using the provided predicate and then accumulating elements for those selections. | Selection/GeometrySelector.h | |
void AccumulateSelectionBounds
(
const FGeometrySelection& Selection, |
Accumulate the bounds of the provided Selection in the provided BoundsInOut. | Selection/GeometrySelector.h | |
Please use the function of the same name which takes EEnumerateSelectionMapping flags virtual instead void AccumulateSelectionElements
(
const FGeometrySelection& Selection, |
Prefer AccumulateSelectionElements with Flags parameter. | Selection/GeometrySelector.h | |
void AccumulateSelectionElements
(
const FGeometrySelection& Selection, |
Accumulate geometric elements (currently 3D triangles, line segments, and points) for the provided Selection in the provided ElementsInOut. | Selection/GeometrySelector.h | |
FGeometryIdentifier GetIdentifier() |
Selection/GeometrySelector.h | ||
FTransform GetLocalToWorldTransform() |
Selection/GeometrySelector.h | ||
FOnGeometryModified & GetOnGeometryModifed () |
The OnGeometryModified delegate will fire if the geometry of the Selector's Target Object is modified. | Selection/GeometrySelector.h | |
void GetSelectionFrame
(
const FGeometrySelection& Selection, |
Compute a 3D frame for the provided Selection. | Selection/GeometrySelector.h | |
void GetSelectionPreviewForRaycast
(
const FWorldRayQueryInfo& RayInfo, |
Query the Selector for a potential selection based on world-space Ray. | Selection/GeometrySelector.h | |
void GetTargetFrame
(
const FGeometrySelection& Selection, |
Compute a 3D frame for the Selector's target object | Selection/GeometrySelector.h | |
void InitializeSelectionFromPredicate
(
FGeometrySelection& SelectionInOut, |
Populate a Selection using the provided ReferenceMode, with a Predicate and optional ReferenceSelection. | Selection/GeometrySelector.h | |
IGeometrySelectionTransformer * InitializeTransformation
(
const FGeometrySelection& Selection |
Create and initialize a IGeometrySelectionTransformer for the provided Selection. | Selection/GeometrySelector.h | |
virtual bool IsLockable () |
Locking support. | Selection/GeometrySelector.h | |
virtual bool IsLocked() |
Selection/GeometrySelector.h | ||
bool RayHitTest
(
const FWorldRayQueryInfo& RayInfo, |
Check for intersection between a world-space Ray with the Selector's target object and return a FInputRayHit result. | Selection/GeometrySelector.h | |
virtual bool Restore() |
Restore a Selector that has had Sleep() called on it. | Selection/GeometrySelector.h | |
virtual void SetLockedState
(
bool bLocked |
Selection/GeometrySelector.h | ||
void Shutdown() |
Disconnect the Selector from its target object and prepare for deletion. | Selection/GeometrySelector.h | |
void ShutdownTransformation
(
IGeometrySelectionTransformer* Transformer |
Shutdown an active IGeometrySelectionTransformer. | Selection/GeometrySelector.h | |
virtual bool Sleep () |
Temporarily disable the Selector, with the intention of re-enabling it (via Restore()) in the future. | Selection/GeometrySelector.h | |
virtual bool SupportsSleep() |
The SelectionManager will call SupportsSleep() to determine if an IGeometrySelector needs to be destroyed when the target object is deselected, or if it can be re-used (generally more efficient) | Selection/GeometrySelector.h | |
void UpdateSelectionFromSelection
(
const FGeometrySelection& FromSelection, |
Combine FromSelection with the current Selection owned/referenced by the Selector, using the provided SelectionEditor and UpdateConfig. | Selection/GeometrySelector.h | |
void UpdateSelectionViaRaycast
(
const FWorldRayQueryInfo& RayInfo, |
Update the active selection based on a world-space Ray. | Selection/GeometrySelector.h | |
void UpdateSelectionViaShape
(
const FWorldShapeQueryInfo& ShapeInfo, |
Update the active selection based on a world-space Shape. | Selection/GeometrySelector.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void NotifyGeometryModified() |
Selection/GeometrySelector.h |