Navigation
API > API/Plugins > API/Plugins/ModelingComponents > API/Plugins/ModelingComponents/Selection
Inheritance Hierarchy
- IGeometrySelector
- FBaseDynamicMeshSelector
- FDynamicMeshSelector
- FStaticMeshSelector
- FVolumeSelector
References
| Module | ModelingComponents |
| Header | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Selection/GeometrySelector.h |
| Include | #include "Selection/GeometrySelector.h" |
Syntax
class IGeometrySelector
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FOnGeometryModified | OnGeometryModifed |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| 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. | |
| void | AccumulateSelectionBounds
(
const FGeometrySelection& Selection, |
Accumulate the bounds of the provided Selection in the provided BoundsInOut. | |
| void | AccumulateSelectionElements
(
const FGeometrySelection& Selection, |
Accumulate geometric elements (currently 3D triangles, line segments, and points) for the provided Selection in the provided ElementsInOut. | |
| FGeometryIdentifier | |||
| FTransform | |||
| FOnGeometryModified & | The OnGeometryModified delegate will fire if the geometry of the Selector's Target Object is modified. | ||
| void | GetSelectionFrame
(
const FGeometrySelection& Selection, |
Compute a 3D frame for the provided Selection. | |
| void | GetSelectionPreviewForRaycast
(
const FWorldRayQueryInfo& RayInfo, |
Query the Selector for a potential selection based on world-space Ray. | |
| void | GetTargetFrame
(
const FGeometrySelection& Selection, |
Compute a 3D frame for the Selector's target object | |
| void | InitializeSelectionFromPredicate
(
FGeometrySelection& SelectionInOut, |
Populate a Selection using the provided ReferenceMode, with a Predicate and optional ReferenceSelection. | |
| IGeometrySelectionTransformer * | InitializeTransformation
(
const FGeometrySelection& Selection |
Create and initialize a IGeometrySelectionTransformer for the provided Selection. | |
| bool | IsLockable () |
Locking support. | |
| bool | IsLocked () |
||
| void | |||
| bool | RayHitTest
(
const FWorldRayQueryInfo& RayInfo, |
Check for intersection between a world-space Ray with the Selector's target object and return a FInputRayHit result. | |
| bool | Restore () |
Restore a Selector that has had Sleep() called on it. | |
| void | SetLockedState
(
bool bLocked |
||
| void | Shutdown () |
Disconnect the Selector from its target object and prepare for deletion. | |
| void | ShutdownTransformation
(
IGeometrySelectionTransformer* Transformer |
Shutdown an active IGeometrySelectionTransformer. | |
| bool | Sleep () |
Temporarily disable the Selector, with the intention of re-enabling it (via Restore()) in the future. | |
| bool | 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) | ||
| void | UpdateSelectionFromSelection
(
const FGeometrySelection& FromSelection, |
Combine FromSelection with the current Selection owned/referenced by the Selector, using the provided SelectionEditor and UpdateConfig. | |
| void | UpdateSelectionViaRaycast
(
const FWorldRayQueryInfo& RayInfo, |
Update the active selection based on a world-space Ray. | |
| void | UpdateSelectionViaShape
(
const FWorldShapeQueryInfo& ShapeInfo, |
Update the active selection based on a world-space Shape. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FWorldRayQueryInfo | |||
| FWorldShapeQueryInfo |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EInitializeSelectionMode |