2021-11-18 14:58:01 +00:00
|
|
|
#ifndef DUST3D_APPLICATION_MESH_GENERATOR_H_
|
|
|
|
#define DUST3D_APPLICATION_MESH_GENERATOR_H_
|
|
|
|
|
2022-09-23 15:54:49 +00:00
|
|
|
#include <memory>
|
2021-11-18 14:58:01 +00:00
|
|
|
#include <QObject>
|
|
|
|
#include <QImage>
|
|
|
|
#include <dust3d/mesh/mesh_generator.h>
|
2022-09-23 15:54:49 +00:00
|
|
|
#include "model_mesh.h"
|
|
|
|
#include "monochrome_mesh.h"
|
2021-11-18 14:58:01 +00:00
|
|
|
|
|
|
|
class MeshGenerator : public QObject, public dust3d::MeshGenerator
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
MeshGenerator(dust3d::Snapshot *snapshot);
|
|
|
|
~MeshGenerator();
|
2022-09-23 15:54:49 +00:00
|
|
|
ModelMesh *takeResultMesh();
|
2022-10-02 19:45:46 +00:00
|
|
|
std::map<dust3d::Uuid, std::unique_ptr<ModelMesh>> *takeComponentPreviewMeshes();
|
2022-09-23 15:54:49 +00:00
|
|
|
MonochromeMesh *takeWireframeMesh();
|
2021-11-18 14:58:01 +00:00
|
|
|
public slots:
|
|
|
|
void process();
|
|
|
|
signals:
|
|
|
|
void finished();
|
|
|
|
private:
|
2022-10-02 19:45:46 +00:00
|
|
|
std::unique_ptr<ModelMesh> m_resultMesh;
|
|
|
|
std::unique_ptr<std::map<dust3d::Uuid, std::unique_ptr<ModelMesh>>> m_componentPreviewMeshes;
|
2022-09-23 15:54:49 +00:00
|
|
|
std::unique_ptr<MonochromeMesh> m_wireframeMesh;
|
2021-11-18 14:58:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|