public override void Reset() { MeshUtils.Face f = _fHead._next; while (true) { MeshUtils.Face fNext = f._next; f.Free(); if (f == _fHead) { break; } f = fNext; } MeshUtils.Vertex v = _vHead._next; while (true) { MeshUtils.Vertex vNext = v._next; v.Free(); if (v == _vHead) { break; } v = vNext; } for (int i = 0; i < _allEdgePairs.Count; i++) { MeshUtils.EdgePair pair = _allEdgePairs[i]; MeshUtils.Edge e = pair._e; if (!e.IsReturnedToPool()) // (can be Free in KillEdge) { e.Free(); } MeshUtils.Edge eSym = pair._eSym; if (!eSym.IsReturnedToPool()) // (can be Free in KillEdge) { eSym.Free(); } pair.Free(); } _allEdgePairs.Clear(); _vHead = null; _fHead = null; _eHead = _eHeadSym = null; }
public override void OnFree() { for (MeshUtils.Face f = _fHead._next, fNext = _fHead; f != _fHead; f = fNext) { fNext = f._next; f.Free(); } for (MeshUtils.Vertex v = _vHead._next, vNext = _vHead; v != _vHead; v = vNext) { vNext = v._next; v.Free(); } for (MeshUtils.Edge e = _eHead._next, eNext = _eHead; e != _eHead; e = eNext) { eNext = e._next; e.Free(); } }