EditorRandomGradientComponent.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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/Module/Module.h>
  10. #include <GradientSignal/Editor/EditorGradientComponentBase.h>
  11. #include <GradientSignal/Editor/EditorGradientTypeIds.h>
  12. #include <AzToolsFramework/ToolsComponents/EditorVisibilityBus.h>
  13. #include <GradientSignal/Components/RandomGradientComponent.h>
  14. namespace GradientSignal
  15. {
  16. class EditorRandomGradientComponent
  17. : public EditorGradientComponentBase<RandomGradientComponent, RandomGradientConfig>
  18. {
  19. public:
  20. using BaseClassType = EditorGradientComponentBase<RandomGradientComponent, RandomGradientConfig>;
  21. AZ_EDITOR_COMPONENT(EditorRandomGradientComponent, EditorRandomGradientComponentTypeId, BaseClassType);
  22. static void Reflect(AZ::ReflectContext* context);
  23. static constexpr const char* const s_categoryName = "Gradients";
  24. static constexpr const char* const s_componentName = "Random Noise Gradient";
  25. static constexpr const char* const s_componentDescription = "Generates a gradient by sampling a random noise generator";
  26. static constexpr const char* const s_icon = "Editor/Icons/Components/Gradient.svg";
  27. static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/Gradient.svg";
  28. static constexpr const char* const s_helpUrl = "";
  29. private:
  30. AZ::Crc32 OnGenerateRandomSeed();
  31. };
  32. }