EditorTerrainSurfaceGradientListComponent.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 <Components/TerrainSurfaceGradientListComponent.h>
  10. #include <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
  11. #include <LmbrCentral/Component/EditorWrappedComponentBase.h>
  12. #include <EditorSurfaceTagListProvider.h>
  13. namespace Terrain
  14. {
  15. class EditorTerrainSurfaceGradientListComponent
  16. : public LmbrCentral::EditorWrappedComponentBase<TerrainSurfaceGradientListComponent, TerrainSurfaceGradientListConfig>
  17. , public EditorSurfaceTagListProvider
  18. {
  19. public:
  20. using BaseClassType = LmbrCentral::EditorWrappedComponentBase<TerrainSurfaceGradientListComponent, TerrainSurfaceGradientListConfig>;
  21. AZ_EDITOR_COMPONENT(EditorTerrainSurfaceGradientListComponent, "{49831E91-A11F-4EFF-A824-6D85C284B934}", BaseClassType);
  22. static void Reflect(AZ::ReflectContext* context);
  23. // AZ::Component interface implementation
  24. void Activate() override;
  25. static constexpr const char* const s_categoryName = "Terrain";
  26. static constexpr const char* const s_componentName = "Terrain Surface Gradient List";
  27. static constexpr const char* const s_componentDescription = "Provides a mapping between gradients and surface tags for use by the terrain system.";
  28. static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainSurfaceGradientList.svg";
  29. static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainSurfaceGradientList.svg";
  30. static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/terrain/surface-gradient-list/";
  31. private:
  32. // EditorSurfaceTagListProvider interface implementation
  33. AZStd::unordered_set<SurfaceData::SurfaceTag> GetSurfaceTagsInUse() const override;
  34. AZ::u32 ConfigurationChanged() override;
  35. void UpdateConfigurationTagProvider();
  36. };
  37. }