Navigation
API > API/Plugins > API/Plugins/ModelingComponents
FDragAlignmentBase is a base class for shared functionality of UDragAlignmentMechanic and UDragAlignmentInteraction. This interaction can be attached to (potentially multiple) UCombinedTransformGizmo object to allow them to snap to scene geometry in rotation and translation when a modifier key is pressed.
| Name | FDragAlignmentBase |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Mechanics/DragAlignmentMechanic.h |
| Include Path | #include "Mechanics/DragAlignmentMechanic.h" |
Syntax
class FDragAlignmentBase
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FDragAlignmentBase() |
Mechanics/DragAlignmentMechanic.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| EDGE_HIT_TYPE_ID | const int32 | Mechanics/DragAlignmentMechanic.h | |
| TRIANGLE_HIT_TYPE_ID | const int32 | Used to identify the type of object we hit, so we can choose different renderings. | Mechanics/DragAlignmentMechanic.h |
| VERT_HIT_TYPE_ID | const int32 | Mechanics/DragAlignmentMechanic.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddToGizmo
(
UCombinedTransformGizmo* TransformGizmo, |
Adds this mechanic to the given gizmo. | Mechanics/DragAlignmentMechanic.h | |
void AddToGizmo
(
UIntervalGizmo* IntervalGizmo, |
Like the other AddToGizmo, but acts on interval gizmos. | Mechanics/DragAlignmentMechanic.h | |
bool GetAlignmentModeEnabled() |
Mechanics/DragAlignmentMechanic.h | ||
FViewCameraState GetCameraState() |
Mechanics/DragAlignmentMechanic.h | ||
USceneSnappingManager * GetSnappingManager() |
Subclasses must implement these various API functions for the interaction to function | Mechanics/DragAlignmentMechanic.h | |
UObject * GetUObjectContainer() |
Mechanics/DragAlignmentMechanic.h | ||
void InitializeDeformedMeshRayCast
(
TFunction< UE::Geometry::FDynamicMeshAABBTree3*()> GetSpatialIn, |
Optional- allows the use of the mechanic in mesh deformation. | Mechanics/DragAlignmentMechanic.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CastRay
(
const FRay& WorldRay, |
Casts a ray into the scene to find an alignment point. Used in the functions bound to gizmos. | Mechanics/DragAlignmentMechanic.h | |
void OnGizmoTransformChanged
(
FTransform NewTransform |
Mechanics/DragAlignmentMechanic.h | ||
virtual void RenderInternal
(
IToolsContextRenderAPI* RenderAPI |
This will draw a line from the last input position to the last output position. | Mechanics/DragAlignmentMechanic.h | |
virtual void SetupInternal() |
Subclasses must call this to initialize the internal functions/states/etc | Mechanics/DragAlignmentMechanic.h |