Beispiel #1
0
        public void FlipChanel(ColorChanel chan)
        {
            float val = _color.GetChanel(chan);

            val = (val > 0.9f) ? 0 : 1;
            chan.SetChanel(ref _color, val);
        }
Beispiel #2
0
 public void SetColor_OppositeTo(ColorChanel chan)
 {
     for (int i = 0; i < 3; i++)
     {
         ColorChanel c = (ColorChanel)i;
         c.SetChanel(ref _color, c == chan ? 0 : 1);
     }
 }
Beispiel #3
0
 void SetChanel(ColorChanel chan, MeshPoint other, float val)
 {
     foreach (Vertex u in uvpoints)
     {
         if (u.ConnectedTo(other))
         {
             chan.SetChanel(ref u._color, val);
         }
     }
 }
Beispiel #4
0
        public void RemoveBorderFromLine(MeshPoint other)
        {
            foreach (Vertex u in uvpoints)
            {
                if (u.ConnectedTo(other))
                {
                    for (int i = 0; i < 4; i++)
                    {
                        Vertex      ouv = u.GetConnectedUVinVert(other);
                        ColorChanel ch  = (ColorChanel)i;

                        float val = u._color.GetChanel(ch) * ouv._color.GetChanel(ch);

                        if (val > 0.9f)
                        {
                            ch.SetChanel(ref u._color, 0);
                            ch.SetChanel(ref ouv._color, 0);
                        }
                    }
                }
            }
        }