10.1.4.12. Segment¶
Module to implement segment.
-
class
Patro.GeometryEngine.Segment.Segment2D(p0, p1)[source]¶ Bases:
Patro.GeometryEngine.Primitive.Primitive2DMixin,Patro.GeometryEngine.Primitive.Primitive2PClass to implement 2D Segment
Construct a
Segment2Dbetween two points.-
center¶
-
cross_product¶
-
direction¶
-
intersect_with(segment2)[source]¶ Checks if the line segments intersect. return 1 if there is an intersection 0 otherwise
-
length¶
-
point_at_t(t)¶ Return the linear interpolate of two points.
-
side_of(point)[source]¶ Tests if a point is left/on/right of a line.
> 0 if point is left of the line = 0 if point is on the line < 0 if point is right of the line
-
vector¶
-