Struct envelope::BezierPoint [] [src]

pub struct BezierPoint<X, Y> where X: Clone + Copy, Y: Spatial + Clone + Copy, Y::Scalar: Float {
    pub x: X,
    pub y: Y,
    pub curve: Y::Scalar,
}

A type whose interpolation may involve some quadratic bezier curve.

Fields

x: X y: Y curve: Y::Scalar

Methods

impl<X, Y> BezierPoint<X, Y> where X: Clone + Copy, Y: Spatial + Clone + Copy, Y::Scalar: Float
[src]

fn new(x: X, y: Y, curve: Y::Scalar) -> BezierPoint<X, Y>

Constructor for a BezierPoint.

Trait Implementations

impl<X: Decodable, Y: Decodable> Decodable for BezierPoint<X, Y> where X: Clone + Copy, Y: Spatial + Clone + Copy, Y::Scalar: Float, Y::Scalar: Decodable
[src]

fn decode<__DXY: Decoder>(__arg_0: &mut __DXY) -> Result<BezierPoint<X, Y>, __DXY::Error>

impl<X: Encodable, Y: Encodable> Encodable for BezierPoint<X, Y> where X: Clone + Copy, Y: Spatial + Clone + Copy, Y::Scalar: Float, Y::Scalar: Encodable
[src]

fn encode<__SXY: Encoder>(&self, __arg_0: &mut __SXY) -> Result<(), __SXY::Error>

impl<X: Copy, Y: Copy> Copy for BezierPoint<X, Y> where X: Clone + Copy, Y: Spatial + Clone + Copy, Y::Scalar: Float, Y::Scalar: Copy
[src]

impl<X: Clone, Y: Clone> Clone for BezierPoint<X, Y> where X: Clone + Copy, Y: Spatial + Clone + Copy, Y::Scalar: Float, Y::Scalar: Clone
[src]

fn clone(&self) -> BezierPoint<X, Y>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl<X: Debug, Y: Debug> Debug for BezierPoint<X, Y> where X: Clone + Copy, Y: Spatial + Clone + Copy, Y::Scalar: Float, Y::Scalar: Debug
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<X, Y> Point<X, Y> for BezierPoint<X, Y> where X: NumCast + Clone + Copy, Y: NumCast + Spatial + Clone + Copy, Y::Scalar: Float
[src]

fn x_to_scalar(x: X) -> Y::Scalar

Convert X to Y's Scalar.

fn x(&self) -> X

X (often associated with time).

fn y(&self) -> Y

Y (often associated with some value).

fn interpolate(x: X, start: &Self, end: &Self) -> Y where X: PartialEq, Y: PartialEq

Interpolate between two points and return y for the given x.