From d3a7e225ee1d4644994d88d7808ee70f74ee6387 Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 17 Jun 2014 13:05:46 +0000 Subject: [PATCH] added a AddEdge ( point - point) member to the Allocator Class --- vcg/complex/allocate.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vcg/complex/allocate.h b/vcg/complex/allocate.h index aeef5b4d..734c8614 100644 --- a/vcg/complex/allocate.h +++ b/vcg/complex/allocate.h @@ -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 */