FQuickAxisTranslater

[FQuickAxisTranslater](API\Plugins\ModelingComponents\Transforms\FQuickAxisTranslater) implements the underpinnings for "quick" axis transformations, ie axis-gizmo-like behavior without having to explicitly click on an axis.

Windows
MacOS
Linux

Inheritance Hierarchy

FQuickTransformer

FQuickAxisTranslater

References

Module

ModelingComponents

Header

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Public/Transforms/QuickAxisTranslater.h

Include

#include "Transforms/QuickAxisTranslater.h"

Syntax

class FQuickAxisTranslater : public FQuickTransformer

Remarks

FQuickAxisTranslater implements the underpinnings for "quick" axis transformations, ie axis-gizmo-like behavior without having to explicitly click on an axis.

To use this class, you first configure the internal world-axis-frame using the SetActiveX() functions. Then as you collect input updates, you call UpdateSnap() with the input ray, and this will output a snapped 3D world-space point. The delta (Frame.Origin - SnapPoint) is the move axis.

You must also call UpdateCameraState() each time the camera changes (typically each frame in a tool Render())

A default visualization is provided via the Render() function

A small snap-ball around the frame origin prevents small movements, which are unstable with this approach.

Variables

Destructors

Name Description

Public function Virtual

~FQuickAxisTranslater()

Functions

Name Description

Public function Virtual Const

bool

 

HaveActiveSnap()

Public function Virtual

void

 

SetActiveFrameFromWorldNormal

(
    const FVector3d& Origin,
    const FVector3d& Normal,
    bool bAlignToWorldAxes
)

Set current snap-axis frame to a frame at the given Origin with Z aligned to the given Normal.

Public function Virtual

bool

 

UpdateSnap

(
    const FRay3d& Ray,
    FVector3d& SnapPointOut,
    TFunction< FVector3d...
)

Try to find the best snap point for the given Ray, and store in SnapPointOut if found

Protected function

void

 

UpdateSnapAxes()

Overridden from FQuickTransformer

Name Description

Public function Virtual

void

 

Initialize()

Set up internal data structures

Public function Virtual

void

 

PreviewRender

(
    IToolsContextRenderAPI* Render...
)

Draw a visualization of the current snap axes and active snap point

Public function Virtual

void

 

Render

(
    IToolsContextRenderAPI* Render...
)

Draw a visualization of the current snap axes and active snap point

Public function Virtual

void

 

Reset()

Reset transformer state

Public function Virtual

void

 

SetActiveFrameFromWorldAxes

(
    const FVector3d& Origin
)

Set current snap-axis frame to the unit axes at the given Origin

Public function Virtual

void

 

SetActiveWorldFrame

(
    const FFrame3d& Frame
)

Set current snap-axis frame to the given frame

Public function Virtual

void

 

UpdateActiveFrameOrigin

(
    const FVector3d& NewOrigin
)

Update the current snap-axis frame with a new origin

Public function Virtual

void

 

UpdateCameraState

(
    const FViewCameraState& CameraStat...
)

Update internal copy of camera state. You must call this for snapping to work!

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