Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array.
The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle's sides. Thus, the Triangle is considered "solid".
name | type | arguments | description |
---|---|---|---|
triangle | Phaser.Geom.Triangle |
The Triangle to check with. |
|
line | Phaser.Geom.Line |
The Line to check with. |
|
out | array | <optional> |
An optional array in which to store the points of intersection. |
An array with the points of intersection if objects intersect, otherwise an empty array.