- 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:
@@ -15,10 +15,10 @@ fill_props( Mesh& _m, OpenMesh::VPropHandleT<float> _ph, bool _check=false)
|
||||
it != _m.vertices_end(); ++it)
|
||||
{
|
||||
const float v = a[it->idx()%9];
|
||||
if ( _check && !(_m.property( _ph, it ) == v) )
|
||||
if ( _check && !(_m.property( _ph, *it ) == v) )
|
||||
return false;
|
||||
else
|
||||
_m.property( _ph, it ) = v;
|
||||
_m.property( _ph, *it ) = v;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -35,15 +35,15 @@ fill_props( Mesh& _m, OpenMesh::EPropHandleT<bool> _ph, bool _check=false )
|
||||
const size_t n = it->idx();
|
||||
const bool v = ((n&(n-1))==0); // true for 0,1,2,4,8,..
|
||||
|
||||
if (_check && _m.property( _ph, it ) != v)
|
||||
if (_check && _m.property( _ph, *it ) != v)
|
||||
{
|
||||
std::cout << " eprop_bool: " << n << " -> "
|
||||
<< _m.property(_ph, it ) << " != " << v << std::endl;
|
||||
<< _m.property(_ph, *it ) << " != " << v << std::endl;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
_m.property( _ph, it ) = v;
|
||||
_m.property( _ph, *it ) = v;
|
||||
std::cout << " eprop_bool: " << n << " -> " << v << std::endl;
|
||||
}
|
||||
}
|
||||
@@ -60,8 +60,8 @@ fill_props(Mesh& _m, OpenMesh::FPropHandleT<std::string> _ph, bool _check=false)
|
||||
for( typename Mesh::FaceIter it=_m.faces_begin();
|
||||
it != _m.faces_end(); ++it)
|
||||
{
|
||||
const int n = ++(it->idx());
|
||||
_m.property( _ph, it ) = int2roman(n);
|
||||
const int n = (it->idx()) + 1;
|
||||
_m.property( _ph, *it ) = int2roman(n);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -92,10 +92,10 @@ fill_props( Mesh& _m, OpenMesh::HPropHandleT<T> _ph, bool _check=false)
|
||||
v.vec4fval[2] = c[n%9];
|
||||
v.vec4fval[3] = d[n%9];
|
||||
|
||||
if ( _check && _m.property( _ph, it ) != v )
|
||||
if ( _check && _m.property( _ph, *it ) != v )
|
||||
return false;
|
||||
else
|
||||
_m.property( _ph, it ) = v;
|
||||
_m.property( _ph, *it ) = v;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user