EditorSkyAtmosphereComponent.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  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/Utils/EditorRenderComponentAdapter.h>
  10. #include <SkyAtmosphere/SkyAtmosphereComponent.h>
  11. namespace AZ::Render
  12. {
  13. class EditorSkyAtmosphereComponent final
  14. : public EditorRenderComponentAdapter<SkyAtmosphereComponentController, SkyAtmosphereComponent, SkyAtmosphereComponentConfig>
  15. {
  16. public:
  17. using BaseClass = EditorRenderComponentAdapter<SkyAtmosphereComponentController, SkyAtmosphereComponent, SkyAtmosphereComponentConfig>;
  18. AZ_EDITOR_COMPONENT(AZ::Render::EditorSkyAtmosphereComponent, "{9DE5B9CD-B2C8-4AB5-8D7D-21B43AAD56C3}", BaseClass);
  19. static void Reflect(AZ::ReflectContext* context);
  20. EditorSkyAtmosphereComponent() = default;
  21. EditorSkyAtmosphereComponent(const SkyAtmosphereComponentConfig& config);
  22. private:
  23. //! EditorRenderComponentAdapter
  24. //! we override OnEntityVisibilityChanged to avoid deactivating and activating unnecessarily
  25. AZ::u32 OnConfigurationChanged() override;
  26. void OnEntityVisibilityChanged(bool visibility) override;
  27. };
  28. } // namespace AZ::Render