3
0

SsaoComponentController.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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/Ssao/SsaoBus.h>
  12. #include <AtomLyIntegration/CommonFeatures/PostProcess/Ssao/SsaoComponentConfiguration.h>
  13. #include <Atom/Feature/PostProcess/Ssao/SsaoSettingsInterface.h>
  14. #include <Atom/Feature/PostProcess/PostProcessSettingsInterface.h>
  15. #include <Atom/Feature/PostProcess/PostProcessFeatureProcessorInterface.h>
  16. namespace AZ
  17. {
  18. namespace Render
  19. {
  20. class SsaoComponentController final
  21. : public SsaoRequestBus::Handler
  22. {
  23. public:
  24. friend class EditorSsaoComponent;
  25. AZ_TYPE_INFO(AZ::Render::SsaoComponentController, "{B53B6F29-C803-46AD-83E1-526457BDFBAE}");
  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. SsaoComponentController() = default;
  31. SsaoComponentController(const SsaoComponentConfig& config);
  32. void Activate(EntityId entityId);
  33. void Deactivate();
  34. void SetConfiguration(const SsaoComponentConfig& config);
  35. const SsaoComponentConfig& GetConfiguration() const;
  36. // Auto-gen function override declarations (functions definitions in .cpp)...
  37. #include <Atom/Feature/ParamMacros/StartParamFunctionsOverride.inl>
  38. #include <Atom/Feature/PostProcess/Ssao/SsaoParams.inl>
  39. #include <Atom/Feature/ParamMacros/EndParams.inl>
  40. private:
  41. AZ_DISABLE_COPY(SsaoComponentController);
  42. void OnConfigChanged();
  43. PostProcessSettingsInterface* m_postProcessInterface = nullptr;
  44. SsaoSettingsInterface* m_ssaoSettingsInterface = nullptr;
  45. SsaoComponentConfig m_configuration;
  46. EntityId m_entityId;
  47. };
  48. }
  49. }