Navigation
API > API/Plugins > API/Plugins/ModelingComponents
FMeshTopologySelector implements selection behavior for a subset of mesh elements. Topological Groups, Edges, and Corners can be selected depending on the subclass of FTopologyProvider used.
Internally a FGeometrySet3 is constructed to support ray-hit testing against the edges and corners.
Note that to hit-test against the mesh you have to provide a your own FDynamicMeshAABBTree3. You do this by providing a callback via SetSpatialSource(). The reason for this is that (1) owners of an FMeshTopologySelector likely already have a BVTree and (2) if the use case is deformation, we need to make sure the owner has recomputed the BVTree before we call functions on it. The callback you provide should do that!
DrawSelection() can be used to visualize a selection via line/circle drawing.
| Name | FMeshTopologySelector |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Selection/MeshTopologySelector.h |
| Include Path | #include "Selection/MeshTopologySelector.h" |
Syntax
class FMeshTopologySelector
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMeshTopologySelector() |
Selection/MeshTopologySelector.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMeshTopologySelector() |
Selection/MeshTopologySelector.h |
Structs
| Name | Remarks |
|---|---|
| FSelectionSettings | Configuration variables Determines the behavior of a FindSelectedElement() call. |
Enums
Public
| Name | Remarks |
|---|---|
| ECornerDrawStyle |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| PointsWithinToleranceTest | TFunction< bool(const FVector3d &, const FVector3d &, double ToleranceScale)> | This is the function we use to determine if a point on a corner/edge is close enough to the hit-test ray to treat as a "hit". | Selection/MeshTopologySelector.h | |
| VisualAngleSnapThreshold | float | Internal rendering parameters | Selection/MeshTopologySelector.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DrawSelection
(
const FGroupTopologySelection& Selection, |
Render the given selection with the default settings of the FToolDataVisualizer. | Selection/MeshTopologySelector.h | |
bool FindSelectedElement
(
const FSelectionSettings& Settings, |
Given a camera rectangle (from a marquee selection) gives the corners/edges/groups that are contained in the rectangle. | Selection/MeshTopologySelector.h | |
bool FindSelectedElement
(
const FSelectionSettings& Settings, |
Find which element was selected for a given ray. | Selection/MeshTopologySelector.h | |
const FGeometrySet3 & GetGeometrySet() |
Selection/MeshTopologySelector.h | ||
const FTopologyProvider * GetTopologyProvider() |
Selection/MeshTopologySelector.h | ||
void Invalidate
(
bool bTopologyDeformed, |
Notify the Selector that the mesh has changed. | Selection/MeshTopologySelector.h | |
void SetSpatialSource
(
TFunction< FDynamicMeshAABBTree3*(void)> GetSpatialFunc |
Provide a function that will return an AABBTree for the Mesh. | Selection/MeshTopologySelector.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool DoCornerBasedSelection
(
const FSelectionSettings& Settings, |
Selection/MeshTopologySelector.h | ||
bool DoEdgeBasedSelection
(
const FSelectionSettings& Settings, |
Selection/MeshTopologySelector.h |