Fixed last occurences of non-free-function usage (at least as far as covered by the tests).

This commit is contained in:
Christian Mattes
2018-04-12 15:16:50 +02:00
parent 57e2e07432
commit 377562d11a
7 changed files with 26 additions and 14 deletions

View File

@@ -181,7 +181,7 @@ compute_new_positions_C1()
if (diag) uu *= static_cast<typename Mesh::Scalar>(1.0) / diag;
// damping
uu *= static_cast<typename Mesh::Normal::value_type>(0.25);
uu *= static_cast<typename vector_traits<typename Mesh::Normal>::value_type>(0.25);
// store new position
p = vector_cast<typename Mesh::Normal>(Base::mesh_.point(*v_it));

View File

@@ -263,13 +263,13 @@ set_relative_local_error(Scalar _err)
bb_min = bb_max = mesh_.point(*v_it);
for (++v_it; v_it!=v_end; ++v_it)
{
bb_min.minimize(mesh_.point(*v_it));
bb_max.maximize(mesh_.point(*v_it));
minimize(bb_min, mesh_.point(*v_it));
maximize(bb_max, mesh_.point(*v_it));
}
// abs. error = rel. error * bounding-diagonal
set_absolute_local_error(_err * (bb_max-bb_min).norm());
set_absolute_local_error(norm(_err * (bb_max-bb_min)));
}
}

View File

@@ -346,7 +346,7 @@ CatmullClarkT<MeshType,RealType>::update_vertex( MeshType& _m, const VertexHandl
for ( ve_itr = _m.ve_iter( _vh); ve_itr.is_valid(); ++ve_itr)
if ( _m.is_boundary( *ve_itr))
pos += _m.property( ep_pos_, *ve_itr);
pos /= static_cast<typename MeshType::Point::value_type>(3.0);
pos /= static_cast<typename vector_traits<typename MeshType::Point>::value_type>(3.0);
}
else // inner vertex
{