UBaseBrushTool

[UBaseBrushTool](API\Runtime\InteractiveToolsFramework\BaseTools\UBaseBrushTool) implements standard brush-style functionality for an InteractiveTool.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

InteractiveToolsFramework

Header

/Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseTools/BaseBrushTool.h

Include

#include "BaseTools/BaseBrushTool.h"

Syntax

class UBaseBrushTool : public UMeshSurfacePointTool

Remarks

UBaseBrushTool implements standard brush-style functionality for an InteractiveTool. This includes: 1) brush radius property set with dimension-relative brush sizing and default brush radius hotkeys 2) brush indicator visualization 3) tracking of last brush stamp location via .LastBrushStamp FProperty 4) status of brush stroke via .bInBrushStroke FProperty

Variables

Name Description

Public variable

bool

 

bInBrushStroke

Set to true by Tool if user is currently in an active brush stroke

Public variable

TObjectPtr< UBr...

 

BrushProperties

Properties that control brush size/etc

Protected variable

TInterval< floa...

 

BrushRelativeSizeRange

Protected variable

TObjectPtr< UBr...

 

BrushStampIndicator

Brush Indicator support

Protected variable

double

 

CurrentBrushRadius

Public variable

FBrushStampData

 

LastBrushStamp

Position of brush at last update (both during stroke and during Hover)

Protected variable

TSoftClassPtr< ...

 

PropertyClass

Public variable

float

 

WorldToLocalScale

Uniform scale factor that scales from world space (where brush usually exists) to local space

Constructors

Name Description

Public function

UBaseBrushTool()

Functions

Overridden from UMeshSurfacePointTool

Name Description

Public function Virtual

void

 

OnBeginDrag

(
    const FRay& Ray
)

UMeshSurfacePointTool implementation

Public function Virtual

void

 

OnEndDrag

(
    const FRay& Ray
)

This function is called when the user releases the button driving a click-drag-release interaction

Public function Virtual

void

 

OnUpdateDrag

(
    const FRay& Ray
)

This function is called each frame that the user is in a click-drag-release interaction

Overridden from UInteractiveTool

Name Description

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

 

RegisterActions

(
    FInteractiveToolActionSet& ActionS...
)

Override this function to register the set of Actions this Tool supports, using FInteractiveToolActionSet::RegisterAction.

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 InputBehaviors, etc

Public function Virtual

void

 

Shutdown

(
    EToolShutdownType ShutdownType
)

Called by ToolManager to shut down the Tool

Overridden from IHoverBehaviorTarget

Name Description

Public function Virtual

bool

 

OnUpdateHover

(
    const FInputDeviceRay& DevicePos
)

Update active hover sequence with new input position