Exemplo n.º 1
0
        public bool FlipChanelOnLine(ColorChanel chan, MeshPoint other)
        {
            float val = 1;

            if (Cfg.makeVerticesUniqueOnEdgeColoring)
            {
                EditedMesh.GiveLineUniqueVerticesRefreshTriangleListing(new LineData(this, other));
            }

            foreach (var u in vertices)
            {
                if (u.ConnectedTo(other))
                {
                    val *= chan.GetValueFrom(u.color) * chan.GetValueFrom(u.GetConnectedUVinVertex(other).color);
                }
            }

            val = (val > 0.9f) ? 0 : 1;

            SetChanel(chan, other, val);
            other.SetChanel(chan, this, val);

            EditedMesh.Dirty = true;

            return(val == 1);
        }
Exemplo n.º 2
0
        public void FlipChanel(ColorChanel chan)
        {
            var val = chan.GetValueFrom(color);

            val = (val > 0.9f) ? 0 : 1;
            chan.SetValueOn(ref color, val);
        }
Exemplo n.º 3
0
        public bool ChannelSlider(ColorChanel chan, ref Color col)
        {
            chan.GetIcon().write();
            float val = chan.GetValueFrom(col);

            if (pegi.edit(ref val, 0, 1).nl())
            {
                chan.SetValueOn(ref col, val);
                return(true);
            }

            return(false);
        }