Navigation
API > API/Plugins > API/Plugins/ModelingComponents > API/Plugins/ModelingComponents/Mechanics
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UInteractionMechanic
- ULatticeControlPointsMechanic
References
| Module | ModelingComponents |
| Header | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Mechanics/LatticeControlPointsMechanic.h |
| Include | #include "Mechanics/LatticeControlPointsMechanic.h" |
Syntax
UCLASS&40;&41;
class ULatticeControlPointsMechanic :
public UInteractionMechanic,
public IClickBehaviorTarget,
public IHoverBehaviorTarget
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bCtrlToggle | ||
| bool | bGizmoBeingDragged | Used to make it easy to tell whether the gizmo was moved by the user or by undo/redo or some other change that we shouldn't respond to. | |
| bool | bHasChanged | ||
| bool | bIsDraggingRectangle | ||
| bool | bShiftToggle | Support for Shift and Ctrl toggle. | |
| FViewCameraState | CachedCameraState | ||
| TMap< int32, FColor > | ColorOverrides | ||
| TArray< FVector3d > | ControlPoints | ||
| int32 | CurrentChangeStamp | Used for expiring undo/redo changes, which compare this to their stored value and expire themselves if they do not match. | |
| TArray< int32 > | CurrentDragSelection | ||
| TObjectPtr< UPointSetComponent > | DrawnControlPoints | ||
| TObjectPtr< ULineSetComponent > | DrawnLatticeEdges | ||
| UE::Geometry::FGeometrySet3 | GeometrySet | Used for spatial queries. | |
| TFunction< bool(const FVector3d &, const FVector3d &)> | GeometrySetToleranceTest | Support for hovering. | |
| FVector | GizmoStartPosition | The starting point of the gizmo is needed to determine the offset by which to move the points. | |
| FQuat | GizmoStartRotation | ||
| FVector | GizmoStartScale | ||
| FColor | HoverColor | ||
| int32 | HoveredPointID | ||
| TArray< FVector2i > | LatticeEdges | ||
| FTransform3d | LocalToWorldTransform | ||
| TObjectPtr< URectangleMarqueeMechanic > | MarqueeMechanic | Support for selection. | |
| FColor | NormalPointColor | ||
| FColor | NormalSegmentColor | Variables for drawing. | |
| OnPointsChangedEvent | OnPointsChanged | ||
| OnSelectionChangedEvent | OnSelectionChanged | ||
| float | PointsSize | ||
| TObjectPtr< UCombinedTransformGizmo > | PointTransformGizmo | ||
| TObjectPtr< UTransformProxy > | PointTransformProxy | Support for gizmo. | |
| TSet< int32 > | PreDragSelection | ||
| FColor | PreHoverPointColor | Cache previous color while temporarily changing the color of a hovered-over point. | |
| TObjectPtr< APreviewGeometryActor > | PreviewGeometryActor | Used for displaying points/segments | |
| float | SegmentsThickness | ||
| FColor | SelectedColor | ||
| TSet< int32 > | SelectedPointIDs | ||
| TMap< int32, FVector3d > | SelectedPointStartPositions | We need the selected point start positions so we can move multiple points appropriately. | |
| TFunction< bool(void)> | ShouldAddToSelectionFunc | Default modifier key behavior is consistent with PolygonSelectionMechanic. | |
| FShouldHideGizmo | ShouldHideGizmo | ||
| TFunction< bool(void)> | ShouldRemoveFromSelectionFunc |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void | ClearHover () |
||
| void | ClearPointColorOverride
(
int32 Index |
||
| bool | ControlPointIsSelected
(
int32 Index |
||
| bool | DeselectPoint
(
int32 PointID |
||
| void | DrawHUD
(
FCanvas* Canvas, |
||
| const TArray< FVector3d > & | |||
| EToolContextCoordinateSystem | |||
| const TSet< int32 > & | |||
| void | GizmoTransformChanged
(
UTransformProxy* Proxy, |
Callbacks we'll receive from the gizmo proxy. | |
| void | GizmoTransformEnded
(
UTransformProxy* Proxy |
||
| void | GizmoTransformStarted
(
UTransformProxy* Proxy |
||
| bool | HitTest
(
const FInputDeviceRay& ClickPos, |
All of the following do not issue undo/redo change objects. | |
| void | Initialize
(
const TArray< FVector3d >& Points, |
||
| void | OnDragRectangleChanged
(
const FCameraRectangle& Rectangle |
||
| void | OnDragRectangleFinished
(
const FCameraRectangle& Rectangle, |
||
| void | |||
| void | |||
| void | SelectPoint
(
int32 PointID |
||
| void | SetCoordinateSystem
(
EToolContextCoordinateSystem InCoordinateSystem |
||
| void | SetPointColorOverride
(
int32 Index, |
||
| void | |||
| void | UpdateControlPointPositions
(
const TArray< FVector3d >& NewPoints |
||
| void | |||
| void | |||
| void | |||
| void | UpdatePointLocations
(
const TMap< int32, FVector3d >& NewLocations |
||
| void | UpdateSetPivotMode
(
bool bInSetPivotMode |
Overridden from UInteractionMechanic
| Type | Name | Description | |
|---|---|---|---|
| void | Render
(
IToolsContextRenderAPI* RenderAPI |
Allow the Mechanic to do any custom drawing (ie via PDI/RHI) | |
| void | Setup
(
UInteractiveTool* ParentTool |
UInteractionMechanic. | |
| void | Shutdown () |
Called to clean up the InteractionMechanic |
Overridden from IClickBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| FInputRayHit | IsHitByClick
(
const FInputDeviceRay& ClickPos |
IClickBehaviorTarget implementation. | |
| void | OnClicked
(
const FInputDeviceRay& ClickPos |
Notify Target that click ocurred |
Overridden from IModifierToggleBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| void | OnUpdateModifierState
(
int ModifierID, |
Notify target of current modifier state |
Overridden from IHoverBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| FInputRayHit | BeginHoverSequenceHitTest
(
const FInputDeviceRay& PressPos |
IHoverBehaviorTarget implementation. | |
| void | OnBeginHover
(
const FInputDeviceRay& DevicePos |
Initialize hover sequence at given position | |
| void | OnEndHover () |
Terminate active hover sequence | |
| bool | OnUpdateHover
(
const FInputDeviceRay& DevicePos |
Update active hover sequence with new input position |
Typedefs
| Name | Description |
|---|---|
| FShouldHideGizmo | |
| FVector2i | |
| OnPointsChangedEvent | This delegate is called every time the control points are moved. |
| OnSelectionChangedEvent | This delegate is called every time the control point selection changes. |
Constants
| Name | Description |
|---|---|
| CtrlModifierID | |
| ShiftModifierID |