UPreviewGeometry

[UPreviewGeometry](API\Plugins\ModelingComponents\Drawing\UPreviewGeometry) creates and manages an [APreviewGeometryActor](API\Plugins\ModelingComponents\Drawing\APreviewGeometryActor) and a set of preview geometry Components.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ModelingComponents

Header

/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Drawing/PreviewGeometryActor.h

Include

#include "Drawing/PreviewGeometryActor.h"

Syntax

UCLASS(Transient)
class UPreviewGeometry : public UObject

Remarks

UPreviewGeometry creates and manages an APreviewGeometryActor and a set of preview geometry Components. Preview geometry Components are identified by strings.

Variables

Name Description

Public variable UProperty

TMap< FString, ...

 

LineSets

LineSetComponents created and owned by the UPreviewGeometry, and added as child components of the ParentActor

Public variable UProperty

TObjectPtr< APr...

 

ParentActor

Actor created and managed by the UPreviewGeometry

Public variable UProperty

TMap< FString, ...

 

PointSets

PointSetComponents created and owned by the UPreviewGeometry, and added as child components of the ParentActor

Destructors

Name Description

Public function Virtual

~UPreviewGeometry()

Functions

Name Description

Public function UFunction

ULineSetComp...

 

AddLineSet

(
    const FString& LineSetIdentifier
)

Line SetsCreate a new line set with the given LineSetIdentifier and return it

Public function UFunction

UPointSetCom...

 

AddPointSet

(
    const FString& PointSetIdentifier
)

Point SetsCreate a new point set with the given PointSetIdentifier and return it

Public function UFunction

void

 

CreateInWorld

(
    UWorld* World,
    const FTransform& WithTransform
)

Create preview mesh in the World with the given transform

Public function

void

 

CreateOrUpdateLineSet

(
    const FString& LineSetIdentifier,
    int32 NumIndices,
    TFunctionRef< voidIndex, TArr...,
    int32 LinesPerIndexHint
)

Add a set of lines produced by calling LineGenFunc for each index in range [0,NumIndices)

Public function UFunction

void

 

Disconnect()

Remove and destroy preview mesh

Public function UFunction

ULineSetComp...

 

FindLineSet

(
    const FString& LineSetIdentifier
)

Public function UFunction

UPointSetCom...

 

FindPointSet

(
    const FString& PointSetIdentifier
)

Public function Const UFunction

APreviewGeom...

 

GetActor()

Public function Const

FTransform

 

GetTransform()

Get the current transform on the preview

Protected function Virtual

void

 

OnCreated()

Called at the end of CreateInWorld() to allow subclasses to add additional setup

Protected function Virtual

void

 

OnDisconnected()

Called at the beginning of Disconnect() to allow subclasses to perform additional cleanup

Public function UFunction

void

 

RemoveAllLineSets

(
    bool bDestroy
)

Remove all LineSetComponents

Public function UFunction

void

 

RemoveAllPointSets

(
    bool bDestroy
)

Remove all PointSetComponents

Public function UFunction

bool

 

RemoveLineSet

(
    const FString& LineSetIdentifier,
    bool bDestroy
)

Remove the LineSetComponent with the given LineSetIdentifier

Public function UFunction

bool

 

RemovePointSet

(
    const FString& PointSetIdentifier,
    bool bDestroy
)

Remove the PointSetComponent with the given PointSetIdentifier

Public function UFunction

void

 

SetAllLineSetsMaterial

(
    UMaterialInterface* Material
)

Set the Material of all LineSetComponents

Public function UFunction

void

 

SetAllPointSetsMaterial

(
    UMaterialInterface* Material
)

Set the Material of all PointSetComponents

Public function

void

 

SetAllVisible

(
    bool bVisible
)

Set visibility state of the preview mesh

Public function UFunction

bool

 

SetLineSetMaterial

(
    const FString& LineSetIdentifier,
    UMaterialInterface* NewMateria...
)

Set the Material of the LineSetComponent with the given LineSetIdentifier

Public function UFunction

bool

 

SetLineSetVisibility

(
    const FString& LineSetIdentifier,
    bool bVisible
)

Set the visibility of the LineSetComponent with the given LineSetIdentifier

Public function UFunction

bool

 

SetPointSetMaterial

(
    const FString& PointSetIdentifier,
    UMaterialInterface* NewMateria...
)

Set the Material of the PointSetComponent with the given PointSetIdentifier

Public function UFunction

bool

 

SetPointSetVisibility

(
    const FString& PointSetIdentifier,
    bool bVisible
)

Set the visibility of the PointSetComponent with the given PointSetIdentifier

Public function

void

 

SetTransform

(
    const FTransform& UseTransform
)

Set the transform on the preview mesh

Public function

void

 

UpdateAllLineSets

(
    UpdateFuncType UpdateFunc
)

Call UpdateFuncType(ULineSetComponent*) for all existing Line Sets

Public function

void

 

UpdateAllPointSets

(
    UpdateFuncType UpdateFunc
)

Call UpdateFuncType(UPointSetComponent*) for all existing Point Sets

Public function

void

 

UpdateLineSet

(
    const FString& LineSetIdentifier,
    UpdateFuncType UpdateFunc
)

Line Set Utilities Find the identified line set and call UpdateFuncType(ULineSetComponent*)

Public function

void

 

UpdatePointSet

(
    const FString& PointSetIdentifier,
    UpdateFuncType UpdateFunc
)

Point Set Utilities Find the identified point set and call UpdateFuncType(UPointSetComponent*)