-
-
Notifications
You must be signed in to change notification settings - Fork 18
triangle_in_triangle_all
Vašek edited this page Feb 10, 2019
·
6 revisions
Returns a list of all the positions where the given triangles intersect
triangle_in_triangle_all(t1, t2)
Argument | Description |
---|---|
Triangle t1 |
The first triangle |
Triangle t2 |
The other triangle |
Returns: list <Vector2>
This function returns a list of all positions - in Vector2
format - where the given triangles intersect.
List<Vector2> list = new List<Vector2>();
Vector2 p1t1 = new Vector2(0, 0);
Vector2 p2t1 = new Vector2(0, 16);
Vector2 p3t1 = new Vector2(16, 16);
Triangle t1 = new Triangle(p1t1, p2t1, p3t1);
Vector2 p1t2 = new Vector2(16, 16);
Vector2 p2t2 = new Vector2(32, 32);
Vector2 p3t2 = new Vector2(32, 16);
Triangle t2 = new Triangle(p1t2, p2t2, p3t2);
list = triangle_in_triangle_all(t1, t2);
This function will save position 16, 16
to list
.
Back to Raycasting