Commit 11798f61 authored by Jan Möbius's avatar Jan Möbius

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
parent 63ee35a5
......@@ -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()
......@@ -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<VertexHandle>& _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);
//@}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment