#ifndef DUST3D_MOTIONS_GENERATOR_H #define DUST3D_MOTIONS_GENERATOR_H #include #include #include #include #include "model.h" #include "simpleshadermesh.h" #include "rigger.h" #include "jointnodetree.h" #include "document.h" class MotionsGenerator : public QObject { Q_OBJECT public: MotionsGenerator(RigType rigType, const std::vector &bones, const std::map &rigWeights, const Outcome &outcome); ~MotionsGenerator(); void addMotion(const QUuid &motionId, const std::map ¶meters); Model *takeResultSnapshotMesh(const QUuid &motionId); std::vector> takeResultPreviewMeshes(const QUuid &motionId); std::vector> takeResultJointNodeTrees(const QUuid &motionId); const std::set &generatedMotionIds(); void enablePreviewMeshes(); void enableSnapshotMeshes(); void generate(); signals: void finished(); public slots: void process(); private: RigType m_rigType = RigType::None; std::vector m_bones; std::map m_rigWeights; Outcome m_outcome; std::map> m_motions; std::set m_generatedMotionIds; std::map m_resultSnapshotMeshes; std::map>> m_resultPreviewMeshes; std::map>> m_resultJointNodeTrees; bool m_previewMeshesEnabled = false; bool m_snapshotMeshesEnabled = false; void generateMotion(const QUuid &motionId); }; #endif