And another one
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@909 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
cog[0] = cog[1] = cog[2] = valence = 0.0;
|
||||
|
||||
for (vv_it=mesh.vv_iter(v_it.handle()); vv_it; ++vv_it)
|
||||
for (vv_it=mesh.vv_iter(*v_it); vv_it; ++vv_it)
|
||||
{
|
||||
cog += mesh.point( *vv_it );
|
||||
++valence;
|
||||
@@ -110,8 +110,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
|
||||
if (!mesh.is_boundary(v_it.handle()))
|
||||
mesh.set_point( v_it.handle(), mesh.data(v_it).cog());
|
||||
if (!mesh.is_boundary(*v_it))
|
||||
mesh.set_point( *v_it, mesh.data(*v_it).cog());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -786,7 +786,7 @@ This example shows how to iterate over all faces of a mesh:
|
||||
MyMesh mesh;
|
||||
|
||||
for(MyMesh::FaceIter f_it = mesh.faces_begin(); f_it != mesh.faces_end(); ++f_it) {
|
||||
std::cout << "The face's valence is " << mesh.valence( f_it.handle() ) << std::endl;
|
||||
std::cout << "The face's valence is " << mesh.valence( *f_it ) << std::endl;
|
||||
}
|
||||
|
||||
\endcode
|
||||
@@ -890,7 +890,7 @@ MyMesh mesh;
|
||||
MyMesh::FaceHalfedgeIter fh_it = mesh.fh_iter(faceHandle);
|
||||
|
||||
for(; fh_it; ++fh_it) {
|
||||
std::cout << "Halfedge has handle " << fh_it.handle() << std::endl;
|
||||
std::cout << "Halfedge has handle " << *fh_it << std::endl;
|
||||
}
|
||||
|
||||
\endcode
|
||||
|
||||
@@ -50,9 +50,9 @@ mesh.add_face(face_vhandles);
|
||||
// Find this edge and then flip it
|
||||
for(TriMesh::EdgeIter it = mesh.edges_begin(); it != mesh.edges_end(); ++it) {
|
||||
|
||||
if(!mesh.is_boundary(it.handle())) {
|
||||
if(!mesh.is_boundary(*it)) {
|
||||
// Flip edge
|
||||
mesh.flip(it.handle());
|
||||
mesh.flip(*it);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,11 +116,11 @@ mesh.add_face(face_vhandles);
|
||||
// and vhandle[3]
|
||||
for(PolyMesh::HalfedgeIter it = mesh.halfedges_begin(); it != mesh.halfedges_end(); ++it) {
|
||||
|
||||
if(to_vertex_handle(it.handle()) == vhandle[3] &&
|
||||
from_vertex_handle(it.handle()) == vhandle[2]) {
|
||||
if(to_vertex_handle(*it) == vhandle[3] &&
|
||||
from_vertex_handle(*it) == vhandle[2]) {
|
||||
|
||||
// Collapse edge
|
||||
mesh.collapse(it.handle());
|
||||
mesh.collapse(*it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user