Logo Search packages:      
Sourcecode: inkscape version File versions

bool Geom::segment_intersectp ( Geom::Point const &  p00,
Geom::Point const &  p01,
Geom::Point const &  p10,
Geom::Point const &  p11 

Determine whether two line segments intersect. This doesn't find the point of intersection, use the line_intersect function above, or the segment_intersection interface below.

neither segment is zero-length; i.e. p00 != p01 and p10 != p11.

Definition at line 138 of file geom.cpp.

References line_segment_intersectp().

Referenced by segment_intersect().

    if(p00 == p01) return false;
    if(p10 == p11) return false;

    /* true iff (    (the p1 segment straddles the p0 infinite line)
     *           and (the p0 segment straddles the p1 infinite line) ). */
    return (line_segment_intersectp(p00, p01, p10, p11) &&
            line_segment_intersectp(p10, p11, p00, p01));

Generated by  Doxygen 1.6.0   Back to index