Open 3D Engine LyShine Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
Class used while a move interaction is in progress in move or anchor mode. More...
#include <ViewportMoveInteraction.h>
Inherits ViewportDragInteraction.
Public Member Functions | |
ViewportMoveInteraction (HierarchyWidget *hierarchy, const QTreeWidgetItemRawPtrQList &selectedItems, AZ::EntityId canvasId, AZ::Entity *activeElement, ViewportInteraction::CoordinateSystem coordinateSystem, ViewportHelpers::GizmoParts grabbedGizmoParts, ViewportInteraction::InteractionMode interactionMode, ViewportInteraction::InteractionType interactionType, const AZ::Vector2 &startDragMousePos) | |
void | Update (const AZ::Vector2 &mousePos) override |
Update the interaction each time the mouse moves. | |
Public Member Functions inherited from ViewportDragInteraction | |
ViewportDragInteraction (const AZ::Vector2 &startMousePos) | |
virtual void | Render (Draw2dHelper &draw2d) |
Render any display desired during the interaction. | |
virtual void | EndInteraction (EndState endState) |
End the interaction. | |
Protected Member Functions | |
bool | ConstrainMovementDirection (const AZ::Vector2 &mouseDelta, AZ::Vector2 &canvasSpaceMouseDelta, AZ::Vector2 &localMouseDelta) |
void | SnapMouseDeltas (AZ::Vector2 &canvasSpaceMouseDelta, AZ::Vector2 &localMouseDelta) |
void | MovePrimaryElement (bool restrictDirection, AZ::Vector2 &canvasSpaceMouseDelta, AZ::Vector2 &localMouseDelta) |
Move the primary element by the given delta. This can actually change the mouse deltas due to constraints. | |
void | MoveSecondaryElement (AZ::Entity *element, bool restrictDirection, const AZ::Vector2 &canvasSpaceMouseDelta) |
Move one of the additional selected elements. | |
AZ::Vector2 | GetPivotRelativeToTopLeftAnchor (AZ::EntityId entityId) |
Get the offset of the pivot from the top-left anchor in local space pixels. | |
Protected Attributes | |
AZ::Entity * | m_primaryElement = nullptr |
AZ::Entity * | m_primaryElementParent = nullptr |
LyShine::EntityArray | m_secondarySelectedElements |
AZ::Vector2 | m_startingPrimaryLocalPivot |
AZ::Vector2 | m_startingPrimaryCanvasSpacePivot |
bool | m_isSnapping = false |
AZ::EntityId | m_canvasId |
ViewportInteraction::CoordinateSystem | m_coordinateSystem |
ViewportHelpers::GizmoParts | m_grabbedGizmoParts |
ViewportInteraction::InteractionMode | m_interactionMode |
ViewportInteraction::InteractionType | m_interactionType |
AZStd::map< AZ::EntityId, UiTransform2dInterface::Offsets > | m_startingOffsets |
AZStd::map< AZ::EntityId, UiTransform2dInterface::Anchors > | m_startingAnchors |
Protected Attributes inherited from ViewportDragInteraction | |
AZ::Vector2 | m_startMousePos |
Additional Inherited Members | |
Public Types inherited from ViewportDragInteraction | |
enum class | EndState { Inside , OutsideX , OutsideY , OutsideXY , Canceled } |
Class used while a move interaction is in progress in move or anchor mode.