USpaceCurveDeformationMechanic

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

ModelingComponents

Header

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Public/Mechanics/SpaceCurveDeformationMechanic.h

Include

#include "Mechanics/SpaceCurveDeformationMechanic.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class USpaceCurveDeformationMechanic :
    public UInteractionMechanic,
    public IClickBehaviorTarget,
    public IHoverBehaviorTarget

Variables

Name Description

Protected variable

bool

 

bAddToSelectionToggle

Support for Shift and Ctrl toggles.

Protected variable

bool

 

bGizmoBeingDragged

Used to make it easy to tell whether the gizmo was moved by the user or by undo/redo or some other change that we shoulnd't respond to.

Protected variable

bool

 

bRenderGeometryValid

Protected variable

bool

 

bSpatialValid

Protected variable

FViewCameraStat...

 

CameraState

Support for hovering.

Public variable UProperty

USingleClickInp...

 

ClickBehavior

Behaviors used for moving points around and hovering them.

Protected variable

int32

 

CtrlModifierId

Protected variable

int32

 

CurrentChangeStamp

Used for expiring undo/redo changes, which compare this to their stored value and expire themselves if they do not match.

Protected variable

FColor

 

CurrentPointsColor

Protected variable

FColor

 

CurrentSegmentsColor

Protected variable

TArray< FFrame3...

 

CurvePoints

Protected variable

TSharedPtr< FSp...

 

CurveSource

Protected variable

TArray< FFrame3...

 

CurveStartPositions

We need the selected point start positions so we can move multiple points appropriately.

Protected variable

float

 

DepthBias

Protected variable

TSharedPtr< FSp...

 

EmptyCurveSource

Protected variable

FGeometrySet3

 

GeometrySet

Used for spatial queries.

Protected variable

TFunction< bool...

 

GeometrySetToleranceTest

Protected variable

FFrame3d

 

GizmoStartPosition

The starting point of the gizmo is needed to determine the offset by which to move the points.

Public variable UProperty

UMouseHoverBeha...

 

HoverBehavior

Protected variable

FColor

 

HoverColor

Protected variable

int32

 

HoveredPointID

Protected variable

FColor

 

NormalCurveColor

Variables for drawing.

Public variable

OnPointsChanged...

 

OnPointsChanged

Protected variable

float

 

PointsSize

Protected variable UProperty

UTransformGizmo...

 

PointTransformGizmo

Protected variable UProperty

UTransformProxy...

 

PointTransformProxy

Support for gizmo.

Protected variable

FColor

 

PreviewColor

Protected variable UProperty

APreviewGeometr...

 

PreviewGeometryActor

Used for displaying points/segments

Protected variable UProperty

UPointSetCompon...

 

RenderPoints

Protected variable UProperty

ULineSetCompone...

 

RenderSegments

Protected variable

float

 

SegmentsThickness

Protected variable

FColor

 

SelectedColor

Protected variable

TArray< int32 >

 

SelectedPointIDs

Support for selection.

Protected variable

int32

 

ShiftModifierId

Public variable UProperty

USpaceCurveDefo...

 

TransformProperties

Destructors

Name Description

Public function Virtual

~USpaceCurveDeformationMechanic()

Some other standard functions.

Functions

Name Description

Protected function

void

 

ChangeSelection

(
    int32 NewPointID,
    bool AddToSelection
)

These issue undo/redo change objects, and must therefore not be called in undo/redo code.

Public function

void

 

ClearCurveSource()

Protected function

void

 

ClearHover()

Public function

void

 

ClearSelection()

Protected function

bool

 

DeselectPoint

(
    int32 PointID
)

Public function

void

 

GetCurrentCurvePoints

(
    TArray< FFrame3d >& PointsOut
)

Protected function

void

 

GizmoTransformChanged

(
    UTransformProxy* Proxy,
    FTransform Transform
)

Callbacks we'll receive from the gizmo proxy.

Protected function

void

 

GizmoTransformEnded

(
    UTransformProxy* Proxy
)

Protected function

void

 

GizmoTransformStarted

(
    UTransformProxy* Proxy
)

Protected function

bool

 

HitTest

(
    const FInputDeviceRay& ClickPos,
    FInputRayHit& ResultOut
)

All of the following do not issue undo/redo change objects.

Public function

void

 

SelectionClear()

Public function

void

 

SelectionFill()

Public function

void

 

SelectionGrowToEnd()

Public function

void

 

SelectionGrowToNext()

Public function

void

 

SelectionGrowToPrev()

Public function

void

 

SelectionGrowToStart()

Protected function

void

 

SelectPoint

(
    int32 PointID
)

Public function

void

 

SetCurveSource

(
    TSharedPtr< FSpaceCurveSource > Cur...
)

Public function

void

 

SetWorld

(
    UWorld* World
)

Protected function

void

 

UpdateCurve

(
    const TArray< FFrame3d >& NewPosit...
)

Protected function

void

 

UpdateGizmoLocation()

Protected function

void

 

UpdateRenderGeometry()

Protected function

void

 

UpdateSelection

(
    const TArray< int32 >& NewSelectio...
)

Protected function

void

 

UpdateSpatial()

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

Overridden from IClickBehaviorTarget

Name Description

Public function Virtual

FInputRayHit

 

IsHitByClick

(
    const FInputDeviceRay& ClickPos
)

IClickBehaviorTarget implementation.

Public function Virtual

void

 

OnClicked

(
    const FInputDeviceRay& ClickPos
)

Notify Target that click ocurred

Overridden from IModifierToggleBehaviorTarget

Name Description

Public function Virtual

void

 

OnUpdateModifierState

(
    int ModifierID,
    bool bIsOn
)

IModifierToggleBehaviorTarget implementation, inherited through IClickBehaviorTarget.

Overridden from IHoverBehaviorTarget

Name Description

Public function Virtual

FInputRayHit

 

BeginHoverSequenceHitTest

(
    const FInputDeviceRay& PressPos
)

IHoverBehaviorTarget implementation.

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

Typedefs

Name

Description

OnPointsChangedEvent

This delegate is called every time the control point sequence is altered.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss