VignetteComponentController.h 2.4 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/Vignette/VignetteConstants.h>
  10. #include <Atom/Feature/PostProcess/Vignette/VignetteSettingsInterface.h>
  11. #include <Atom/Feature/PostProcess/PostProcessFeatureProcessorInterface.h>
  12. #include <Atom/Feature/PostProcess/PostProcessSettingsInterface.h>
  13. #include <AtomLyIntegration/CommonFeatures/PostProcess/Vignette/VignetteBus.h>
  14. #include <AtomLyIntegration/CommonFeatures/PostProcess/Vignette/VignetteComponentConfig.h>
  15. #include <AzCore/Component/Component.h>
  16. #include <AzCore/Component/TransformBus.h>
  17. namespace AZ
  18. {
  19. namespace Render
  20. {
  21. class VignetteComponentController final : public VignetteRequestBus::Handler
  22. {
  23. public:
  24. friend class EditorVignetteComponent;
  25. AZ_TYPE_INFO(AZ::Render::VignetteComponentController, "{98B2F7E6-A8E3-443B-B301-E180FFE710F5}");
  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. VignetteComponentController() = default;
  31. VignetteComponentController(const VignetteComponentConfig& config);
  32. void Activate(EntityId entityId);
  33. void Deactivate();
  34. void SetConfiguration(const VignetteComponentConfig& config);
  35. const VignetteComponentConfig& GetConfiguration() const;
  36. // Auto-gen function override declarations (functions definitions in .cpp)...
  37. #include <Atom/Feature/ParamMacros/StartParamFunctionsOverride.inl>
  38. #include <Atom/Feature/PostProcess/Vignette/VignetteParams.inl>
  39. #include <Atom/Feature/ParamMacros/EndParams.inl>
  40. private:
  41. AZ_DISABLE_COPY(VignetteComponentController);
  42. void OnConfigChanged();
  43. PostProcessSettingsInterface* m_postProcessInterface = nullptr;
  44. VignetteSettingsInterface* m_settingsInterface = nullptr;
  45. VignetteComponentConfig m_configuration;
  46. EntityId m_entityId;
  47. };
  48. } // namespace Render
  49. } // namespace AZ