diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-05-27 13:44:08 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-05-27 13:44:08 +0100 |
commit | ad85d0843dc80d195120dd53dd4a8deee004af4b (patch) | |
tree | 420723815ac6753441f14fe51836555de5551a19 /assetFactory | |
parent | Merge branch 'separate-water' (diff) | |
parent | Surface asset test doesn't need render dump (diff) | |
download | ilt-ad85d0843dc80d195120dd53dd4a8deee004af4b.tar.bz2 ilt-ad85d0843dc80d195120dd53dd4a8deee004af4b.tar.xz ilt-ad85d0843dc80d195120dd53dd4a8deee004af4b.zip |
Merge remote-tracking branch 'origin/terrain-surfaces'
Diffstat (limited to 'assetFactory')
-rw-r--r-- | assetFactory/cylinder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/assetFactory/cylinder.cpp b/assetFactory/cylinder.cpp index fd96c8b..f41bfd4 100644 --- a/assetFactory/cylinder.cpp +++ b/assetFactory/cylinder.cpp @@ -1,6 +1,7 @@ #include "cylinder.h" #include "maths.h" #include "modelFactoryMesh.h" +#include <ranges> Cylinder::CreatedFaces Cylinder::createMesh(ModelFactoryMesh & mesh, Scale3D lodf) const @@ -40,13 +41,12 @@ Cylinder::createMesh(ModelFactoryMesh & mesh, Scale3D lodf) const // Wrap around edge.back() = edge.front(); // Transform adjacent pairs of top/bottom pairs to faces - std::adjacent_find(edge.begin(), edge.end(), [&mesh, &surface](const auto & first, const auto & second) { + for (const auto & [first, second] : edge | std::views::adjacent<2>) { const auto fh = surface.insert(mesh.add_namedFace("edge", first.first, first.second, second.second, second.first)) ->second; mesh.property(mesh.smoothFaceProperty, fh) = true; - return false; - }); + } } return surface; |