Logo Search packages:      
Sourcecode: inkscape version File versions

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

Determine whether the line segment from p00 to p01 intersects the infinite line passing through p10 and p11. 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 121 of file geom.cpp.

Referenced by line_segment_intersect(), and segment_intersectp().

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

    return ((intersector_ccw(p00, p01, p10) * intersector_ccw(p00, p01, p11)) <= 0 );

Generated by  Doxygen 1.6.0   Back to index