dust3d/src/meshresultpostprocessor.cpp

34 lines
685 B
C++
Raw Normal View History

#include <QGuiApplication>
#include "meshresultpostprocessor.h"
MeshResultPostProcessor::MeshResultPostProcessor(const Outcome &outcome)
{
m_outcome = new Outcome;
*m_outcome = outcome;
}
MeshResultPostProcessor::~MeshResultPostProcessor()
{
delete m_outcome;
}
Outcome *MeshResultPostProcessor::takePostProcessedResultContext()
{
Outcome *outcome = m_outcome;
m_outcome = nullptr;
return outcome;
}
void MeshResultPostProcessor::process()
{
2018-10-25 15:28:10 +00:00
if (!m_outcome->nodes.empty()) {
(void)m_outcome->triangleTangents();
(void)m_outcome->parts();
}
this->moveToThread(QGuiApplication::instance()->thread());
emit finished();
}