28 using tvec = glm::tvec2<T>;
31 std::vector<tindexed_triangle<>> triangles;
38 std::array<vertex_weight<T>, 3> interpolation_of(tvec
const& pt)
const
41 if (idx == invalid_index)
43 const auto tri = triangles[idx].as_triangle(points);
44 const auto bary = tri.barycentric_coords_of(pt);
46 vertex_weight{triangles[idx].indices[0], bary.x},
47 vertex_weight{triangles[idx].indices[1], bary.y},
48 vertex_weight{triangles[idx].indices[2], bary.z}