Fixed loop subdivider with external vector type

This commit is contained in:
Jan Möbius
2019-04-09 13:27:03 +02:00
parent 1b46bb0e7a
commit 752c8ef7d2

View File

@@ -321,7 +321,7 @@ private: // topological modifiers
typename mesh_t::VertexHandle vh1(_m.to_vertex_handle(heh)); typename mesh_t::VertexHandle vh1(_m.to_vertex_handle(heh));
typename mesh_t::Point midP(_m.point(_m.to_vertex_handle(heh))); typename mesh_t::Point midP(_m.point(_m.to_vertex_handle(heh)));
midP += _m.point(_m.to_vertex_handle(opp_heh)); midP += _m.point(_m.to_vertex_handle(opp_heh));
midP *= static_cast<typename mesh_t::Point::value_type>(0.5); midP *= 0.5;
// new vertex // new vertex
vh = _m.new_vertex( midP ); vh = _m.new_vertex( midP );
@@ -393,7 +393,7 @@ private: // geometry helper
// boundary edge: just average vertex positions // boundary edge: just average vertex positions
if (_m.is_boundary(_eh) ) if (_m.is_boundary(_eh) )
{ {
pos *= static_cast<typename MeshType::Point::value_type>(0.5); pos *= 0.5;
} }
else // inner edge: add neighbouring Vertices to sum else // inner edge: add neighbouring Vertices to sum
{ {