#pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include "Log.hpp" #include "components/Animation.hpp" namespace thermion { using namespace filament; using namespace filament::gltfio; using namespace utils; using namespace std::chrono; // // The status of a morph target animation created dynamically at runtime (not glTF embedded). // struct MorphAnimation : Animation { int lengthInFrames; float frameLengthInMs = 0; std::vector frameData; std::vector morphIndices; }; /// @brief /// /// struct MorphAnimationComponent { std::vector animations; }; class MorphAnimationComponentManager : public utils::SingleInstanceComponentManager { public: MorphAnimationComponentManager( filament::TransformManager &transformManager, filament::RenderableManager &renderableManager) : mTransformManager(transformManager), mRenderableManager(renderableManager) {}; ~MorphAnimationComponentManager() {}; void addAnimationComponent(Entity entity); void removeAnimationComponent(Entity entity); void update(); private: filament::TransformManager &mTransformManager; filament::RenderableManager &mRenderableManager; }; }