<static> intersectsPoints(a, b, e, f, asSegment, result) → {Phaser.Point}
Checks for intersection between two lines as defined by the given start and end points.
If asSegment is true it will check for line segment intersection. If asSegment is false it will check for line intersection.
Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.
Adapted from code by Keith Hair
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
a | Phaser.Point | The start of the first Line to be checked. | ||
b | Phaser.Point | The end of the first line to be checked. | ||
e | Phaser.Point | The start of the second Line to be checked. | ||
f | Phaser.Point | The end of the second line to be checked. | ||
asSegment | boolean | <optional> | true | If true it will check for segment intersection, otherwise full line intersection. |
result | Phaser.Point | object | <optional> | A Point object to store the result in, if not given a new one will be created. |
Returns
The intersection segment of the two lines as a Point, or null if there is no intersection.
- Source code: geom/Line.js (Line 554)
Please login to continue.