GenerateEventContext.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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 <AzCore/std/string/string.h>
  11. #include <SceneAPI/SceneCore/Events/CallProcessorBus.h>
  12. #include <SceneAPI/SceneCore/SceneCoreConfiguration.h>
  13. namespace AZ::SceneAPI::Containers { class Scene; }
  14. namespace AZ::SceneAPI::DataTypes { class IGroup; }
  15. namespace AZ::SceneAPI::Events
  16. {
  17. class ExportProductList;
  18. class GenerateEventBaseContext
  19. : public ICallContext
  20. {
  21. public:
  22. AZ_RTTI(GenerateEventBaseContext, "{1717EB67-33A1-4516-8167-746093F7AEB6}", ICallContext)
  23. SCENE_CORE_API GenerateEventBaseContext(Containers::Scene& scene, const char* platformIdentifier);
  24. SCENE_CORE_API Containers::Scene& GetScene() const;
  25. SCENE_CORE_API const char* GetPlatformIdentifier() const;
  26. private:
  27. Containers::Scene& m_scene;
  28. /**
  29. * The platform identifier is configured in the AssetProcessorPlatformConfig.ini and is data driven
  30. * it is generally a value like "pc" or "ios" or such.
  31. * this const char* points at memory owned by the caller but it will always survive for the duration of the call.
  32. */
  33. const char* m_platformIdentifier = nullptr;
  34. };
  35. // Signals the scene generation step is about to happen
  36. class PreGenerateEventContext
  37. : public GenerateEventBaseContext
  38. {
  39. public:
  40. AZ_RTTI(PreGenerateEventContext, "{0D1AB113-D35E-4C35-9820-E7B22F37D90C}", GenerateEventBaseContext)
  41. using GenerateEventBaseContext::GenerateEventBaseContext;
  42. };
  43. // Signals that new data such as procedurally generated objects should be added to the Scene
  44. class GenerateEventContext
  45. : public GenerateEventBaseContext
  46. {
  47. public:
  48. AZ_RTTI(GenerateEventContext, "{B53CCBBF-965A-4709-AD33-AFD5F3AE8580}", GenerateEventBaseContext)
  49. using GenerateEventBaseContext::GenerateEventBaseContext;
  50. };
  51. // Signals that new LODs should be added to the Scene
  52. class GenerateLODEventContext
  53. : public GenerateEventBaseContext
  54. {
  55. public:
  56. AZ_RTTI(GenerateLODEventContext, "{2E3A6B98-1409-4895-8092-B7F8A410EF0D}", GenerateEventBaseContext)
  57. using GenerateEventBaseContext::GenerateEventBaseContext;
  58. };
  59. // Signals that any new data, such as tangents and bitangents, should be added to the Scene
  60. class GenerateAdditionEventContext
  61. : public GenerateEventBaseContext
  62. {
  63. public:
  64. AZ_RTTI(GenerateAdditionEventContext, "{105106FE-9ED7-48E6-9EA8-C7268BE8C625}", GenerateEventBaseContext)
  65. using GenerateEventBaseContext::GenerateEventBaseContext;
  66. };
  67. // Signals that data simplification / complexity reduction should be run
  68. class GenerateSimplificationEventContext
  69. : public GenerateEventBaseContext
  70. {
  71. public:
  72. AZ_RTTI(GenerateSimplificationEventContext, "{77F44B7F-C5BC-4411-B53F-E4307691841B}", GenerateEventBaseContext)
  73. using GenerateEventBaseContext::GenerateEventBaseContext;
  74. };
  75. // Signals that the generation step is complete
  76. class PostGenerateEventContext
  77. : public GenerateEventBaseContext
  78. {
  79. public:
  80. AZ_RTTI(PostGenerateEventContext, "{3EE65CBF-6C0E-425A-9ECC-3CC8FC4372F7}", GenerateEventBaseContext)
  81. using GenerateEventBaseContext::GenerateEventBaseContext;
  82. };
  83. } // namespace AZ::SceneAPI::Events