ExposureControlComponentController.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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/ExposureControl/ExposureControlBus.h>
  12. #include <AtomLyIntegration/CommonFeatures/PostProcess/ExposureControl/ExposureControlComponentConfig.h>
  13. #include <Atom/Feature/PostProcess/ExposureControl/ExposureControlConstants.h>
  14. #include <Atom/Feature/PostProcess/ExposureControl/ExposureControlSettingsInterface.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 ExposureControlComponentController final
  22. : public ExposureControlRequestBus::Handler
  23. {
  24. public:
  25. friend class EditorExposureControlComponent;
  26. AZ_TYPE_INFO(AZ::Render::ExposureControlComponentController, "{A9D74E65-D1EE-416E-9108-B321526B049C}");
  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. ExposureControlComponentController() = default;
  32. ExposureControlComponentController(const ExposureControlComponentConfig& config);
  33. void Activate(EntityId entityId);
  34. void Deactivate();
  35. void SetConfiguration(const ExposureControlComponentConfig& config);
  36. const ExposureControlComponentConfig& GetConfiguration() const;
  37. // Auto-gen function override declarations (functions definitions in .cpp)...
  38. #include <Atom/Feature/ParamMacros/StartParamFunctionsOverride.inl>
  39. #include <Atom/Feature/PostProcess/ExposureControl/ExposureControlParams.inl>
  40. #include <Atom/Feature/ParamMacros/EndParams.inl>
  41. private:
  42. AZ_DISABLE_COPY(ExposureControlComponentController);
  43. void OnConfigChanged();
  44. PostProcessSettingsInterface* m_postProcessInterface = nullptr;
  45. ExposureControlSettingsInterface* m_settingsInterface = nullptr;
  46. ExposureControlComponentConfig m_configuration;
  47. EntityId m_entityId;
  48. };
  49. }
  50. }