Beispiel #1
0
        protected override void OnEdgeCollapse(int edgeID, int va, int vb, DMesh3.EdgeCollapseInfo collapseInfo)
        {
            int vidx = CurrentLoopV.FindIndex((i) => { return(i == collapseInfo.vRemoved); });

            CurrentLoopV.RemoveAt(vidx);

            int eidx = CurrentLoopE.FindIndex((i) => { return(i == edgeID); });

            CurrentLoopE.RemoveAt(eidx);

            // if we removed the "loop-wrap" edge, ie verts [n-1,0], then
            // our edge list needs to be cycled by one. Right now just rebuilding it.
            if (vidx == 0 && eidx == CurrentLoopE.Count)
            {
                rebuild_edge_list();
            }

            Debug.Assert(check_loop());
        }
        // subclasses can override these to implement custom behavior...

        protected virtual void OnEdgeCollapse(int edgeID, int va, int vb, DMesh3.EdgeCollapseInfo collapseInfo)
        {
            // this is for subclasses...
        }