Struct nbez::Bez2o [] [src]

pub struct Bez2o<F, P = Point2d<F>> where
    F: Float,
    P: Point<F>, 
{ pub start: P, pub ctrl: P, pub end: P, // some fields omitted }

Order 2 bezier curve

Fields

Methods

impl<F, P> Bez2o<F, P> where
    F: Float,
    P: Point<F>, 
[src]

Create a new bezier curve, with each field of this function corresponding to the similarly-named point on the curve.

Trait Implementations

impl<F: Debug, P: Debug> Debug for Bez2o<F, P> where
    F: Float,
    P: Point<F>, 
[src]

Formats the value using the given formatter.

impl<F: Clone, P: Clone> Clone for Bez2o<F, P> where
    F: Float,
    P: Point<F>, 
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<F: Copy, P: Copy> Copy for Bez2o<F, P> where
    F: Float,
    P: Point<F>, 
[src]

impl<F, P> BezCurve<F> for Bez2o<F, P> where
    P: Point<F>,
    F: Float
[src]

Attempt to create a curve from a slice. Fails if the slice's length does not match the curve's order + 1. Read more

Perform interpolation on the curve with no range bounds

Get the slope for the given t with no range bounds

Elevate the curve order, getting a curve that is one order higher but gives the same results upon interpolation Read more

Split the curve with no range bounds

Gets the order of the curve

Perform interpolation on the curve for the given t, bounded on 0.0 to 1.0 inclusive. Returns None if t is not within bounds. Read more

Get the slope for the given t, bounded on 0.0 to 1.0 inclusive. Returns None if t is not within bounds. Read more

Split the curve at the given t, bounded on 0.0 to 1.0 inclusive. Returns None if t is not within bounds. Read more

Get an iterator over the interpolated values of this curve, splitting the curve into the given number of samples. Read more

impl<F, P> OrderStatic for Bez2o<F, P> where
    F: Float,
    P: Point<F>, 
[src]

Gets the compiletime-known curve order.

impl<F, P> From<[P; 3]> for Bez2o<F, P> where
    F: Float,
    P: Point<F>, 
[src]

Performs the conversion.

impl<F, P> AsRef<[P]> for Bez2o<F, P> where
    F: Float,
    P: Point<F>, 
[src]

Performs the conversion.

impl<F, P> AsMut<[P]> for Bez2o<F, P> where
    F: Float,
    P: Point<F>, 
[src]

Performs the conversion.