diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-18 02:44:00 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-18 02:44:00 +0000 |
commit | 51f0f60bd24a3d7ed77cf713f846bc49c2f1aed5 (patch) | |
tree | b4b7acb17274e1753a002956bcddebb691c40762 /assetFactory/style.cpp | |
parent | Use indices instead of triangulation (diff) | |
download | ilt-51f0f60bd24a3d7ed77cf713f846bc49c2f1aed5.tar.bz2 ilt-51f0f60bd24a3d7ed77cf713f846bc49c2f1aed5.tar.xz ilt-51f0f60bd24a3d7ed77cf713f846bc49c2f1aed5.zip |
Use halfedge for texture coordinates
More unique than vertex as it is also per face, allowing for a different texture on adjacent faces
Diffstat (limited to 'assetFactory/style.cpp')
-rw-r--r-- | assetFactory/style.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/assetFactory/style.cpp b/assetFactory/style.cpp index 8aecc71..d1d4adc 100644 --- a/assetFactory/style.cpp +++ b/assetFactory/style.cpp @@ -30,8 +30,8 @@ Style::applyStyle( auto coords = mf->getTextureCoords(texture); auto coord = coords.begin(); // Wild assumption that face is a quad and the texture should apply linearly - for (const auto & vh : mesh.fv_range(face)) { - mesh.set_texcoord2D(vh, *coord++); + for (const auto & heh : mesh.fh_range(face)) { + mesh.set_texcoord2D(heh, *coord++); } } } |