Ejemplo n.º 1
0
 def get_intersect_pt(self, seg):
     """If there's an intersection, then seg is opposite direction (vert or horiz)"""
     if segment_intersect(self.segment, seg):
         if self.direction == 'vert':
             x_int = self.p0.x
             y_int = seg[0].y
         else:
             x_int = seg[0].x
             y_int = self.p0.y
         return Point( x_int, y_int )
     else:
         return None
Ejemplo n.º 2
0
 def get_intersect_pt(self, seg):
     """If there's an intersection, then seg is opposite direction (vert or horiz)"""
     if segment_intersect(self.segment, seg):
         if self.direction == 'vert':
             x_int = self.p0.x
             y_int = seg[0].y
         else:
             x_int = seg[0].x
             y_int = self.p0.y
         return Point(x_int, y_int)
     else:
         return None
Ejemplo n.º 3
0
 def intersects_segment(self, seg):
     return segment_intersect(self.segment, seg)
Ejemplo n.º 4
0
 def intersects(self, blockade):
     return segment_intersect(self.segment, blockade.segment)
Ejemplo n.º 5
0
 def intersects_segment(self, seg):
     return segment_intersect(self.segment, seg)
Ejemplo n.º 6
0
 def intersects(self, blockade):
     return segment_intersect(self.segment, blockade.segment)