pub struct TrimRectangle {
pub u1: f64,
pub v1: f64,
pub u2: f64,
pub v2: f64,
pub usense: bool,
pub vsense: bool,
}Expand description
The parameter rectangle cut from a surface, with senses intact.
Kept as a struct rather than four loose numbers because the sense flags are meaningless without the bounds they qualify, and a caller that fetches the bounds without the senses will build the complementary patch on a periodic surface.
Fields§
§u1: f64First u parameter, as written.
v1: f64First v parameter, as written.
u2: f64Second u parameter, as written.
v2: f64Second v parameter, as written.
usense: boolDoes u run from u1 to u2 in increasing parameter order?
vsense: boolDoes v run from v1 to v2 in increasing parameter order?
Implementations§
Source§impl TrimRectangle
impl TrimRectangle
Sourcepub fn u_wraps(&self) -> bool
pub fn u_wraps(&self) -> bool
Does the u range wrap through the surface’s period?
True when u1 > u2 while usense claims increasing order, which is
only consistent on a closed parameter direction. Useful as a check: a
file asserting this for a plane is inconsistent, and a kernel that
clamps rather than wraps will produce an empty patch.