Some documentation and cleanup for the add_face functions.

Unittests for add_face on triangle and quad meshes.




git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@600 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2012-06-21 07:55:12 +00:00
parent e658918cca
commit a3f36c2d73
6 changed files with 103 additions and 23 deletions

View File

@@ -187,8 +187,7 @@ public:
*
* @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()); }
FaceHandle add_face(const std::vector<VertexHandle>& _vhandles);
/** \brief Add and connect a new face
@@ -200,11 +199,7 @@ public:
* @param _vh1 Second vertex handle
* @param _vh2 Third vertex handle
*/
FaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2)
{
VertexHandle vhs[3] = { _vh0, _vh1, _vh2 };
return add_face(vhs, 3);
}
FaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2);
/** \brief Add and connect a new face
*
@@ -216,11 +211,7 @@ public:
* @param _vh2 Third vertex handle
* @param _vh3 Fourth vertex handle
*/
FaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2, VertexHandle _vh3)
{
VertexHandle vhs[4] = { _vh0, _vh1, _vh2, _vh3 };
return add_face(vhs, 4);
}
FaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2, VertexHandle _vh3);
/** \brief Add and connect a new face
*
@@ -231,6 +222,7 @@ public:
* @param _vhs_size number of vertex handles in the array
*/
FaceHandle add_face(const VertexHandle* _vhandles, size_t _vhs_size);
//@}
/// \name Deleting mesh items and other connectivity/topology modifications