UVsGenerateComponent.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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/RTTI/RTTI.h>
  10. #include <SceneAPI/SceneCore/Events/CallProcessorBus.h>
  11. #include <SceneAPI/SceneCore/Containers/Scene.h>
  12. namespace AZ
  13. {
  14. namespace SceneAPI::DataTypes
  15. {
  16. class IMeshData;
  17. class IMeshVertexUVData;
  18. }
  19. namespace SceneData::GraphData
  20. {
  21. class MeshVertexUVData;
  22. }
  23. class ComponentDescriptor;
  24. } // namespace AZ
  25. namespace AZ::SceneGenerationComponents
  26. {
  27. struct UVsGenerateContext
  28. : public AZ::SceneAPI::Events::ICallContext
  29. {
  30. AZ_RTTI(UVsGenerateContext, "{CC7301AB-A7EC-41FB-8BEE-DCC8C8C32BF4}", AZ::SceneAPI::Events::ICallContext)
  31. UVsGenerateContext(AZ::SceneAPI::Containers::Scene& scene)
  32. : m_scene(scene) {}
  33. UVsGenerateContext& operator=(const UVsGenerateContext& other) = delete;
  34. AZ::SceneAPI::Containers::Scene& GetScene() { return m_scene; }
  35. const AZ::SceneAPI::Containers::Scene& GetScene() const { return m_scene; }
  36. private:
  37. AZ::SceneAPI::Containers::Scene& m_scene;
  38. };
  39. inline constexpr const char* s_UVsGenerateComponentTypeId = "{49121BDD-C7E5-4D39-89BC-28789C90057F}";
  40. //! This function will be called by the module class to get the descriptor. Doing it this way saves
  41. //! it from having to actually see the entire component declaration here, it can all be in the implementation file.
  42. AZ::ComponentDescriptor* CreateUVsGenerateComponentDescriptor();
  43. } // namespace AZ::SceneGenerationComponents