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
Rect([T; 4])
Bilinear interpolation between 4 points.
⚠Be careful when using this code, it's not being tested!
0 ----- 1 | | | | 2 ----- 3
Lerp(Spline<T>, Spline<T>)
Linear interpolation between two splines stored as a, b
.
⚠Be careful when using this code, it's not being tested!
a -->-- a2 | | | | b -->-- b2
CurvedQuad
Curved quad.
⚠Be careful when using this code, it's not being tested!
a -->-- b | | v v | | c -->-- d
Fields of CurvedQuad
smooth: Point1<U> | Smooth factor. |
ab: Spline<T> | AB spline. |
cd: Spline<T> | CD spline. |
ac: Spline<T> | AC spline. |
bd: Spline<T> | BD spline. |
Circle(T, Point1<U>)
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]
fn clone(&self) -> Surface<T, U>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more