Studio/src/Data/MeshWorker.h
Worker class for parallel mesh reconstruction. More...
Namespaces
Name |
---|
shapeworks |
Classes
Name | |
---|---|
class | shapeworks::MeshWorker |
Functions
Name | |
---|---|
Q_DECLARE_METATYPE(vtkSmartPointer< vtkPolyData > ) |
Detailed Description
Worker class for parallel mesh reconstruction.
The MeshWorker implements each thread's mesh construction management
Functions Documentation
function Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(
vtkSmartPointer< vtkPolyData >
)
Source code
#pragma once
#include <QObject>
#include <QWaitCondition>
#include <QMetaType>
#include <QRunnable>
#include <Data/MeshWorkQueue.h>
#include <Data/MeshCache.h>
#include <Data/MeshGenerator.h>
Q_DECLARE_METATYPE(vtkSmartPointer<vtkPolyData>);
namespace shapeworks {
class MeshWorker : public QObject, public QRunnable {
Q_OBJECT
public:
MeshWorker(MeshWorkQueue* queue, std::shared_ptr<MeshGenerator> generator);
~MeshWorker();
void run();
Q_SIGNALS:
void result_ready(const MeshWorkItem& item, MeshHandle mesh);
void finished();
private:
std::shared_ptr<MeshGenerator> mesh_generator_;
MeshWorkQueue* queue_;
};
}
Updated on 2022-07-23 at 17:50:05 -0600