public static Edge MakeEdge(Edge eNext) { EdgePair edgePair = EdgePair.Create(); Edge e = edgePair._e; Edge eSym = edgePair._eSym; Edge.EnsureFirst(ref eNext); (eSym._next = eNext._Sym._next)._Sym._next = e; e._next = eNext; eNext._Sym._next = eSym; e._Sym = eSym; Edge edge = e; edge._Onext = edge; e._Lnext = eSym; e._Org = null; e._Lface = null; e._winding = 0; e._activeRegion = null; eSym._Sym = e; Edge edge2 = eSym; edge2._Onext = edge2; eSym._Lnext = e; eSym._Org = null; eSym._Lface = null; eSym._winding = 0; eSym._activeRegion = null; return(e); }
/// <summary> /// MakeEdge creates a new pair of half-edges which form their own loop. /// No vertex or face structures are allocated, but these must be assigned /// before the current edge operation is completed. /// </summary> public static Edge MakeEdge(Edge eNext) { Debug.Assert(eNext != null); var pair = EdgePair.Create(); var e = pair._e; var eSym = pair._eSym; // Make sure eNext points to the first edge of the edge pair Edge.EnsureFirst(ref eNext); // Insert in circular doubly-linked list before eNext. // Note that the prev pointer is stored in Sym->next. var ePrev = eNext._Sym._next; eSym._next = ePrev; ePrev._Sym._next = e; e._next = eNext; eNext._Sym._next = eSym; e._Sym = eSym; e._Onext = e; e._Lnext = eSym; e._Org = null; e._Lface = null; e._winding = 0; e._activeRegion = null; eSym._Sym = e; eSym._Onext = eSym; eSym._Lnext = e; eSym._Org = null; eSym._Lface = null; eSym._winding = 0; eSym._activeRegion = null; return(e); }