pub struct MeshPatch { /* private fields */ }Expand description
Newton-free inverse-bilinear patch descriptor with straight Oklab and alpha.
Implementations§
Source§impl MeshPatch
impl MeshPatch
Sourcepub fn positions(&self) -> &[Point; 4]
pub fn positions(&self) -> &[Point; 4]
Corners in top-left, top-right, bottom-left, bottom-right lattice order.
Sourcepub fn colors(&self) -> &[[f64; 4]; 4]
pub fn colors(&self) -> &[[f64; 4]; 4]
Straight Oklab plus linear alpha, in the same corner order as positions.
Sourcepub fn sample(&self, point: Point) -> Result<Option<[f32; 4]>, ValidationError>
pub fn sample(&self, point: Point) -> Result<Option<[f32; 4]>, ValidationError>
Evaluates a unit-object-space point; returns None outside this patch.
Folded patches choose the first valid quadratic root. Degenerate patches have no area. Color weights are cubic smoothstep in each patch coordinate. Rejects nonfinite sample coordinates or nonfinite working-color results.
Trait Implementations§
impl StructuralPartialEq for MeshPatch
Auto Trait Implementations§
impl Forget for MeshPatch
impl Freeze for MeshPatch
impl Move for MeshPatch
impl RefUnwindSafe for MeshPatch
impl Send for MeshPatch
impl Sync for MeshPatch
impl Unpin for MeshPatch
impl UnsafeUnpin for MeshPatch
impl UnwindSafe for MeshPatch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more