コード例 #1
0
ファイル: cVertexList.cs プロジェクト: whigg/PointClouds
        /* Printing to the console:
         */
        public void PrintVertices()
        {
            cVertex temp = head;
            int     i    = 1;

            if (head != null)
            {
                do
                {
                    temp.PrintVertex(i);
                    temp = temp.NextVertex;
                    i++;
                } while (temp != head);
            }
        }
コード例 #2
0
ファイル: MinkConvol.cs プロジェクト: whigg/PointClouds
        private void Vectorize()
        {
            //int i;
            cVertex v;

            v = P.head;
            System.Diagnostics.Debug.WriteLine("Vectorize: ");
            System.Diagnostics.Debug.WriteLine("list before victorization");
            P.PrintVertices();
            cVertex startB = P.GetElement(n);

            System.Diagnostics.Debug.WriteLine("startB !!!: ");
            startB.PrintVertex();

            SubVec(P.head.Point, startB.PrevVertex.Point, last);
            do
            {
                cPointi c = SubVec(v.NextVertex.Point, v.Point);
                System.Diagnostics.Debug.WriteLine("(" + v.NextVertex.Point.X + "," + v.NextVertex.Point.Y + ") - (" + v.Point.X + "," + v.Point.Y + ")");
                v.Point.X = c.X;
                v.Point.Y = c.Y;
                v         = v.NextVertex;
            } while (v != startB.PrevVertex);
            startB.PrevVertex.Point.X = last.X;
            startB.PrevVertex.Point.Y = last.Y;

            SubVec(startB.Point, P.head.PrevVertex.Point, last);
            v = startB;
            do
            {
                cPointi c = SubVec(v.NextVertex.Point, v.Point);
                System.Diagnostics.Debug.WriteLine("(" + v.NextVertex.Point.X + "," + v.NextVertex.Point.Y + ") - (" + v.Point.X + "," + v.Point.Y + ")");
                v.Point.X = c.X;
                v.Point.Y = c.Y;
                v         = v.NextVertex;
            } while (v != P.head.PrevVertex);
            P.head.PrevVertex.Point.X = last.X;
            P.head.PrevVertex.Point.Y = last.Y;
        }
コード例 #3
0
 public void PrintDiagonal(int index)
 {
     System.Diagnostics.Debug.WriteLine("D" + index + " = ");
     v1.PrintVertex();
     v2.PrintVertex();
 }