UConstructionPlaneMechanic

[UConstructionPlaneMechanic](API\Plugins\ModelingComponents\Mechanics\UConstructionPlaneMechanic) implements an interaction in which a 3D plane can be positioned using the standard 3D Gizmo, or placed at hit-locations in the existing scene.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ModelingComponents

Header

/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Mechanics/ConstructionPlaneMechanic.h

Include

#include "Mechanics/ConstructionPlaneMechanic.h"

Syntax

UCLASS()
class UConstructionPlaneMechanic : public UInteractionMechanic

Remarks

UConstructionPlaneMechanic implements an interaction in which a 3D plane can be positioned using the standard 3D Gizmo, or placed at hit-locations in the existing scene. A grid in the plane can optionally be rendered.

Variables

Name Description

Public variable

bool

 

bShowGrid

Public variable

TUniqueFunction...

 

CanUpdatePlaneFunc

Replace this to externally control if plane can be updated

Protected variable UProperty

TObjectPtr< USi...

 

ClickToSetPlaneBehavior

Public variable

OnConstructionP...

 

OnPlaneChanged

Public variable

UE::Geometry::F...

 

Plane

Public variable UProperty

TObjectPtr< UCo...

 

PlaneTransformGizmo

Public variable UProperty

TObjectPtr< UTr...

 

PlaneTransformProxy

Public variable

TUniquePtr< FSe...

 

SetPlaneCtrlClickBehaviorTarget

This is the behavior target used for the Ctrl+click behavior that sets the plane in the world, exposed here so that the user can modify it after Setup() if needed.

Functions

Name Description

Public function

void

 

Initialize

(
    UWorld* TargetWorld,
    const UE::Geometry::FFrame3d& Init...
)

Public function

void

 

SetDrawPlaneFromWorldPos

(
    const FVector3d& Position,
    const FVector3d& Normal,
    bool bIgnoreNormal
)

Public function

void

 

SetPlaneWithoutBroadcast

(
    const UE::Geometry::FFrame3d& Plan...
)

Sets the plane without broadcasting OnPlaneChanged.

Protected function

void

 

TransformChanged

(
    UTransformProxy* Proxy,
    FTransform Transform
)

Public function

void

 

UpdateClickPriority

(
    FInputCapturePriority NewPriority
)

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

Public function Virtual

void

 

Tick

(
    float DeltaTime
)

ALlow the Mechanic to Tick

Typedefs