示例#1
0
        private void DrawTri(Object o)
        {
            bool flag = Monitor.TryEnter(bitmap, 1000);

            DTriAngle tri = o as DTriAngle;

            try
            {
                if (flag)
                {
                    Point a  = tri.p1.ToScreenPoint(view);
                    Point b  = tri.p2.ToScreenPoint(view);
                    Point c  = tri.p3.ToScreenPoint(view);
                    Color ca = tri.p1.color;
                    Color cb = tri.p2.color;
                    Color cc = tri.p3.color;


                    SetTri(a, b, c, ca, cb, cc);
                }
            }
            catch (Exception)
            {
            }
            finally
            {
                if (flag)
                {
                    Monitor.Exit(bitmap);
                }
            }
        }
示例#2
0
 private void LinkFaces()
 {
     foreach (var array in mesh.faces)
     {
         DTriAngle tri = new DTriAngle(matureVertexes[array[0]], matureVertexes[array[1]], matureVertexes[array[2]]);
         matureFaces.Add(tri);
     }
 }