AssImpAnimationImporter.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 <SceneAPI/SceneCore/Components/LoadingComponent.h>
  10. #include <SceneAPI/SceneBuilder/ImportContexts/AssImpImportContexts.h>
  11. struct aiAnimation;
  12. struct aiMesh;
  13. struct aiMeshMorphAnim;
  14. namespace AZ
  15. {
  16. namespace SceneAPI
  17. {
  18. namespace SceneBuilder
  19. {
  20. class AssImpAnimationImporter
  21. : public SceneCore::LoadingComponent
  22. {
  23. public:
  24. AZ_COMPONENT(AssImpAnimationImporter, "{93b3f4e3-6fcd-42b9-a74e-5923f76d25c7}", SceneCore::LoadingComponent);
  25. AssImpAnimationImporter();
  26. ~AssImpAnimationImporter() override = default;
  27. static void Reflect(ReflectContext* context);
  28. Events::ProcessingResult ImportAnimation(AssImpSceneNodeAppendedContext& context);
  29. Events::ProcessingResult ImportBlendShapeAnimation(
  30. AssImpSceneNodeAppendedContext& context,
  31. const aiAnimation* animation,
  32. const aiMeshMorphAnim* meshMorphAnim,
  33. const aiMesh* mesh);
  34. static const double s_defaultTimeStepBetweenFrames;
  35. protected:
  36. static const char* s_animationNodeName;
  37. };
  38. } // namespace SceneBuilder
  39. } // namespace SceneAPI
  40. } // namespace AZ