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 (optionally configurable via UpdateEnableFlags). 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 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

 

bEnableCornerHits

Protected variable

bool

 

bEnableEdgeHits

Protected variable

bool

 

bEnableFaceHits

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

Configuration variables 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

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

 

FindSelectedElement

(
    const FRay3d& Ray,
    FGroupTopologySelection& ResultOut,
    FVector3d& SelectedPositionOut,
    FVector3d& SelectedNormalOut
)

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.

Public function

void

 

UpdateEnableFlags

(
    bool bFaceHits,
    bool bEdgeHits,
    bool bCornerHits
)

Configure whether faces, edges, and corners will be returned by hit-tests

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