You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Intersection with edge A is trivial, since it's being intersected on an internal point
37
+
- Intersection with edge A is trivial, since it's being intersected on an internal point of the edge
38
38
- The second intersection is more tricky: the intersection point is at the connection (vertex) between edges B and C, but we do not want to emit the intersection 2 times.
39
-
- To avoid this, when checking the collision with edge B we emit 0 intersections for edge B, when checking against edge C we emit 1 point
39
+
- To avoid this, when checking the scanline's collision against edge B we emit 0 intersections for edge B at it's endpoint (Y1), when checking against edge C we emit 1 point at its start point (Y0)
40
40
41
-
#### Scanning SCANLINE 2
41
+
#### Intersections at SCANLINE 2
42
42
43
43
- Intersection with edge A is trivial, since it's being intersected on an internal point
44
-
- However the rest is tricky: We want to to emulate the intersection with the collinear edge not being listed in `ScanEdgeCollection`.
45
-
- The easies we want to do so is to emit a point pair for the line part between A-D and a second point pair for D-C
44
+
- However the rest is tricky: We want to to emulate the intersection with the collinear edge X not being listed in `ScanEdgeCollection`.
45
+
- The easiest way is to emit a point pair for the line part between A-D and a second point pair for D-C (to emulate the intersection with X)
46
46
- To achieve this, we should emit the start point (Y0) intersection of the D edge 2 times!
47
47
48
48
### Edge emit rules
49
49
50
-
The emit rules are here to provide a consistent way for intersecting stuff as described in the previous "Illustration" part.
50
+
The emit rules are there to provide a consistent way for intersecting scanlines as described in the previous "Illustration" part, handling all corner cases.
51
51
These rules only work well, when:
52
52
- The outline polygons are Clockwise in screen-space (= "has positive orientation" according to the terminlogy used in the repository)
53
53
- Holes have Counter-Clockwise ("negative") orientation.
0 commit comments