Beispiel #1
0
        private bool CheckForConvexity(cVertexList A, cVertexList B)
        {
            if (A.Ccw() != 1)
                A.ReverseList();
            if (B.Ccw() != 1)
                B.ReverseList();

            if (!B.CheckForConvexity())  /* Second polygon must be convex */
                return false;

            B.ReverseList();

            return true;
        }
        private bool CheckForConvexity(cVertexList A, cVertexList B)
        {
            if (A.Ccw() != 1)
            {
                A.ReverseList();
            }
            if (B.Ccw() != 1)
            {
                B.ReverseList();
            }

            if (!B.CheckForConvexity())  /* Second polygon must be convex */
            {
                return(false);
            }

            B.ReverseList();

            return(true);
        }
Beispiel #3
0
        private bool CheckForConvexity()
        {
            if (P.Ccw() != 1)
            {
                P.ReverseList();
            }
            if (Q.Ccw() != 1)
            {
                Q.ReverseList();
            }
            if (!P.CheckForConvexity())
            {
                return(false);
            }

            if (!Q.CheckForConvexity())
            {
                return(false);
            }

            return(true);
        }