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-11-01 15:24:06 +00:00
|
|
|
#include "rigtype.h"
|
2018-09-21 07:10:18 +00:00
|
|
|
|
|
|
|
class PosePreviewsGenerator : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2018-11-01 15:24:06 +00:00
|
|
|
PosePreviewsGenerator(RigType rigType,
|
|
|
|
const std::vector<RiggerBone> *rigBones,
|
2018-10-26 23:04:45 +00:00
|
|
|
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();
|
2018-11-09 03:20:48 +00:00
|
|
|
void addPose(std::pair<QUuid, int> idAndFrame, const std::map<QString, std::map<QString, QString>> &pose);
|
|
|
|
const std::set<std::pair<QUuid, int>> &generatedPreviewPoseIdAndFrames();
|
|
|
|
MeshLoader *takePreview(std::pair<QUuid, int> idAndFrame);
|
2018-09-21 07:10:18 +00:00
|
|
|
signals:
|
|
|
|
void finished();
|
|
|
|
public slots:
|
|
|
|
void process();
|
|
|
|
private:
|
2018-11-01 15:24:06 +00:00
|
|
|
RigType m_rigType = RigType::None;
|
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-11-09 03:20:48 +00:00
|
|
|
std::vector<std::pair<std::pair<QUuid, int>, std::map<QString, std::map<QString, QString>>>> m_poses;
|
|
|
|
std::map<std::pair<QUuid, int>, MeshLoader *> m_previews;
|
|
|
|
std::set<std::pair<QUuid, int>> m_generatedPoseIdAndFrames;
|
2018-09-21 07:10:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|