UShapeSprayTool

[UShapeSprayTool](API\Plugins\MeshModelingToolsEditorOnly\UShapeSprayTool) is a brush-based tool that generates random points on the target surface within the brush radius, and then creates small meshes at those points.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MeshModelingToolsEditorOnly

Header

/Engine/Plugins/Experimental/MeshModelingToolsetExp/Source/MeshModelingToolsEditorOnly/Public/ShapeSprayTool.h

Include

#include "ShapeSprayTool.h"

Syntax

UCLASS(Transient)
class UShapeSprayTool : public UDynamicMeshBrushTool

Remarks

UShapeSprayTool is a brush-based tool that generates random points on the target surface within the brush radius, and then creates small meshes at those points. The accumulated meshes are appended and can be emitted as a new StaticMeshComponent on Accept.

Variables

Name Description

Protected variable UProperty

TObjectPtr< UDy...

 

AccumMeshComponent

Small meshes are accumulated here

Protected variable

FRandomStream

 

Random

Protected variable UProperty

TObjectPtr< USh...

 

Settings

Protected variable

UE::Geometry::F...

 

ShapeMesh

Protected variable

UWorld *

 

TargetWorld

Protected variable

TArray< int >

 

VertexMap

Constructors

Name Description

Public function

UShapeSprayTool()

Functions

Name Description

Protected function Virtual

void

 

EmitResult()

Public function Virtual

void

 

SetWorld

(
    UWorld* World
)

Protected function

void

 

SplatShape

(
    const UE::Geometry::FFrame3d& Loca...,
    double Scale,
    UE::Geometry::FDynamicMesh3* T...
)

Protected function

void

 

UpdateShapeMesh()

Overridden from UMeshSurfacePointTool

Name Description

Public function Virtual

void

 

OnBeginDrag

(
    const FRay& Ray
)

UMeshSurfacePointTool API.

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

 

Setup()

Register InputBehaviors, etc

Public function Virtual

void

 

Shutdown

(
    EToolShutdownType ShutdownType
)

Called by ToolManager to shut down the Tool