ViewportSnap.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include "ViewportInteraction.h"
  10. class ViewportSnap
  11. {
  12. public:
  13. static void Rotate(HierarchyWidget* hierarchy,
  14. const AZ::EntityId& canvasId,
  15. AZ::Entity* element,
  16. float signedAngle);
  17. static void ResizeByGizmo(HierarchyWidget* hierarchy,
  18. const AZ::EntityId& canvasId,
  19. const ViewportHelpers::GizmoParts& grabbedGizmoParts,
  20. AZ::Entity* element,
  21. const AZ::Vector2& pivot,
  22. const AZ::Vector2& translation);
  23. static void ResizeDirectlyWithScaleOrRotation(HierarchyWidget* hierarchy,
  24. const AZ::EntityId& canvasId,
  25. const ViewportHelpers::ElementEdges& grabbedEdges,
  26. AZ::Entity* element,
  27. const UiTransformInterface::RectPoints& translation);
  28. static void ResizeDirectlyNoScaleNoRotation(HierarchyWidget* hierarchy,
  29. const AZ::EntityId& canvasId,
  30. const ViewportHelpers::ElementEdges& grabbedEdges,
  31. AZ::Entity* element,
  32. const AZ::Vector2& translation);
  33. private:
  34. };