Exemplo n.º 1
0
        public static List<LineSegment> fractalLineSegment(LineSegment ls, float maxOffset, float threshold)
        {
            // uncomment these lines to temporary disable line fractals
            //List<LineSegment> dummy = new List<LineSegment>();
            //dummy.Add(ls);
            //return dummy;

            s_lineFractalPerp = ls.getLine().getPerpVector();

            s_lineFractalLength = ls.getLength();
            return fractalLineSegment(ls, maxOffset, threshold, 1);
        }
        public bool getIntersect(ref LineSegment rhs, out Vector2 pt)
        {
            Line l1 = this.getLine();
            Line l2 = rhs.getLine();

            pt = l1.getIntersect(l2);

            if (this.containsX(pt.X) && rhs.containsX(pt.X))
            {
                return true;
            }
            return false;
        }