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