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

@@ -72,20 +72,40 @@ public:
/** \name Addding items to a mesh
*/
//@{
/** Override OpenMesh::Mesh::PolyMeshT::add_face(). Faces that aren't
triangles will be triangulated and added. In this case an
invalid face handle will be returned. */
FaceHandle add_face(const std::vector<VertexHandle>& _vhandles)
{ return add_face(&_vhandles.front(), _vhandles.size()); }
/** \brief Add a face with arbitrary valence to the triangle mesh
*
* Override OpenMesh::Mesh::PolyMeshT::add_face(). Faces that aren't
* triangles will be triangulated and added. In this case an
* invalid face handle will be returned.
*
*
* */
FaceHandle add_face(const VertexHandle* _vhandles, size_t _vhs_size);
FaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2)
{
VertexHandle vhs[3] = { _vh0, _vh1, _vh2 };
return PolyConnectivity::add_face(vhs, 3);
}
/** \brief Add a face with arbitrary valence to the triangle mesh
*
* Override OpenMesh::Mesh::PolyMeshT::add_face(). Faces that aren't
* triangles will be triangulated and added. In this case an
* invalid face handle will be returned.
*
*
* */
FaceHandle add_face(const std::vector<VertexHandle>& _vhandles);
/** \brief Add a face to the mesh (triangle)
*
* This function adds a triangle to the mesh. The triangle is passed directly
* to the underlying PolyConnectivity as we don't explicitly need to triangulate something.
*
* @param _vh0 VertexHandle 1
* @param _vh1 VertexHandle 2
* @param _vh2 VertexHandle 3
* @return FaceHandle of the added face (invalid, if the operation failed)
*/
FaceHandle add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2);
//@}