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

@@ -51,6 +51,7 @@ const PolyConnectivity::EdgeHandle PolyConnectivity::InvalidEdgeHandle;
const PolyConnectivity::FaceHandle PolyConnectivity::InvalidFaceHandle;
//-----------------------------------------------------------------------------
PolyConnectivity::HalfedgeHandle
PolyConnectivity::find_halfedge(VertexHandle _start_vh, VertexHandle _end_vh ) const
{
@@ -279,6 +280,26 @@ PolyConnectivity::add_face(const VertexHandle* _vertex_handles, size_t _vhs_size
return fh;
}
//-----------------------------------------------------------------------------
FaceHandle PolyConnectivity::add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2, VertexHandle _vh3)
{
VertexHandle vhs[4] = { _vh0, _vh1, _vh2, _vh3 };
return add_face(vhs, 4);
}
//-----------------------------------------------------------------------------
FaceHandle PolyConnectivity::add_face(VertexHandle _vh0, VertexHandle _vh1, VertexHandle _vh2)
{
VertexHandle vhs[3] = { _vh0, _vh1, _vh2 };
return add_face(vhs, 3);
}
//-----------------------------------------------------------------------------
FaceHandle PolyConnectivity::add_face(const std::vector<VertexHandle>& _vhandles)
{ return add_face(&_vhandles.front(), _vhandles.size()); }
//-----------------------------------------------------------------------------