PoseComparisonFixture.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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/std/smart_ptr/unique_ptr.h>
  9. #include <Tests/SystemComponentFixture.h>
  10. namespace EMotionFX
  11. {
  12. class Actor;
  13. class ActorInstance;
  14. class AnimGraph;
  15. class MotionSet;
  16. struct PoseComparisonFixtureParams
  17. {
  18. const char* m_actorFile = nullptr;
  19. const char* m_animGraphFile = nullptr;
  20. const char* m_motionSetFile = nullptr;
  21. const char* m_recordingFile = nullptr;
  22. PoseComparisonFixtureParams(const char* actorFile, const char* animGraphFile, const char* motionSetFile, const char* recordingFile)
  23. : m_actorFile(actorFile), m_animGraphFile(animGraphFile), m_motionSetFile(motionSetFile), m_recordingFile(recordingFile)
  24. {}
  25. };
  26. class PoseComparisonFixture
  27. : public SystemComponentFixture
  28. , public ::testing::WithParamInterface<PoseComparisonFixtureParams>
  29. {
  30. public:
  31. void SetUp() override;
  32. void TearDown() override;
  33. void LoadAssets();
  34. protected:
  35. AZStd::unique_ptr<Actor> m_actor = nullptr;
  36. ActorInstance* m_actorInstance = nullptr;
  37. AnimGraph* m_animGraph = nullptr;
  38. MotionSet* m_motionSet = nullptr;
  39. };
  40. // This fixture exists to separate the tests that test the pose comparsion
  41. // functionality from the tests that use the pose comparison functionality
  42. // (even though it doesn't use the recording)
  43. class TestPoseComparisonFixture
  44. : public PoseComparisonFixture
  45. {
  46. };
  47. }; // namespace EMotionFX