5 # include "points_utils.H"
35 const bool operator == (
const Segment & segment)
const
37 return ((*a == *segment.a and *b == *segment.b) or
38 (*a == *segment.b and *b == *segment.a));
42 const bool intersect(
const Segment & segment)
const
44 return intersectp(*a, *b, *segment.a, *segment.b);
47 const Point * get_a() {
return a ;}
49 const Point * get_b() {
return b; }
54 Point horiz_line_inter(
const Geom_Number & __y)
57 Geom_Number intersection_x;
62 intersection_x = (Geom_Number)((__y - b->
get_y())/m + b->
get_x());
64 Point intersection_point(intersection_x,__y);
66 return intersection_point;
const Geom_Number & get_y() const
retorna el valor de la coordenada y
Definition: point.H:166
const Point & lowest_point() const
Retorna el punto del segmento más al sur.
Definition: point.H:419
const Geom_Number & get_x() const
retorna el valor de la coordenada x
Definition: point.H:161
const Point & highest_point() const
Retorna el punto del segmento más al norte.
Definition: point.H:413