FocusedEntityState.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 <Pass/State/EditorStateBase.h>
  10. #include <AzToolsFramework/API/ViewportEditorModeTrackerNotificationBus.h>
  11. namespace AZ::Render
  12. {
  13. //! Class for the Focused Entity editor state effect.
  14. class FocusedEntityState
  15. : public EditorStateBase
  16. , private AzToolsFramework::ViewportEditorModeNotificationsBus::Handler
  17. {
  18. public:
  19. FocusedEntityState();
  20. ~FocusedEntityState();
  21. // ViewportEditorModeNotificationsBus overrides ...
  22. void OnEditorModeActivated(
  23. const AzToolsFramework::ViewportEditorModesInterface& editorModeState, AzToolsFramework::ViewportEditorMode mode) override;
  24. void OnEditorModeDeactivated(
  25. const AzToolsFramework::ViewportEditorModesInterface& editorModeState, AzToolsFramework::ViewportEditorMode mode) override;
  26. // EditorStateBase overrides ...
  27. bool IsEnabled() const override;
  28. AzToolsFramework::EntityIdList GetMaskedEntities() const override;
  29. private:
  30. bool m_inFocusMode = false; //!< True if Focus Mode is active, otherwise false.
  31. };
  32. } // namespace AZ::Render