3
0

EditorStateMaskRenderer.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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 <Draw/DrawableMeshEntity.h>
  10. #include <Pass/EditorStatePassSystem.h>
  11. #include <AzCore/std/containers/unordered_map.h>
  12. namespace AZ::Render
  13. {
  14. //! Handles the rendering of supported drawable entity components to the mask with the given draw tag.
  15. class EditorStateMaskRenderer
  16. {
  17. public:
  18. //! Constructs the mask renderer for the specified draw tag.
  19. EditorStateMaskRenderer(const Name& name);
  20. //! Renders the specified entities to this mask.
  21. void RenderMaskEntities(Data::Instance<RPI::Material> maskMaterial, const AzToolsFramework::EntityIdSet& entityIds);
  22. private:
  23. //! The drawable components of the entities tagged for rendering to this mask.
  24. AZStd::unordered_map<EntityId, DrawableMeshEntity> m_drawableEntities;
  25. Name m_drawTag; //!< The draw tag for this mask.
  26. };
  27. } // namespace AZ::Render