2
0

OpenXRVkModule.cpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #include <AzCore/Memory/SystemAllocator.h>
  9. #include <AzCore/Module/Module.h>
  10. #include <OpenXRVk/OpenXRVkSystemComponent.h>
  11. #include <XRCameraMovementComponent.h>
  12. #include "Devices/Common/XRControllerComponent.h"
  13. #include "Devices/Common/XRControllerAnimationsComponent.h"
  14. #include <XRRayInteractorComponent.h>
  15. #include <XRInteractableComponent.h>
  16. #if defined (OPENXRVK_BUILDERS)
  17. #include "Builders/OpenXRVkAssetsBuilderSystemComponent.h"
  18. #endif
  19. namespace OpenXRVk
  20. {
  21. //! This module is in charge of loading system components related to Openxrvk.
  22. class Module
  23. : public AZ::Module
  24. {
  25. public:
  26. AZ_RTTI(Module, "{C34AA64E-0983-4D30-A33C-0D7C7676A20E}", AZ::Module);
  27. AZ_CLASS_ALLOCATOR(Module, AZ::SystemAllocator);
  28. Module()
  29. : AZ::Module()
  30. {
  31. m_descriptors.insert(m_descriptors.end(), {
  32. SystemComponent::CreateDescriptor(),
  33. XRCameraMovementComponent::CreateDescriptor(),
  34. XRControllerComponent::CreateDescriptor(),
  35. XRRayInteractorComponent::CreateDescriptor(),
  36. XRInteractableComponent::CreateDescriptor(),
  37. XRControllerAnimationsComponent::CreateDescriptor(),
  38. #if defined (OPENXRVK_BUILDERS)
  39. OpenXRVkBuilders::OpenXRAssetsBuilderSystemComponent::CreateDescriptor(),
  40. #endif
  41. });
  42. }
  43. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  44. {
  45. return
  46. {
  47. azrtti_typeid<OpenXRVk::SystemComponent>(),
  48. };
  49. }
  50. };
  51. }
  52. #if defined(O3DE_GEM_NAME)
  53. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), OpenXRVk::Module)
  54. #else
  55. AZ_DECLARE_MODULE_CLASS(Gem_OpenXRVk, OpenXRVk::Module)
  56. #endif