dust3d/application/sources/mesh_generator.h

33 lines
926 B
C
Raw Normal View History

#ifndef DUST3D_APPLICATION_MESH_GENERATOR_H_
#define DUST3D_APPLICATION_MESH_GENERATOR_H_
2022-09-23 15:54:49 +00:00
#include <memory>
#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"
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();
ModelMesh *takePartPreviewMesh(const dust3d::Uuid &partId);
QImage *takePartPreviewImage(const dust3d::Uuid &partId);
2022-09-23 15:54:49 +00:00
MonochromeMesh *takeWireframeMesh();
public slots:
void process();
signals:
void finished();
private:
2022-09-23 15:54:49 +00:00
ModelMesh *m_resultMesh = nullptr;
std::map<dust3d::Uuid, ModelMesh *> m_partPreviewMeshes;
std::map<dust3d::Uuid, QImage *> m_partPreviewImages;
2022-09-23 15:54:49 +00:00
std::unique_ptr<MonochromeMesh> m_wireframeMesh;
};
#endif