Delete() public method

Removes the edge eDel. There are several cases: if (eDel->Lface != eDel->Rface), we join two loops into one; the loop eDel->Lface is deleted. Otherwise, we are splitting one loop into two; the newly created loop will contain eDel->Dst. If the deletion of eDel would create isolated vertices, those are deleted as well.
public Delete ( LibTessDotNet.MeshUtils.Edge eDel ) : void
eDel LibTessDotNet.MeshUtils.Edge
return void
Exemplo n.º 1
0
        /// <summary>
        /// SetWindingNumber( value, keepOnlyBoundary ) resets the
        /// winding numbers on all edges so that regions marked "inside" the
        /// polygon have a winding number of "value", and regions outside
        /// have a winding number of 0.
        ///
        /// If keepOnlyBoundary is TRUE, it also deletes all edges which do not
        /// separate an interior region from an exterior one.
        /// </summary>
        private void SetWindingNumber(int value, bool keepOnlyBoundary)
        {
            MeshUtils.Edge e, eNext;

            for (e = _mesh._eHead._next; e != _mesh._eHead; e = eNext)
            {
                eNext = e._next;
                if (e._Rface._inside != e._Lface._inside)
                {
                    /* This is a boundary edge (one side is interior, one is exterior). */
                    e._winding = (e._Lface._inside) ? value : -value;
                }
                else
                {
                    /* Both regions are interior, or both are exterior. */
                    if (!keepOnlyBoundary)
                    {
                        e._winding = 0;
                    }
                    else
                    {
                        _mesh.Delete(_pool, e);
                    }
                }
            }
        }
Exemplo n.º 2
0
 private void FixUpperEdge(ActiveRegion reg, MeshUtils.Edge newEdge)
 {
     _mesh.Delete(reg._eUp);
     reg._fixUpperEdge     = false;
     reg._eUp              = newEdge;
     newEdge._activeRegion = reg;
 }