Wrapper to AddVertices() to add, with a single call, a single vertex with given coords and normal

This commit is contained in:
Paolo Cignoni 2014-04-17 09:49:40 +00:00
parent 309d1e3289
commit dbe0d2b7f5
1 changed files with 10 additions and 0 deletions

View File

@ -245,6 +245,16 @@ void ResizeAttribute(ATTR_CONT &c,const int & sz , MeshType &/*m*/){
return v_ret;
}
/** \brief Wrapper to AddVertices() to add a single vertex with given coords and normal
*/
static VertexIterator AddVertex(MeshType &m, const CoordType &p, const CoordType &n)
{
VertexIterator v_ret = AddVertices(m, 1);
v_ret->P()=p;
v_ret->N()=n;
return v_ret;
}
/** \brief Wrapper to AddVertices() to add a single vertex with given coords and color
*/
static VertexIterator AddVertex(MeshType &m, const CoordType &p, const Color4b &c)