ChromaticAberrationComponentController.h 2.7 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 <Atom/Feature/PostProcess/ChromaticAberration/ChromaticAberrationConstants.h>
  10. #include <Atom/Feature/PostProcess/ChromaticAberration/ChromaticAberrationSettingsInterface.h>
  11. #include <Atom/Feature/PostProcess/PostProcessFeatureProcessorInterface.h>
  12. #include <Atom/Feature/PostProcess/PostProcessSettingsInterface.h>
  13. #include <AtomLyIntegration/CommonFeatures/PostProcess/ChromaticAberration/ChromaticAberrationBus.h>
  14. #include <AtomLyIntegration/CommonFeatures/PostProcess/ChromaticAberration/ChromaticAberrationComponentConfig.h>
  15. #include <AzCore/Component/Component.h>
  16. #include <AzCore/Component/TransformBus.h>
  17. namespace AZ
  18. {
  19. namespace Render
  20. {
  21. class ChromaticAberrationComponentController final : public ChromaticAberrationRequestBus::Handler
  22. {
  23. public:
  24. friend class EditorChromaticAberrationComponent;
  25. AZ_TYPE_INFO(AZ::Render::ChromaticAberrationComponentController, "{776770B4-03BA-491D-BE5B-CBF3948BF078}");
  26. static void Reflect(AZ::ReflectContext* context);
  27. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  28. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  29. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  30. ChromaticAberrationComponentController() = default;
  31. ChromaticAberrationComponentController(const ChromaticAberrationComponentConfig& config);
  32. void Activate(EntityId entityId);
  33. void Deactivate();
  34. void SetConfiguration(const ChromaticAberrationComponentConfig& config);
  35. const ChromaticAberrationComponentConfig& GetConfiguration() const;
  36. // Auto-gen function override declarations (functions definitions in .cpp)...
  37. #include <Atom/Feature/ParamMacros/StartParamFunctionsOverride.inl>
  38. #include <Atom/Feature/PostProcess/ChromaticAberration/ChromaticAberrationParams.inl>
  39. #include <Atom/Feature/ParamMacros/EndParams.inl>
  40. private:
  41. AZ_DISABLE_COPY(ChromaticAberrationComponentController);
  42. void OnConfigChanged();
  43. PostProcessSettingsInterface* m_postProcessInterface = nullptr;
  44. ChromaticAberrationSettingsInterface* m_settingsInterface = nullptr;
  45. ChromaticAberrationComponentConfig m_configuration;
  46. EntityId m_entityId;
  47. };
  48. } // namespace Render
  49. } // namespace AZ