3
0

DeferredFogComponentController.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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/Math/Vector2.h>
  10. #include <AzCore/Math/Vector3.h>
  11. #include <AzCore/Component/Component.h>
  12. #include <AzCore/Component/TransformBus.h>
  13. #include <AtomLyIntegration/CommonFeatures/ScreenSpace/DeferredFogBus.h>
  14. #include <AtomLyIntegration/CommonFeatures/ScreenSpace/DeferredFogComponentConfig.h>
  15. #include <Atom/Feature/ScreenSpace/DeferredFogSettingsInterface.h>
  16. #include <Atom/Feature/PostProcess/PostProcessFeatureProcessorInterface.h>
  17. #include <Atom/Feature/PostProcess/PostProcessSettingsInterface.h>
  18. namespace AZ
  19. {
  20. namespace Render
  21. {
  22. class DeferredFogComponentController final
  23. : public DeferredFogRequestsBus::Handler
  24. {
  25. public:
  26. friend class EditorDeferredFogComponent;
  27. AZ_TYPE_INFO(AZ::Render::DeferredFogComponentController, "{60B71D4C-1655-4C3A-BF14-CF6639B018CA}");
  28. static void Reflect(AZ::ReflectContext* context);
  29. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  30. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  31. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  32. DeferredFogComponentController() = default;
  33. DeferredFogComponentController(const DeferredFogComponentConfig& config);
  34. void Activate(EntityId entityId);
  35. void Deactivate();
  36. void SetConfiguration(const DeferredFogComponentConfig& config);
  37. const DeferredFogComponentConfig& GetConfiguration() const;
  38. // Getter / Setter methods override declarations
  39. // Generate Get / Set methods
  40. #define AZ_GFX_COMMON_PARAM(ValueType, Name, MemberName, DefaultValue) \
  41. ValueType Get##Name() const override; \
  42. void Set##Name(ValueType val) override; \
  43. #include <Atom/Feature/ParamMacros/MapParamCommon.inl>
  44. #include <Atom/Feature/ScreenSpace/DeferredFogParams.inl>
  45. #include <Atom/Feature/ParamMacros/EndParams.inl>
  46. private:
  47. AZ_DISABLE_COPY(DeferredFogComponentController);
  48. void OnConfigChanged();
  49. PostProcessSettingsInterface* m_postProcessInterface = nullptr;
  50. DeferredFogSettingsInterface* m_settingsInterface = nullptr; // interface into the single setting structure
  51. DeferredFogComponentConfig m_configuration; // configuration / settings per entity component - several can co-exist
  52. EntityId m_entityId;
  53. };
  54. }
  55. }