Ejemplo n.º 1
0
        public IndexedViewableAlpha GetComposition_Add()
        {
            ModelTree            last     = GetLastNonFiltered();
            IndexedViewableAlpha viewable = last.GetViewable();

            viewable.RecolorGroups((int i, int[] inds) => (inds.Sum((int ind) => (viewable.Selected[ind] ? 1 : 0)) > 0 ? (Vec4f?)recoloradd[inds.Length - 1] : (Vec4f?)null));
            return(viewable);
        }
Ejemplo n.º 2
0
        public IndexedViewableAlpha GetComposition_SelectTopo()
        {
            int       itopo   = GetLastIndexOfNonFiltered();
            ModelTree ttopo   = lst[itopo];
            ModelTree tselect = lst[itopo - 1];

            IndexedViewableAlpha viewselect = tselect.GetViewable();
            IndexedViewableAlpha viewtopo   = ttopo.GetViewable();

            IndexedViewableAlpha viewadd  = viewtopo - viewselect;
            IndexedViewableAlpha viewdel  = viewselect - viewtopo;
            IndexedViewableAlpha viewsame = viewselect % viewtopo;

            viewadd.RecolorGroups((int i, int[] inds) => recoloradd[inds.Length - 1]);
            viewdel.RecolorGroups((int i, int[] inds) => recolordel[inds.Length - 1]);

            return(viewsame + viewadd + viewdel);
        }