XRControllersConfig.h 1.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 <AzCore/Memory/SystemAllocator.h>
  10. #include <AzCore/RTTI/ReflectContext.h>
  11. #include <AzCore/std/containers/vector.h>
  12. #include <AzCore/std/string/string.h>
  13. #include <OpenXRVk/OpenXRVkActionsInterface.h>
  14. namespace OpenXRVk
  15. {
  16. //! Configuration that is used by XRControllerAnimationsComponent to animate an VR controller.
  17. struct XRControllersConfig final
  18. {
  19. enum class ControlItemType : AZ::u32 {
  20. Boolean,
  21. Float,
  22. Vector2
  23. };
  24. AZ_RTTI(XRControllersConfig, "{A32512BD-124A-723B-AA24-214BCD02CCAA}");
  25. AZ_CLASS_ALLOCATOR(XRControllersConfig, AZ::SystemAllocator);
  26. static void Reflect(AZ::ReflectContext* context);
  27. // Editor configuration properties
  28. ControlItemType m_controlItemType;
  29. AZStd::string m_animGraphParameter;
  30. AZStd::string m_actionName;
  31. // Runtime variables
  32. IOpenXRActions::ActionHandle m_actionHandle;
  33. bool m_prevBoolean = false;
  34. float m_prevFloat = 0;
  35. };
  36. } // namespace OpenXRVk