2018-10-25 00:19:38 +00:00
|
|
|
#ifndef DUST3D_POSE_PREVIEWS_GENERATOR_H
|
|
|
|
#define DUST3D_POSE_PREVIEWS_GENERATOR_H
|
2018-09-21 07:10:18 +00:00
|
|
|
#include <QObject>
|
|
|
|
#include <map>
|
|
|
|
#include <QUuid>
|
|
|
|
#include <vector>
|
|
|
|
#include "meshloader.h"
|
2018-10-26 23:04:45 +00:00
|
|
|
#include "rigger.h"
|
2018-10-25 00:19:38 +00:00
|
|
|
#include "outcome.h"
|
2018-09-21 07:10:18 +00:00
|
|
|
|
|
|
|
class PosePreviewsGenerator : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2018-10-26 23:04:45 +00:00
|
|
|
PosePreviewsGenerator(const std::vector<RiggerBone> *rigBones,
|
|
|
|
const std::map<int, RiggerVertexWeights> *rigWeights,
|
2018-10-25 00:19:38 +00:00
|
|
|
const Outcome &outcome);
|
2018-09-21 07:10:18 +00:00
|
|
|
~PosePreviewsGenerator();
|
|
|
|
void addPose(QUuid poseId, const std::map<QString, std::map<QString, QString>> &pose);
|
|
|
|
const std::set<QUuid> &generatedPreviewPoseIds();
|
|
|
|
MeshLoader *takePreview(QUuid poseId);
|
|
|
|
signals:
|
|
|
|
void finished();
|
|
|
|
public slots:
|
|
|
|
void process();
|
|
|
|
private:
|
2018-10-26 23:04:45 +00:00
|
|
|
std::vector<RiggerBone> m_rigBones;
|
|
|
|
std::map<int, RiggerVertexWeights> m_rigWeights;
|
2018-10-25 00:19:38 +00:00
|
|
|
Outcome *m_outcome = nullptr;
|
2018-09-21 07:10:18 +00:00
|
|
|
std::vector<std::pair<QUuid, std::map<QString, std::map<QString, QString>>>> m_poses;
|
|
|
|
std::map<QUuid, MeshLoader *> m_previews;
|
|
|
|
std::set<QUuid> m_generatedPoseIds;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|