pub struct MeshPatch {
pub control_points: [[Point; 4]; 4],
pub corner_colors: [Rgba; 4],
}Expand description
One colour patch of a Type 6 (Coons) / Type 7 (tensor-product) patch mesh (§8.7.4.5.7–8). The patch geometry is a bicubic surface; Type 6 patches are stored as the equivalent tensor-product patch (the four internal control points derived from the boundary curves per the §8.7.4.5.8 conversion equations), so both types share this 4×4 control-point representation.
Fields§
§control_points: [[Point; 4]; 4]The 16 tensor-product control points p[col][row] (§8.7.4.5.8
Figure 32) in the shading’s target coordinate space. For a Type 6
Coons patch the four internal points (p[1][1], p[1][2],
p[2][1], p[2][2]) are computed from the boundary curves.
corner_colors: [Rgba; 4]The four corner colours, in the §8.7.4.5.7 corner order
(c1=p00, c2=p03, c3=p33, c4=p30). The patch
interior colour is the bilinear interpolation of these four.