- updated the OpenMesh tutorials to be OM 3 compliant

- added all the tutorials except "Using IO::Options" as unittests

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@968 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Isaak Lim
2013-10-14 12:56:49 +00:00
parent f134e74a88
commit 185322a75b
10 changed files with 1056 additions and 34 deletions

View File

@@ -46,20 +46,20 @@ int main(int argc, char **argv)
{
for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
{
mesh.property(cogs,v_it).vectorize(0.0f);
valence = 0;
mesh.property(cogs,*v_it).vectorize(0.0f);
valence = 0.0;
for (vv_it=mesh.vv_iter( v_it ); vv_it; ++vv_it)
for (vv_it=mesh.vv_iter( *v_it ); vv_it; ++vv_it)
{
mesh.property(cogs,v_it) += mesh.point( vv_it );
mesh.property(cogs,*v_it) += mesh.point( *vv_it );
++valence;
}
mesh.property(cogs,v_it) /= valence;
mesh.property(cogs,*v_it) /= valence;
}
for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
if ( !mesh.is_boundary( v_it ) )
mesh.set_point( v_it, mesh.property(cogs,v_it) );
if ( !mesh.is_boundary( *v_it ) )
mesh.set_point( *v_it, mesh.property(cogs,*v_it) );
}