From 11798f613478aca264b57df28e5b100ad80f7f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Thu, 15 Jul 2010 06:31:53 +0000 Subject: [PATCH] Fixed documentation for add_face and some other typos (Thanks to Yamauchi Hitoshi) git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@330 fdac6126-5c0c-442c-9429-916003d36597 --- Doc/Examples/iterators.cc | 6 ++-- src/OpenMesh/Core/Mesh/PolyConnectivity.hh | 38 +++++++++++++++++++--- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/Doc/Examples/iterators.cc b/Doc/Examples/iterators.cc index 957df892..0a7c9285 100644 --- a/Doc/Examples/iterators.cc +++ b/Doc/Examples/iterators.cc @@ -5,14 +5,14 @@ for (MyMesh::VertexIter v_it=mesh.vertices_begin(); v_it!=mesh.vertices_end(); + ...; // do something with *v_it, v_it->, or v_it.handle() // iterate over all halfedges -for (MyMesh::HalfedgeIter h_it=mesh.halfedges_begin(); v_it!=mesh.halfedges_end(); ++v_it) +for (MyMesh::HalfedgeIter h_it=mesh.halfedges_begin(); h_it!=mesh.halfedges_end(); ++h_it) ...; // do something with *h_it, h_it->, or h_it.handle() // iterate over all edges -for (MyMesh::EdgeIter e_it=mesh.edges_begin(); v_it!=mesh.edges_end(); ++v_it) +for (MyMesh::EdgeIter e_it=mesh.edges_begin(); e_it!=mesh.edges_end(); ++e_it) ...; // do something with *e_it, e_it->, or e_it.handle() // iterator over all faces -for (MyMesh::FaceIter f_it=mesh.faces_begin(); v_it!=mesh.faces_end(); ++v_it) +for (MyMesh::FaceIter f_it=mesh.faces_begin(); f_it!=mesh.faces_end(); ++f_it) ...; // do something with *f_it, f_it->, or f_it.handle() diff --git a/src/OpenMesh/Core/Mesh/PolyConnectivity.hh b/src/OpenMesh/Core/Mesh/PolyConnectivity.hh index 8dd8376c..e18de93a 100644 --- a/src/OpenMesh/Core/Mesh/PolyConnectivity.hh +++ b/src/OpenMesh/Core/Mesh/PolyConnectivity.hh @@ -175,26 +175,56 @@ public: /** \name Adding items to a mesh */ //@{ + /// Add a new vertex inline VertexHandle add_vertex() { return new_vertex(); } - /// Add and connect a new face + /** \brief Add and connect a new face + * + * Create a new face consisting of the vertices provided by the vertex handle vector. + * (The vertices have to be already added to the mesh by add_vertex) + * + * @param _vhandles sorted list of vertex handles (also defines order in which the vertices are added to the face) + */ FaceHandle add_face(const std::vector& _vhandles) { return add_face(&_vhandles.front(), _vhandles.size()); } - + + + /** \brief Add and connect a new face + * + * Create a new face consisting of three vertices provided by the handles. + * (The vertices have to be already added to the mesh by add_vertex) + * + * @param _vhandles sorted list of vertex handles (also defines order in which the vertices are added to the face) + */ FaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2) { VertexHandle vhs[3] = { _vh0, _vh1, _vh2 }; return add_face(vhs, 3); } - + + /** \brief Add and connect a new face + * + * Create a new face consisting of four vertices provided by the handles. + * (The vertices have to be already added to the mesh by add_vertex) + * + * @param _vhandles sorted list of vertex handles (also defines order in which the vertices are added to the face) + */ FaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2, VertexHandle _vh3) { VertexHandle vhs[4] = { _vh0, _vh1, _vh2, _vh3 }; return add_face(vhs, 4); } - + + /** \brief Add and connect a new face + * + * Create a new face consisting of vertices provided by a handle array. + * (The vertices have to be already added to the mesh by add_vertex) + * + * @param _vhandles pointer to a sorted list of vertex handles (also defines order in which the vertices are added to the face) + * @param _vhs_size number of vertex handles in the array + */ FaceHandle add_face(const VertexHandle* _vhandles, uint _vhs_size); //@}