Skip to main content

CanShear

Trait CanShear 

Source
pub trait CanShear: GeometricPrimitive + Sized {
    type Point: IsPoint;

    // Required method
    fn shear<'a, L>(&mut self, shear_line: &L)
       where L: IsLine<'a, Self::Point>;
}
Expand description

Shears a primitive parallel to the x axis: every vertex moves by x ← x + k·y, where the shear factor k is the length of the supplied line. The line’s position and direction are ignored.

Required Associated Types§

Source

type Point: IsPoint

Point type used by the shear line.

Required Methods§

Source

fn shear<'a, L>(&mut self, shear_line: &L)
where L: IsLine<'a, Self::Point>,

Mutates self by the shear x ← x + k·y, with k = shear_line.length().

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§