2018-05-07 16:08:19 +00:00
|
|
|
#include <QGuiApplication>
|
|
|
|
#include "meshresultpostprocessor.h"
|
|
|
|
|
|
|
|
MeshResultPostProcessor::MeshResultPostProcessor(const MeshResultContext &meshResultContext)
|
|
|
|
{
|
|
|
|
m_meshResultContext = new MeshResultContext;
|
|
|
|
*m_meshResultContext = meshResultContext;
|
|
|
|
}
|
|
|
|
|
|
|
|
MeshResultPostProcessor::~MeshResultPostProcessor()
|
|
|
|
{
|
|
|
|
delete m_meshResultContext;
|
|
|
|
}
|
|
|
|
|
|
|
|
MeshResultContext *MeshResultPostProcessor::takePostProcessedResultContext()
|
|
|
|
{
|
|
|
|
MeshResultContext *resultContext = m_meshResultContext;
|
|
|
|
m_meshResultContext = nullptr;
|
|
|
|
return resultContext;
|
|
|
|
}
|
|
|
|
|
|
|
|
void MeshResultPostProcessor::process()
|
|
|
|
{
|
|
|
|
if (!m_meshResultContext->bmeshNodes.empty()) {
|
2018-10-09 02:19:12 +00:00
|
|
|
(void)m_meshResultContext->triangleTangents();
|
2018-10-15 15:02:31 +00:00
|
|
|
(void)m_meshResultContext->parts();
|
2018-05-07 16:08:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
this->moveToThread(QGuiApplication::instance()->thread());
|
|
|
|
emit finished();
|
|
|
|
}
|
|
|
|
|
|
|
|
|