diff --git a/src/uvunwrap.cpp b/src/uvunwrap.cpp index 2df7630f..3151c698 100644 --- a/src/uvunwrap.cpp +++ b/src/uvunwrap.cpp @@ -57,7 +57,7 @@ void uvUnwrap(const Outcome &outcome, simpleuv::UvUnwrapper uvUnwrapper; uvUnwrapper.setMesh(inputMesh); uvUnwrapper.unwrap(); - qDebug() << "Texture size:" << uvUnwrapper.textureSize(); + qDebug() << "Texture size:" << uvUnwrapper.getTextureSize(); const std::vector &resultFaceUvs = uvUnwrapper.getFaceUvs(); const std::vector &resultChartRects = uvUnwrapper.getChartRects(); const std::vector &resultChartSourcePartitions = uvUnwrapper.getChartSourcePartitions(); diff --git a/thirdparty/simpleuv/simpleuv/uvunwrapper.cpp b/thirdparty/simpleuv/simpleuv/uvunwrapper.cpp index 77162d89..81a86315 100644 --- a/thirdparty/simpleuv/simpleuv/uvunwrapper.cpp +++ b/thirdparty/simpleuv/simpleuv/uvunwrapper.cpp @@ -20,6 +20,11 @@ void UvUnwrapper::setMesh(const Mesh &mesh) m_mesh = mesh; } +void UvUnwrapper::setTexelSize(float texelSize) +{ + m_texelSizePerUnit = texelSize; +} + const std::vector &UvUnwrapper::getFaceUvs() const { return m_faceUvs; @@ -577,7 +582,7 @@ void UvUnwrapper::parametrizeSingleGroup(const std::vector &verticies, m_chartSourcePartitions.push_back(sourcePartition); } -float UvUnwrapper::textureSize() const +float UvUnwrapper::getTextureSize() const { return m_resultTextureSize; } diff --git a/thirdparty/simpleuv/simpleuv/uvunwrapper.h b/thirdparty/simpleuv/simpleuv/uvunwrapper.h index cccceec0..afdf1501 100644 --- a/thirdparty/simpleuv/simpleuv/uvunwrapper.h +++ b/thirdparty/simpleuv/simpleuv/uvunwrapper.h @@ -12,11 +12,12 @@ class UvUnwrapper { public: void setMesh(const Mesh &mesh); + void setTexelSize(float texelSize); void unwrap(); const std::vector &getFaceUvs() const; const std::vector &getChartRects() const; const std::vector &getChartSourcePartitions() const; - float textureSize() const; + float getTextureSize() const; private: void partition();