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