Navigation
API > API/Plugins > API/Plugins/ModelingComponents
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.
| Name | FQuickAxisTranslater |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Transforms/QuickAxisTranslater.h |
| Include Path | #include "Transforms/QuickAxisTranslater.h" |
Syntax
class FQuickAxisTranslater : public UE::Geometry::FQuickTransformer
Inheritance Hierarchy
- FQuickTransformer → FQuickAxisTranslater
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FQuickAxisTranslater() |
Transforms/QuickAxisTranslater.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool HaveActiveSnap() |
Transforms/QuickAxisTranslater.h | ||
virtual void SetActiveFrameFromWorldNormal
(
const FVector3d& Origin, |
Set current snap-axis frame to a frame at the given Origin with Z aligned to the given Normal. | Transforms/QuickAxisTranslater.h | |
virtual bool UpdateSnap
(
const FRay3d& Ray, |
Try to find the best snap point for the given Ray, and store in SnapPointOut if found | Transforms/QuickAxisTranslater.h |
Overridden from FQuickTransformer
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Initialize() |
Set up internal data structures | Transforms/QuickAxisTranslater.h | |
virtual void PreviewRender
(
IToolsContextRenderAPI* RenderAPI |
Draw a visualization of the current snap axes and active snap point | Transforms/QuickAxisTranslater.h | |
virtual void Render
(
IToolsContextRenderAPI* RenderAPI |
Draw a visualization of the current snap axes and active snap point | Transforms/QuickAxisTranslater.h | |
virtual void Reset() |
Reset transformer state | Transforms/QuickAxisTranslater.h | |
virtual void SetActiveFrameFromWorldAxes
(
const FVector3d& Origin |
Set current snap-axis frame to the unit axes at the given Origin | Transforms/QuickAxisTranslater.h | |
virtual void SetActiveWorldFrame
(
const FFrame3d& Frame |
Set current snap-axis frame to the given frame | Transforms/QuickAxisTranslater.h | |
virtual void UpdateActiveFrameOrigin
(
const FVector3d& NewOrigin |
Update the current snap-axis frame with a new origin | Transforms/QuickAxisTranslater.h | |
virtual void UpdateCameraState
(
const FViewCameraState& CameraState |
Update internal copy of camera state. You must call this for snapping to work! | Transforms/QuickAxisTranslater.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void UpdateSnapAxes() |
Transforms/QuickAxisTranslater.h |