pub struct LoftSurface {
pub curve_a: BezierCurve,
pub curve_b: BezierCurve,
}Expand description
A lofted surface interpolated between two Bezier curves.
For parameter (u, v), the surface point is:
lerp( curve_a.evaluate(u), curve_b.evaluate(u), v ).
Fields§
§curve_a: BezierCurveThe “bottom” profile curve (at v = 0).
curve_b: BezierCurveThe “top” profile curve (at v = 1).
Implementations§
Source§impl LoftSurface
impl LoftSurface
Sourcepub fn new(curve_a: BezierCurve, curve_b: BezierCurve) -> Self
pub fn new(curve_a: BezierCurve, curve_b: BezierCurve) -> Self
Create a new loft surface from two Bezier curves.
Sourcepub fn evaluate(&self, u: f64, v: f64) -> [f64; 3]
pub fn evaluate(&self, u: f64, v: f64) -> [f64; 3]
Evaluate the lofted surface at (u, v) ∈ [0, 1]².
Auto Trait Implementations§
impl Freeze for LoftSurface
impl RefUnwindSafe for LoftSurface
impl Send for LoftSurface
impl Sync for LoftSurface
impl Unpin for LoftSurface
impl UnsafeUnpin for LoftSurface
impl UnwindSafe for LoftSurface
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.