3
0

BloomComponentController.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 <AzCore/Component/Component.h>
  10. #include <AzCore/Component/TransformBus.h>
  11. #include <AtomLyIntegration/CommonFeatures/PostProcess/Bloom/BloomBus.h>
  12. #include <AtomLyIntegration/CommonFeatures/PostProcess/Bloom/BloomComponentConfig.h>
  13. #include <Atom/Feature/PostProcess/Bloom/BloomConstants.h>
  14. #include <Atom/Feature/PostProcess/Bloom/BloomSettingsInterface.h>
  15. #include <Atom/Feature/PostProcess/PostProcessSettingsInterface.h>
  16. #include <Atom/Feature/PostProcess/PostProcessFeatureProcessorInterface.h>
  17. namespace AZ
  18. {
  19. namespace Render
  20. {
  21. class BloomComponentController final
  22. : public BloomRequestBus::Handler
  23. {
  24. public:
  25. friend class EditorBloomComponent;
  26. AZ_TYPE_INFO(AZ::Render::BloomComponentController, "{502896C1-FF04-4BA7-833B-BA80946FA0DD}");
  27. static void Reflect(AZ::ReflectContext* context);
  28. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  29. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  30. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  31. BloomComponentController() = default;
  32. BloomComponentController(const BloomComponentConfig& config);
  33. void Activate(EntityId entityId);
  34. void Deactivate();
  35. void SetConfiguration(const BloomComponentConfig& config);
  36. const BloomComponentConfig& GetConfiguration() const;
  37. // Auto-gen function override declarations (functions definitions in .cpp)...
  38. #include <Atom/Feature/ParamMacros/StartParamFunctionsOverride.inl>
  39. #include <Atom/Feature/PostProcess/Bloom/BloomParams.inl>
  40. #include <Atom/Feature/ParamMacros/EndParams.inl>
  41. private:
  42. AZ_DISABLE_COPY(BloomComponentController);
  43. void OnConfigChanged();
  44. PostProcessSettingsInterface* m_postProcessInterface = nullptr;
  45. BloomSettingsInterface* m_settingsInterface = nullptr;
  46. BloomComponentConfig m_configuration;
  47. EntityId m_entityId;
  48. };
  49. }
  50. }