31 lines
845 B
C++
31 lines
845 B
C++
#ifndef DUST3D_APPLICATION_MATERIAL_PREVIEWS_GENERATOR_H_
|
|
#define DUST3D_APPLICATION_MATERIAL_PREVIEWS_GENERATOR_H_
|
|
|
|
#include <QObject>
|
|
#include <map>
|
|
#include <vector>
|
|
#include "model.h"
|
|
#include "material_layer.h"
|
|
|
|
class MaterialPreviewsGenerator : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
MaterialPreviewsGenerator();
|
|
~MaterialPreviewsGenerator();
|
|
void addMaterial(dust3d::Uuid materialId, const std::vector<MaterialLayer> &layers);
|
|
const std::set<dust3d::Uuid> &generatedPreviewMaterialIds();
|
|
Model *takePreview(dust3d::Uuid materialId);
|
|
void generate();
|
|
signals:
|
|
void finished();
|
|
public slots:
|
|
void process();
|
|
private:
|
|
std::vector<std::pair<dust3d::Uuid, std::vector<MaterialLayer>>> m_materials;
|
|
std::map<dust3d::Uuid, Model *> m_previews;
|
|
std::set<dust3d::Uuid> m_generatedMaterialIds;
|
|
};
|
|
|
|
#endif
|