Navigation
API > API/Plugins > API/Plugins/ModelingComponents > API/Plugins/ModelingComponents/Mechanics
Inheritance Hierarchy
- FDragAlignmentBase
- UDragAlignmentInteraction
- UDragAlignmentMechanic
References
| Module | ModelingComponents |
| Header | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Mechanics/DragAlignmentMechanic.h |
| Include | #include "Mechanics/DragAlignmentMechanic.h" |
Syntax
class FDragAlignmentBase
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bPreviewEndpointsValid | We keep track of the last position we gave the user and the last position that they moved their gizmo. | |
| bool | bWaitingOnProjectedResult | ||
| FViewCameraState | CachedCameraState | Used for snapping to verts. | |
| FHitResult | LastHitResult | ||
| FVector3d | LastProjectedResult | ||
| TUniqueFunction< bool(const FRay &, FHitResult &, bool bUseFilter)> | MeshRayCast | ||
| TUniqueFunction< bool(int32 Tid)> | MeshRayCastTriangleFilter | ||
| float | VisualAngleSnapThreshold | ||
| TUniqueFunction< bool(const FRay &InputRay, FHitResult &OutputHit, const TArray< const UPrimitiveCom... | WorldRayCast | These are modifiable in case we someday want to make it easier to customize them further. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddToGizmo
(
UCombinedTransformGizmo* TransformGizmo, |
Adds this mechanic to the given gizmo. | |
| void | AddToGizmo
(
UIntervalGizmo* IntervalGizmo, |
Like the other AddToGizmo, but acts on interval gizmos. | |
| bool | CastRay
(
const FRay& WorldRay, |
Casts a ray into the scene to find an alignment point. Used in the functions bound to gizmos. | |
| bool | |||
| FViewCameraState | |||
| USceneSnappingManager * | Subclasses must implement these various API functions for the interaction to function | ||
| UObject * | |||
| void | InitializeDeformedMeshRayCast
(
TFunction< UE::Geometry::FDynamicMeshAABBTree3*()> GetSpatialIn, |
Optional- allows the use of the mechanic in mesh deformation. | |
| void | OnGizmoTransformChanged
(
FTransform NewTransform |
||
| void | RenderInternal
(
IToolsContextRenderAPI* RenderAPI |
This will draw a line from the last input position to the last output position. | |
| void | Subclasses must call this to initialize the internal functions/states/etc |
Constants
| Name | Description |
|---|---|
| EDGE_HIT_TYPE_ID | |
| TRIANGLE_HIT_TYPE_ID | Used to identify the type of object we hit, so we can choose different renderings. |
| VERT_HIT_TYPE_ID |