FGroupTopologySelector

[FGroupTopologySelector](API\Plugins\ModelingComponents\Selection\FGroupTopologySelector) implements selection behavior for a [FGroupTopology](API\Plugins\DynamicMesh\FGroupTopology) mesh.

Windows
MacOS
Linux

References

Module

ModelingComponents

Header

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Public/Selection/GroupTopologySelector.h

Include

#include "Selection/GroupTopologySelector.h"

Syntax

class FGroupTopologySelector

Remarks

FGroupTopologySelector implements selection behavior for a FGroupTopology mesh. Groups, Group Edges, and Corners can be selected dependings on the settings passed in.

Internally a FGeometrySet3 is constructed to support ray-hit testing against the edges and corners.

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 FGroupTopologySelector 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.

Variables

Name Description

Protected variable

bool

 

bGeometryInitialized

Protected variable

bool

 

bGeometryUpToDate

Protected variable

FGeometrySet3

 

GeometrySet

Protected variable

TFunction< FDyn...

 

GetSpatial

Protected variable

const FDynamicM...

 

Mesh

Public variable

TFunction< bool...

 

PointsWithinToleranceTest

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".

Protected variable

const FGroupTop...

 

Topology

Public variable

float

 

VisualAngleSnapThreshold

Internal rendering parameters

Constructors

Name Description

Public function

FGroupTopologySelector()

Functions

Name Description

Protected function Const

bool

 

DoCornerBasedSelection

(
    const FSelectionSettings& Settings,
    const FRay3d& Ray,
    FDynamicMeshAABBTree3* Spatial,
    const FGeometrySet3& TopoSpatial,
    FGroupTopologySelection& ResultOut,
    FVector3d& SelectedPositionOut,
    int32* EdgeSegmentIdOut
)

Protected function Const

bool

 

DoEdgeBasedSelection

(
    const FSelectionSettings& Settings,
    const FRay3d& Ray,
    FDynamicMeshAABBTree3* Spatial,
    const FGeometrySet3& TopoSpatial,
    FGroupTopologySelection& ResultOut,
    FVector3d& SelectedPositionOut,
    int32* EdgeSegmentIdOut
)

Public function

void

 

DrawSelection

(
    const FGroupTopologySelection& Sel...,
    FToolDataVisualizer* Renderer,
    const FViewCameraState* Camera...
)

Render the given selection with the default settings of the FToolDataVisualizer.

Public function

bool

 

ExpandSelectionByEdgeLoops

(
    FGroupTopologySelection& Selection
)

Using the edges in the given selection as starting points, add any "edge loops" containing the edges.

Public function

bool

 

ExpandSelectionByEdgeRings

(
    FGroupTopologySelection& Selection
)

Using the edges in the given selection as starting points, add any "edge rings" containing the edges.

Public function

bool

 

FindSelectedElement

(
    const FSelectionSettings& Settings,
    const FRay3d& Ray,
    FGroupTopologySelection& ResultOut,
    FVector3d& SelectedPositionOut,
    FVector3d& SelectedNormalOut,
    int32* EdgeSegmentIdOut
)

Find which element was selected for a given ray.

Public function

const FGeome...

 

GetGeometrySet()

Public function

void

 

Initialize

(
    const FDynamicMesh3* Mesh,
    const FGroupTopology* Topology
)

Initialize the selector with the given Mesh and Topology.

Public function

void

 

Invalidate

(
    bool bTopologyDeformed,
    bool bTopologyModified
)

Notify the Selector that the mesh has changed.

Public function

void

 

SetSpatialSource

Provide a function that will return an AABBTree for the Mesh.

Classes

Name

Description

Public struct

FSelectionSettings

Configuration variables Determines the behavior of a FindSelectedElement() call.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss