TerrainSystemComponent.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 <Atom/RPI.Public/Pass/PassSystemInterface.h>
  11. namespace Terrain
  12. {
  13. class TerrainSystem;
  14. class TerrainSystemComponent
  15. : public AZ::Component
  16. {
  17. public:
  18. AZ_COMPONENT(TerrainSystemComponent, "{CD5A517E-3BD8-49AE-8F9B-33C6FC47EC67}");
  19. static void Reflect(AZ::ReflectContext* context);
  20. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  21. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  22. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  23. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  24. protected:
  25. ////////////////////////////////////////////////////////////////////////
  26. // AZ::Component interface implementation
  27. void Init() override;
  28. void Activate() override;
  29. void Deactivate() override;
  30. ////////////////////////////////////////////////////////////////////////
  31. TerrainSystem* m_terrainSystem{ nullptr };
  32. private:
  33. //! Used for loading the pass templates of the terrain gem.
  34. AZ::RPI::PassSystemInterface::OnReadyLoadTemplatesEvent::Handler m_loadTemplatesHandler;
  35. void LoadPassTemplateMappings();
  36. };
  37. }