XRControllerAnimationsComponent.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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/Component/Component.h>
  10. #include <AzCore/Component/TickBus.h>
  11. #include <AzCore/Asset/AssetCommon.h>
  12. #include <OpenXRVk/OpenXRVkActionsInterface.h>
  13. #include "XRControllersConfig.h"
  14. namespace OpenXRVk
  15. {
  16. //! XRControllerAnimationsComponent uses the OpenXRVk::OpenXRActionsInterface to read user input to animate a XR controller.
  17. class XRControllerAnimationsComponent
  18. : public AZ::Component
  19. , public AZ::TickBus::Handler
  20. {
  21. public:
  22. AZ_COMPONENT(XRControllerAnimationsComponent, "{A57B8F98-39A0-4B70-B7F7-2331E62A3276}");
  23. static void Reflect(AZ::ReflectContext* context);
  24. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  25. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  26. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  27. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  28. protected:
  29. // AZ::Component
  30. void Activate() override;
  31. void Deactivate() override;
  32. // AZ::TickBus::Handler
  33. void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override;
  34. private:
  35. // Serialized data...
  36. AZStd::vector<XRControllersConfig> m_controllersConfig;
  37. };
  38. } // namespace OpenXRVk