FilmGrainComponentController.h 2.5 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/FilmGrain/FilmGrainConstants.h>
  10. #include <Atom/Feature/PostProcess/FilmGrain/FilmGrainSettingsInterface.h>
  11. #include <Atom/Feature/PostProcess/PostProcessFeatureProcessorInterface.h>
  12. #include <Atom/Feature/PostProcess/PostProcessSettingsInterface.h>
  13. #include <AtomLyIntegration/CommonFeatures/PostProcess/FilmGrain/FilmGrainBus.h>
  14. #include <AtomLyIntegration/CommonFeatures/PostProcess/FilmGrain/FilmGrainComponentConfig.h>
  15. #include <AzCore/Component/Component.h>
  16. #include <AzCore/Component/TransformBus.h>
  17. namespace AZ
  18. {
  19. namespace Render
  20. {
  21. class FilmGrainComponentController final : public FilmGrainRequestBus::Handler
  22. {
  23. public:
  24. friend class EditorFilmGrainComponent;
  25. AZ_TYPE_INFO(AZ::Render::FilmGrainComponentController, "{732714F9-7CEF-4874-8614-0F5F50BBC6C1}");
  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. FilmGrainComponentController() = default;
  31. FilmGrainComponentController(const FilmGrainComponentConfig& config);
  32. void Activate(EntityId entityId);
  33. void Deactivate();
  34. void SetConfiguration(const FilmGrainComponentConfig& config);
  35. const FilmGrainComponentConfig& GetConfiguration() const;
  36. // Auto-gen function override declarations (functions definitions in .cpp)...
  37. #include <Atom/Feature/ParamMacros/StartParamFunctionsOverride.inl>
  38. #include <Atom/Feature/PostProcess/FilmGrain/FilmGrainParams.inl>
  39. #include <Atom/Feature/ParamMacros/EndParams.inl>
  40. private:
  41. AZ_DISABLE_COPY(FilmGrainComponentController);
  42. void OnConfigChanged();
  43. PostProcessSettingsInterface* m_postProcessInterface = nullptr;
  44. FilmGrainSettingsInterface* m_settingsInterface = nullptr;
  45. FilmGrainComponentConfig m_configuration;
  46. EntityId m_entityId;
  47. };
  48. } // namespace Render
  49. } // namespace AZ