dust3d/application/sources/uv_preview_image_generator.cc

27 lines
622 B
C++

#include "uv_preview_image_generator.h"
const size_t UvPreviewImageGenerator::m_uvImageSize = 1024;
UvPreviewImageGenerator::UvPreviewImageGenerator(std::vector<std::vector<dust3d::Vector2>>&& faceUvs)
: m_faceUvs(faceUvs)
{
}
std::unique_ptr<QImage> UvPreviewImageGenerator::takePreviewImage()
{
return std::move(m_previewImage);
}
void UvPreviewImageGenerator::generate()
{
m_previewImage = std::make_unique<QImage>(m_uvImageSize, m_uvImageSize, QImage::Format_ARGB32);
m_previewImage->fill(Qt::white);
// TODO:
}
void UvPreviewImageGenerator::process()
{
generate();
emit finished();
}