// This makes a polygon from the path
        public EarClipPolygon MakePolygon(bool startfront)
        {
            EarClipPolygon p       = new EarClipPolygon();
            bool           forward = startfront;

            // Any sides at all?
            if (base.Count > 0)
            {
                if (forward)
                {
                    p.AddLast(new EarClipVertex(base[0].Start.Position, base[0].Front));
                }
                else
                {
                    p.AddLast(new EarClipVertex(base[0].End.Position, base[0].Back));
                }

                // Add all lines, but the first
                for (int i = 1; i < base.Count; i++)
                {
                    // Traverse direction changes?
                    if ((base[i - 1].Start == base[i].Start) ||
                        (base[i - 1].End == base[i].End))
                    {
                        forward = !forward;
                    }

                    // Add next vertex
                    if (forward)
                    {
                        p.AddLast(new EarClipVertex(base[i].Start.Position, base[i].Front));
                    }
                    else
                    {
                        p.AddLast(new EarClipVertex(base[i].End.Position, base[i].Back));
                    }
                }
            }

            return(p);
        }
        // This makes a polygon from the path
        public EarClipPolygon MakePolygon()
        {
            EarClipPolygon p = new EarClipPolygon();

            // Any sides at all?
            if (base.Count > 0)
            {
                // Add all sides
                for (int i = 0; i < base.Count; i++)
                {
                    // On front or back?
                    if (base[i].IsFront)
                    {
                        p.AddLast(new EarClipVertex(base[i].Line.End.Position, base[i]));
                    }
                    else
                    {
                        p.AddLast(new EarClipVertex(base[i].Line.Start.Position, base[i]));
                    }
                }
            }

            return(p);
        }