UPolygonSelectionMechanic

[UPolygonSelectionMechanic](API\Plugins\ModelingComponents\Selection\UPolygonSelectionMechanic) implements the interaction for selecting a set of faces/vertices/edges from a [FGroupTopology](API\Plugins\DynamicMesh\FGroupTopology) on a [USimpleDynamicMeshComponent](API\Plugins\ModelingComponents\USimpleDynamicMeshComponent).

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

ModelingComponents

Header

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

Include

#include "Selection/PolygonSelectionMechanic.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UPolygonSelectionMechanic : public UInteractionMechanic

Remarks

UPolygonSelectionMechanic implements the interaction for selecting a set of faces/vertices/edges from a FGroupTopology on a USimpleDynamicMeshComponent.

Variables

Name Description

Protected variable

TUniquePtr< FPo...

 

ActiveChange

Public variable

bool

 

bAddSelectionFilterPropertiesToParentTool

Configuration variables that must be set before bSetup is called

Protected variable

FViewCameraStat...

 

CameraState

Protected variable

TSet< int >

 

CurrentlyHighlightedGroups

Protected variable UProperty

UTriangleSetCom...

 

DrawnTriangleSetComponent

Protected variable

TFunction< bool...

 

GetAddToSelectionModifierStateFunc

Protected variable

TFunction< FDyn...

 

GetSpatialFunc

Protected variable UProperty

UMaterialInterf...

 

HighlightedFaceMaterial

Public variable

FToolDataVisual...

 

HilightRenderer

Protected variable

FGroupTopologyS...

 

HilightSelection

Protected variable

const FDynamicM...

 

Mesh

Public variable

FSimpleMulticas...

 

OnSelectionChanged

OnSelectionChanged is broadcast whenever the selection is modified (including by FChanges)

Protected variable

FGroupTopologyS...

 

PersistentSelection

Public variable

FToolDataVisual...

 

PolyEdgesRenderer

Protected variable UProperty

APreviewGeometr...

 

PreviewGeometryActor

The actor we create internally to own the DrawnTriangleSetComponent

Public variable UProperty

UPolygonSelecti...

 

Properties

Public variable

FToolDataVisual...

 

SelectionRenderer

Protected variable

int32

 

SelectionTimestamp

Protected variable

TFunction< bool...

 

ShouldSelectEdgeLoopsFunc

When bSelectEdgeLoops is true, this function is tested to see if we should select edge loops, to allow edge loop selection to be toggled with some key (setting bSelectEdgeLoops to false overrides this function).

Protected variable

TFunction< bool...

 

ShouldSelectEdgeRingsFunc

When bSelectEdgeRings is true, this function is tested to see if we should select edge rings, to allow edge ring selection to be toggled with some key (setting bSelectEdgeRings to false overrides this function).

Protected variable

FTransform3d

 

TargetTransform

Protected variable

const FGroupTop...

 

Topology

Protected variable

FGroupTopologyS...

 

TopoSelector

Destructors

Name Description

Public function Virtual

~UPolygonSelectionMechanic()

Functions

Name Description

Public function

void

 

BeginChange()

Change Tracking Begin a change record.

Public function

void

 

ClearHighlight()

Clear current hover-highlight

Public function

void

 

ClearSelection()

Clear the current selection

Public function

TUniquePtr< ...

 

EndChange()

End the active change and return it. Returns empty change if the selection was not modified!

Public function

bool

 

EndChangeAndEmitIfModified()

Ends the active change and emits it via the parent tool, if the selection has been modified.

Public function Const

const FGroup...

 

GetActiveSelection()

Public function Const

FFrame3d

 

GetSelectionFrame

(
    bool bWorld,
    FFrame3d* InitialLocalFrame
)

Protected function

FGroupTopolo...

 

GetTopoSelectorSettings

(
    bool bUseOrthoSettings
)

Get the topology selector settings to use given the current selection settings.

Public function Const

bool

 

HasSelection()

Public function

void

 

Initialize

(
    const FDynamicMesh3* Mesh,
    FTransform TargetTransform,
    UWorld* World,
    const FGroupTopology* Topology,
    TFunction< FDynamicMeshAABBTree3&#...,
    TFunction< bool)> GetAddToSele...
)

Initializes the mechanic.

Public function

void

 

Initialize

(
    USimpleDynamicMeshComponent* M...,
    const FGroupTopology* Topology,
    TFunction< FDynamicMeshAABBTree3&#...,
    TFunction< bool)> GetAddToSele...
)

Public function

void

 

NotifyMeshChanged

(
    bool bTopologyModified
)

Notify internal data structures that the associated MeshComponent has been modified.

Public function

void

 

SetSelection

(
    const FGroupTopologySelection& Sel...
)

Replace the current selection with an external selection.

Public function

void

 

SetShouldSelectEdgeLoopsFunc

(
    TFunction< bool)> Func
)

Public function

void

 

SetShouldSelectEdgeRingsFunc

(
    TFunction< bool)> Func
)

Public function

bool

 

TopologyHitTest

(
    const FRay& WorldRay,
    FHitResult& OutHit,
    bool bUseOrthoSettings
)

Perform a hit test on the topology using the current selection settings.

Public function

bool

 

TopologyHitTest

(
    const FRay& WorldRay,
    FHitResult& OutHit,
    FGroupTopologySelection& OutSelect...,
    bool bUseOrthoSettings
)

Perform a hit test on the topology using the current selection settings.

Public function

bool

 

UpdateHighlight

(
    const FRay& WorldRay
)

Hover API Update the hover highlight based on the hit elements at the given World Ray

Public function

bool

 

UpdateSelection

(
    const FRay& WorldRay,
    FVector3d& LocalHitPositionOut,
    FVector3d& LocalHitNormalOut
)

Selection API Intersect the ray with the mesh and update the selection based on the hit element, modifier states, etc

Overridden from UInteractionMechanic

Name Description

Public function Virtual

void

 

Render

(
    IToolsContextRenderAPI* Render...
)

Allow the Mechanic to do any custom drawing (ie via PDI/RHI)

Public function Virtual

void

 

Setup

(
    UInteractiveTool* ParentTool
)

Called to initialize the InteractionMechanic

Public function Virtual

void

 

Shutdown()

Called to clean up the InteractionMechanic

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