예제 #1
0
    public bool Destroy(Halfedge halfedge)
    {
        Debug.Assert(halfedge != null);
        Debug.Assert(halfedge.hmesh == this);
        Debug.Assert(!halfedge.IsDestroyed(), "Halfedge already destroyed");
        bool res = halfedges.Remove(halfedge);

        if (res)
        {
            halfedge.face = null;
            halfedge.next = null;
            halfedge.opp  = null;
            halfedge.prev = null;
            halfedge.vert = null;
            halfedge.SetDestroyed();
        }
        else
        {
            Debug.Log("Already destroyed");
        }
        return(res);
    }