pub struct CoonsPatch {
pub control_points: [Point; 12],
pub colors: [ColorComponents; 4],
}Expand description
A coons patch.
Fields§
§control_points: [Point; 12]The control points of the coons patch.
colors: [ColorComponents; 4]The colors at each corner of the coons patch.
Implementations§
Source§impl CoonsPatch
impl CoonsPatch
Sourcepub fn map_coordinate(&self, p: Point) -> Point
pub fn map_coordinate(&self, p: Point) -> Point
Map the point to the coordinates of the coons patch.
Sourcepub fn to_triangles(&self, buffer: &mut Vec<Triangle>)
pub fn to_triangles(&self, buffer: &mut Vec<Triangle>)
Approximate the patch by triangles.
Sourcepub fn interpolate(&self, pos: Point) -> ColorComponents
pub fn interpolate(&self, pos: Point) -> ColorComponents
Get the interpolated colors of the point from the patch.
Trait Implementations§
Source§impl Clone for CoonsPatch
impl Clone for CoonsPatch
Source§fn clone(&self) -> CoonsPatch
fn clone(&self) -> CoonsPatch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CoonsPatch
impl RefUnwindSafe for CoonsPatch
impl Send for CoonsPatch
impl Sync for CoonsPatch
impl Unpin for CoonsPatch
impl UnwindSafe for CoonsPatch
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