EditorCubeMapCaptureComponent.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 <CubeMapCapture/CubeMapCaptureComponent.h>
  10. #include <CubeMapCapture/CubeMapCaptureComponentConstants.h>
  11. #include <CubeMapCapture/EditorCubeMapRenderer.h>
  12. #include <Atom/Feature/Utils/EditorRenderComponentAdapter.h>
  13. #include <AtomLyIntegration/CommonFeatures/CubeMapCapture/EditorCubeMapCaptureBus.h>
  14. namespace AZ
  15. {
  16. namespace Render
  17. {
  18. class EditorCubeMapCaptureComponent final
  19. : public EditorRenderComponentAdapter<CubeMapCaptureComponentController, CubeMapCaptureComponent, CubeMapCaptureComponentConfig>
  20. , public EditorCubeMapCaptureBus::Handler
  21. , private EditorCubeMapRenderer
  22. {
  23. public:
  24. using BaseClass = EditorRenderComponentAdapter<CubeMapCaptureComponentController, CubeMapCaptureComponent, CubeMapCaptureComponentConfig>;
  25. AZ_EDITOR_COMPONENT(AZ::Render::EditorCubeMapCaptureComponent, EditorCubeMapCaptureComponentTypeId, BaseClass);
  26. static void Reflect(AZ::ReflectContext* context);
  27. EditorCubeMapCaptureComponent() = default;
  28. EditorCubeMapCaptureComponent(const CubeMapCaptureComponentConfig& config);
  29. // AZ::Component overrides
  30. void Activate() override;
  31. void Deactivate() override;
  32. private:
  33. // initiate the cubemap capture, returns the refresh value for the ChangeNotify UIElement attribute
  34. AZ::u32 CaptureCubeMap() override;
  35. };
  36. } // namespace Render
  37. } // namespace AZ