An extension class for h2d.col.Segment.

Available since

0.1.0

.

See also:

Static methods

staticinlinecheckSeg(seg1:Segment, seg2:Segment):Null<Array<Dynamic>>

Checks if two segments intersects.

This function is a shortcut to the nb.phys.Collision.checkSegments function.

Parameters:

seg1

The first segment.

seg2

The second segment.

Returns:

If there's an intersection, an array with at index 0 the point of the intersection, and at index 1 the overlapping part of the two segments. Returns null if there is no intersection.

staticinlinegetA(seg:Segment):Point

Returns the point A of an h2d.col.Segment instance.

staticinlinegetB(seg:Segment):Point

Returns the point B of an h2d.col.Segment instance.