From 02e39f4022e510804a805bb72c72ab77dbfe1c38 Mon Sep 17 00:00:00 2001
From: Philip Trettner <Philip.Trettner@rwth-aachen.de>
Date: Mon, 9 Mar 2020 14:20:57 +0100
Subject: [PATCH] incorporated pm changes

---
 extern/polymesh                    |  2 +-
 tests/attributes/attribute-test.cc | 40 +++++++++++++++---------------
 tests/basics.cc                    |  2 +-
 3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/extern/polymesh b/extern/polymesh
index 784b49b..cd4589a 160000
--- a/extern/polymesh
+++ b/extern/polymesh
@@ -1 +1 @@
-Subproject commit 784b49ba7b1ffe0f30990a898757d33a0b79edef
+Subproject commit cd4589aad58e4429311af9d63c2aadb9aeb4d1bd
diff --git a/tests/attributes/attribute-test.cc b/tests/attributes/attribute-test.cc
index c7a7c74..0af5afd 100644
--- a/tests/attributes/attribute-test.cc
+++ b/tests/attributes/attribute-test.cc
@@ -59,10 +59,10 @@ TEST_CASE("Attributes.Creation")
 
     {
         auto a0 = m.vertices().make_attribute<int>();
-        auto a1 = m.vertices().make_attribute_with_default(3);
+        auto a1 = m.vertices().make_attribute(3);
         auto a2 = m.vertices().make_attribute_from_data(std::vector<int>(3, 5));
-        auto a3 = m.vertices().make_attribute([](auto) { return 7; });
-        auto a4 = m.vertices().make_attribute([](auto) { return 11; });
+        auto a3 = m.vertices().map([](auto) { return 7; });
+        auto a4 = m.vertices().map([](auto) { return 11; });
         auto a5 = pm::vertex_attribute<int>(m);
         // TODO: auto a6 = pm::vertex_attribute(m, 13);
         auto a7 = pm::attribute<int>(m.vertices());
@@ -84,10 +84,10 @@ TEST_CASE("Attributes.Creation")
 
     {
         auto a0 = m.faces().make_attribute<int>();
-        auto a1 = m.faces().make_attribute_with_default(3);
+        auto a1 = m.faces().make_attribute(3);
         auto a2 = m.faces().make_attribute_from_data(std::vector<int>(3, 5));
-        auto a3 = m.faces().make_attribute([](auto) { return 7; });
-        auto a4 = m.faces().make_attribute([](auto) { return 11; });
+        auto a3 = m.faces().map([](auto) { return 7; });
+        auto a4 = m.faces().map([](auto) { return 11; });
         auto a5 = pm::face_attribute<int>(m);
         // TODO: auto a6 = pm::face_attribute(m, 13);
         auto a7 = pm::attribute<int>(m.faces());
@@ -106,10 +106,10 @@ TEST_CASE("Attributes.Creation")
 
     {
         auto a0 = m.edges().make_attribute<int>();
-        auto a1 = m.edges().make_attribute_with_default(3);
+        auto a1 = m.edges().make_attribute(3);
         auto a2 = m.edges().make_attribute_from_data(std::vector<int>(3, 5));
-        auto a3 = m.edges().make_attribute([](auto) { return 7; });
-        auto a4 = m.edges().make_attribute([](auto) { return 11; });
+        auto a3 = m.edges().map([](auto) { return 7; });
+        auto a4 = m.edges().map([](auto) { return 11; });
         auto a5 = pm::edge_attribute<int>(m);
         // TODO: auto a6 = pm::edge_attribute(m, 13);
         auto a7 = pm::attribute<int>(m.edges());
@@ -118,10 +118,10 @@ TEST_CASE("Attributes.Creation")
 
     {
         auto a0 = m.halfedges().make_attribute<int>();
-        auto a1 = m.halfedges().make_attribute_with_default(3);
+        auto a1 = m.halfedges().make_attribute(3);
         auto a2 = m.halfedges().make_attribute_from_data(std::vector<int>(3, 5));
-        auto a3 = m.halfedges().make_attribute([](auto) { return 7; });
-        auto a4 = m.halfedges().make_attribute([](auto) { return 11; });
+        auto a3 = m.halfedges().map([](auto) { return 7; });
+        auto a4 = m.halfedges().map([](auto) { return 11; });
         auto a5 = pm::halfedge_attribute<int>(m);
         // TODO: auto a6 = pm::halfedge_attribute(m, 13);
         auto a7 = pm::attribute<int>(m.halfedges());
@@ -210,13 +210,13 @@ TEST_CASE("Attributes.DefaultSemantic")
     m.vertices().add();
     m.vertices().add();
 
-    auto a = m.vertices().make_attribute_with_default(7);
+    auto a = m.vertices().make_attribute(7);
 
     CHECK(ll.vertex_attribute_count() == 1);
     for (auto v : m.vertices())
         CHECK(a[v] == 7);
 
-    auto b = m.vertices().make_attribute_with_default(9);
+    auto b = m.vertices().make_attribute(9);
 
     CHECK(ll.vertex_attribute_count() == 2);
     for (auto v : m.vertices())
@@ -255,8 +255,8 @@ TEST_CASE("Attributes.DefaultSemantic")
         CHECK(d[v] == 7);
     }
 
-    auto e = m.vertices().make_attribute_with_default(11);
-    auto f = m.vertices().make_attribute_with_default(13);
+    auto e = m.vertices().make_attribute(11);
+    auto f = m.vertices().make_attribute(13);
     c = std::move(f);
     CHECK(!f.is_valid());
 
@@ -407,13 +407,13 @@ TEST_CASE("Attributes.DefaultSemanticEdge")
     ll.alloc_edge();
     ll.alloc_edge();
 
-    auto a = m.edges().make_attribute_with_default(7);
+    auto a = m.edges().make_attribute(7);
 
     CHECK(ll.edge_attribute_count() == 1);
     for (auto e : m.edges())
         CHECK(a[e] == 7);
 
-    auto b = m.edges().make_attribute_with_default(9);
+    auto b = m.edges().make_attribute(9);
 
     CHECK(ll.edge_attribute_count() == 2);
     for (auto e : m.edges())
@@ -452,8 +452,8 @@ TEST_CASE("Attributes.DefaultSemanticEdge")
         CHECK(d[e] == 7);
     }
 
-    auto e = m.edges().make_attribute_with_default(11);
-    auto f = m.edges().make_attribute_with_default(13);
+    auto e = m.edges().make_attribute(11);
+    auto f = m.edges().make_attribute(13);
     c = std::move(f);
     CHECK(!f.is_valid());
 
diff --git a/tests/basics.cc b/tests/basics.cc
index bf9b6c1..fc5ea31 100644
--- a/tests/basics.cc
+++ b/tests/basics.cc
@@ -73,7 +73,7 @@ TEST_CASE("PolyMesh, Properties")
     auto v2 = m.vertices().add();
     auto f = m.faces().add(v0, v1, v2);
 
-    auto pos = m.vertices().make_attribute_with_default(glm::vec3(7, 7, 7));
+    auto pos = m.vertices().make_attribute(glm::vec3(7, 7, 7));
     auto centroid = m.faces().make_attribute<glm::vec3>();
 
     CHECK(pos[v0] == glm::vec3(7));
-- 
GitLab