Struct vek::bezier::repr_c::CubicBezier2 [] [src]

pub struct CubicBezier2<T>(pub Vec2<T>, pub Vec2<T>, pub Vec2<T>, pub Vec2<T>);

A 2D curve with two control points.

Methods

impl<T: Float> CubicBezier2<T>
[src]

[src]

Evaluates the position of the point lying on the curve at interpolation factor t.

This is one of the most important Bézier curve operations, because, in one way or another, it is used to render a curve to the screen. The common use case is to successively evaluate a curve at a set of values that range from 0 to 1, to approximate the curve as an array of line segments which are then rendered.

[src]

Evaluates the derivative tangent at interpolation factor t, which happens to give a non-normalized tangent vector.

See also normalized_tangent().

[src]

Creates a cubic Bézier curve from a single segment.

[src]

Returns the constant matrix M such that, given T = [1, t*t, t*t*t, t*t*t*t] and P the vector of control points, dot(T * M, P) evalutes the Bezier curve at 't'.

This function name is arguably dubious.

[src]

Splits this cubic Bézier curve into two curves, at interpolation factor t.

impl<T> CubicBezier2<T>
[src]

[src]

Evaluates the normalized tangent at interpolation factor t.

[src]

Approximates the curve's length by subdividing it into step_count+1 segments.

Trait Implementations

impl<T: Debug> Debug for CubicBezier2<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: Default> Default for CubicBezier2<T>
[src]

[src]

Returns the "default value" for a type. Read more

impl<T: Copy> Copy for CubicBezier2<T>
[src]

impl<T: Clone> Clone for CubicBezier2<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Hash> Hash for CubicBezier2<T>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: PartialEq> PartialEq for CubicBezier2<T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<T: Eq> Eq for CubicBezier2<T>
[src]

impl<T> From<Vec4<Vec2<T>>> for CubicBezier2<T>
[src]

[src]

Performs the conversion.