dust3d/application/sources/uv_preview_image_generator.cc

27 lines
622 B
C++
Raw Normal View History

2022-10-22 03:11:00 +00:00
#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)
{
}
2022-10-23 03:14:30 +00:00
std::unique_ptr<QImage> UvPreviewImageGenerator::takePreviewImage()
{
return std::move(m_previewImage);
}
2022-10-22 03:11:00 +00:00
void UvPreviewImageGenerator::generate()
{
m_previewImage = std::make_unique<QImage>(m_uvImageSize, m_uvImageSize, QImage::Format_ARGB32);
2022-10-23 03:14:30 +00:00
m_previewImage->fill(Qt::white);
2022-10-22 03:11:00 +00:00
// TODO:
}
void UvPreviewImageGenerator::process()
{
generate();
emit finished();
}