Enum turbine_reactive::fns::Surface [] [src]

pub enum Surface<T, U> {
    Rect([T; 4]),
    Lerp(Spline<T>, Spline<T>),
    CurvedQuad {
        smooth: Point1<U>,
        ab: Spline<T>,
        cd: Spline<T>,
        ac: Spline<T>,
        bd: Spline<T>,
    },
    Circle(T, Point1<U>),
}

A surface is a function of type [t; 2] -> point.

Variants

Bilinear interpolation between 4 points.

Be careful when using this code, it's not being tested!
0 ----- 1
|       |
|       |
2 ----- 3

Linear interpolation between two splines stored as a, b.

Be careful when using this code, it's not being tested!
a -->-- a2
|       |
|       |
b -->-- b2

Curved quad.

Be careful when using this code, it's not being tested!
a -->-- b
|       |
v       v
|       |
c -->-- d

Fields of CurvedQuad

Smooth factor.

AB spline.

CD spline.

AC spline.

BD spline.

Circle stored as center, radius. In 1D the circle behaves like a sine wave. In 3D the circle is creates in the xy plane at z coordinate.

Trait Implementations

impl<T: Copy, U: Copy> Copy for Surface<T, U>
[src]

impl<T: Clone, U: Clone> Clone for Surface<T, U>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Debug, U: Debug> Debug for Surface<T, U>
[src]

[src]

Formats the value using the given formatter.