Skip to main content

Intersection

line-line

line-line() -> vector or none 

Checks for a line-line intersection between the given points and returns its position, otherwise none.

Line 1 point 1

Line 1 point 2

Line 2 point 1

Line 2 point 2

ray:

Default: false

When true, intersections will be found for the whole line instead of inbetween the given points.

line-cubic

line-cubic() -> array 

Finds the intersections of a line and cubic bezier.

Bezier start point

Bezier end point

Bezier control point 1

Bezier control point 2

Line start point

Line end point

ray:

When true, intersections will be found for the whole line instead of inbetween the given points.

line-linestrip

line-linestrip() -> array 

Finds the intersections of a line and linestrip.

Line start point.

Line end point.

An array of vectors that define each point on the linestrip.

line-path

line-path() -> array 

Finds the intersections of a line and path in 2D. The path should be given as a drawable of type path.

Line start

Line end

The path.

path-path

path-path() -> array 

Finds the intersections between two path drawables in 2D.

Path a

Path b

samples:

Default: 8

Number of samples to use for bezier curves