diff --git a/simpleuv.pro b/simpleuv.pro index 9589032..93d0e60 100644 --- a/simpleuv.pro +++ b/simpleuv.pro @@ -20,7 +20,6 @@ HEADERS += simpleuv/chartpacker.h SOURCES += simpleuv/triangulate.cpp HEADERS += simpleuv/triangulate.h -SOURCES += simpleuv/meshdatatype.cpp HEADERS += simpleuv/meshdatatype.h SOURCES += thirdparty/squeezer/maxrects.c diff --git a/simpleuv/uvunwrapper.cpp b/simpleuv/uvunwrapper.cpp index 77162d8..81a8631 100644 --- a/simpleuv/uvunwrapper.cpp +++ b/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/simpleuv/uvunwrapper.h b/simpleuv/uvunwrapper.h index cccceec..afdf150 100644 --- a/simpleuv/uvunwrapper.h +++ b/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();