UAddPrimitiveTool

Base tool to create primitives

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MeshModelingTools

Header

/Engine/Plugins/Runtime/MeshModelingToolset/Source/MeshModelingTools/Public/AddPrimitiveTool.h

Include

#include "AddPrimitiveTool.h"

Syntax

UCLASS()
class UAddPrimitiveTool :
    public USingleClickTool,
    public IHoverBehaviorTarget

Remarks

Base tool to create primitives

Variables

Name Description

Protected variable UProperty

FString

 

AssetName

Protected variable UProperty

TObjectPtr< ULa...

 

LastGenerated

Protected variable UProperty

TObjectPtr< UNe...

 

MaterialProperties

Protected variable UProperty

TObjectPtr< UCr...

 

OutputTypeProperties

Property set for type of output object (StaticMesh, Volume, etc)

Protected variable UProperty

TObjectPtr< UPr...

 

PreviewMesh

Protected variable

UE::Geometry::F...

 

ShapeFrame

Protected variable UProperty

TObjectPtr< UPr...

 

ShapeSettings

Protected variable

UWorld *

 

TargetWorld

Constructors

Name Description

Public function

UAddPrimitiveTool

(
    const FObjectInitializer&
)

Functions

Name Description

Protected function Virtual

UProceduralS...

 

CreateShapeSettings()

Protected function Virtual Const

void

 

GenerateMesh

(
    FDynamicMesh3* OutMesh
)

Protected function Const

bool

 

IsEquivalentLastGeneratedAsset()

Checks if the passed-in settings would create the same asset as the current settings

Public function Virtual

void

 

SetWorld

(
    UWorld* World
)

Protected function Const

void

 

UpdatePreviewMesh()

Protected function

void

 

UpdatePreviewPosition

(
    const FInputDeviceRay& ClickPos
)

Overridden from UInteractiveTool

Name Description

Public function Virtual Const

bool

 

CanAccept()

Public function Virtual Const

bool

 

HasAccept()

Public function Virtual Const

bool

 

HasCancel()

Public function Virtual

void

 

OnPropertyModified

(
    UObject* PropertySet,
    FProperty* Property
)

Automatically called by UInteractiveToolPropertySet.OnModified delegate to notify Tool of child property set changes

Public function Virtual

void

 

Render

(
    IToolsContextRenderAPI* Render...
)

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

Public function Virtual

void

 

Setup()

Register default primary-button-click InputBehaviors

Public function Virtual

void

 

Shutdown

(
    EToolShutdownType ShutdownType
)

Called by ToolManager to shut down the Tool

Overridden from IClickBehaviorTarget

Name Description

Public function Virtual

void

 

OnClicked

(
    const FInputDeviceRay& ClickPos
)

Click the Target at this 2D position / 3D ray. Default behavior is to print debug string.

Overridden from IHoverBehaviorTarget

Name Description

Public function Virtual

FInputRayHit

 

BeginHoverSequenceHitTest

(
    const FInputDeviceRay& PressPos
)

Do hover hit-test

Public function Virtual

void

 

OnBeginHover

(
    const FInputDeviceRay& DevicePos
)

Initialize hover sequence at given position

Public function Virtual

void

 

OnEndHover()

Terminate active hover sequence

Public function Virtual

bool

 

OnUpdateHover

(
    const FInputDeviceRay& DevicePos
)

Update active hover sequence with new input position