|
group2 0.1.0
CSE 125 Group 2
|
Functions | |
| float | areaOrtho (float p, float d, float offset) |
| Smoothing function used by the area calculation. | |
| void | calcAreaOrtho (int d1, int d2, int e1, int e2, float offset, float &r, float &g) |
| Compute the area for a specific orthogonal edge configuration. | |
| float | subtexOffset (int idx) |
| Map sub-pixel index [0..6] to sub-pixel offset value. | |
|
inline |
Smoothing function used by the area calculation.
Returns the area under the line between two edge endpoints that overlaps the pixel at position p, for a smooth step profile.
|
inline |
Compute the area for a specific orthogonal edge configuration.
| d1 | distance from pixel to left/top endpoint |
| d2 | distance from pixel to right/bottom endpoint |
| e1 | crossing edge flag at endpoint 1 (0 or 1) |
| e2 | crossing edge flag at endpoint 2 (0 or 1) |
| offset | sub-pixel offset (0..6 mapped to -0.25..0.25 etc.) |
| result | output RG values (two blend weights) |
|
inline |
Map sub-pixel index [0..6] to sub-pixel offset value.