added a AddEdge ( point - point) member to the Allocator Class

This commit is contained in:
Paolo Cignoni 2014-06-17 13:05:46 +00:00
parent c1f34b6517
commit d3a7e225ee
1 changed files with 13 additions and 0 deletions

View File

@ -333,6 +333,19 @@ void ResizeAttribute(ATTR_CONT &c,const int & sz , MeshType &/*m*/){
return ei;
}
/** Function to add a face to the mesh and initializing it with the three given coords
*/
static EdgeIterator AddEdge(MeshType &m, CoordType p0, CoordType p1)
{
VertexIterator vi = AddVertices(m,2);
EdgeIterator ei = AddEdges(m,1);
vi->P()=p0;
ei->V(0)=&*vi++;
vi->P()=p1;
ei->V(1)=&*vi++;
return ei;
}
/** Function to add n edges to the mesh.
First wrapper, with no parameters
*/