* beginning updates to surface manipulator intersect
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* initial changes to support surface manipulator being able to ignore custom entity ids
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates to use type aliases
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add test for self-intersection test for SurfaceManipulator when holding Ctrl
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix incorrect icon rendering
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add redundant parens
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add tests for icon display fixes
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update references to EditorVisibleEntityDataCache to EditorVisibleEntityDataCacheInterface
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates following review feedback and remaining updates for EditorVisibleEntityDataCacheInterface
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* wip fixes for entity viewport icons displaying in the correct order and handling selection correctly
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add additional comment about z value
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* move manual sorting and some small tidy-up
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update comment
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates following initial round of PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* additional changes to support tests for entity icon intersection
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add support to enable/disable icons separately from helpers
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* final tests added and small tidy-up to display EntityId correctly
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update some manipulator test framework calls after utility functions were moved
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix for implicit cast
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* move icon scale values to AZ_CVARS
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix failing tests caught in AR and update some naming conventions for tests
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update naming convention for members of ProjectedViewportRay
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update other references to ProjectedViewportRay
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update more references to ProjectedViewportRay change
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update menus for python tests
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update intersect behavior for positioning entities in the viewport and restore SurfaceManipulator
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* tests for surface manipulator from EditorTransformComponentSelection
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update comments in tests and remove #pragma optimize('', off)@
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add new file for FindClosestPickIntersection tests
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add remaining tests for surface manipulator and snap fixes
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* some small updates and polish before PR
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* small updates following PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix for how viewport icons highlight when sticky select is disabled
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* naming - update highlight to accent
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* improvements to editor selection in the viewport
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix issue with being able to select icons that are not showing for entities inside entity containers
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update comment after review feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates to viewport picking code to simplify the api
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add test to replicate near clip intersection issue
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* small tidy-up changes
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates to how we perform world to screen and screen to world calculations, added test coverage and some tidy-up
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add some more tests for ViewportInteractionImpl
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* minor tweaks before PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix typo in fix
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix for manipulator test framework tests
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates to RPI::View and RenderPipeline after review feedback from VickyAtAZ
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add constexpr to ScreenPoint, ScreenVector and ScreenSize initializing constructors
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add PrintTo functions for Screen* types
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* downgrade error to warning temporarily
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* check incoming view is null
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* remove pragma optimize off
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* Refactor existing tests and fixtures, split them up in more granular tests, and add more comments.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Refactor test fixture for FocusMode to make it more reusable
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Fixture rename, draft of selection test
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Split SetFocus and ClearFocus tests for Editor Focus Mode
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Move BoundsTestComponent to its own file so that it can be reused in Focus Mode Selection tests
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Making progress on selection test. Test compiles now, but selection doesn't seem to be working.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Removed commented out code from previous iteration.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Move BoundsTestComponent under the UnitTest namespace
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Viewport selection tests + minor fixes.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Minor fixes
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
* Provisional impl and testing of central state tracker.
Signed-off-by: John <jonawals@amazon.com>
* Add missing namespace comment.
Signed-off-by: John <jonawals@amazon.com>
* ViewportEditorModeState -> ViewportEditorModes
Signed-off-by: John <jonawals@amazon.com>
* ViewportEditorModesTracker -> ViewportEditorModeTracker
Signed-off-by: John <jonawals@amazon.com>
* GetEditorModeState ->GetViewportEditorModes
Signed-off-by: John <jonawals@amazon.com>
* GetNumTrackedViewports -> GetTrackedViewportCount
Signed-off-by: John <jonawals@amazon.com>
* IsViewportStateBeingTracked -> IsViewportModeTracked
Signed-off-by: John <jonawals@amazon.com>
* Fix API comments.
Signed-off-by: John <jonawals@amazon.com>
* Delete hangover file.
Signed-off-by: John <jonawals@amazon.com>
* Delete more hangover files.
Signed-off-by: John <jonawals@amazon.com>
* Minor member name refactor.
Signed-off-by: John <jonawals@amazon.com>
* Refactor nonclemanture.
Signed-off-by: John <jonawals@amazon.com>
* Rename Enter/ExitMode to Register/UnregisterMode.
Signed-off-by: John <jonawals@amazon.com>
* Error and warning msgs now return AZ::Outcomes.
Signed-off-by: John <jonawals@amazon.com>
* Change all nomenclature to Activate/Deactivate for consistency.
Signed-off-by: John <jonawals@amazon.com>
* Change tense of notification bus methods.
Signed-off-by: John <jonawals@amazon.com>
* Fix malformed string format.
Signed-off-by: John <jonawals@amazon.com>
* Fix malformed string format (again).
Signed-off-by: John <jonawals@amazon.com>
* Fix Linux warning.
Signed-off-by: John <jonawals@amazon.com>
* Call sites for editor mode activate/deactivate.
Signed-off-by: John <jonawals@amazon.com>
* Move Component editor mode logic to ComponentModeCollection.
Signed-off-by: John <jonawals@amazon.com>
* Delete non-source data.
Signed-off-by: John <jonawals@amazon.com>
* Remove line breaks and forward declare class.
Signed-off-by: John <jonawals@amazon.com>
* Remove constructors without ViewportEditorModeTrackerInterface ptr.
Signed-off-by: John <jonawals@amazon.com>
* Add integration tests for viewport editor modes.
Signed-off-by: John <jonawals@amazon.com>
* Address PR comments.
Signed-off-by: John <jonawals@amazon.com>
* first pass fixes for how entity space is handled in the viewport interaction model
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* small updates to simplify space handling
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix for influence group with one entity selected
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* some tidy-up and fix for scale manipulator snapping
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* couple of small fixes for scale manipulator
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* small comment update
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fixes for integration test failures
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add test for rotation manipulator
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add test coverage for rotation manipulators
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add tests for translation manipulators and some other tidy-up changes
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add tests for translating a group of entities
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add some tests for scale manipulators
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* some updates and formatting changes (clang-format) to ViewportScreen
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* simplify usage of lround code
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* update missed name updates
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* update usage of WorldToScreenNdc
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* updates following review feedback
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* some more small tidy-up changes
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* move static variables to be marked inline
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* small formatting fixes
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* expose sticky select option to the SettingsRegistry
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* update missed callsites after API change to Manipulator Test Framework
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* updates following review feedback
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* WIP changes for viewport single select and better integration tests
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* update test to verify single click selection in the viewport
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* temporarily remove changes for single select
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* temporarily remove ChangeSelectedEntity call
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* initial tests to validate current viewport selection model
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* some tidy-up before publishing PR
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add reference to const type in loop
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* temporarily disable box select test
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add an integration test to validate pick mode crash
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* update to test after review feedback
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>
* first pass of adding grid snapping button
* update to request current grid size
* show/hide snapping option based on selection
* small tidy-up changes
* small updates following review feedback
* added some unit tests for snapping functionality and some small tidy-up/refactoring
* small refactor to ensure snap to grid ui only appears with snapping enabled
* add missing include to resolve build error
* fixes for build
* add & to make compiler happy