pub struct TangentFrame {
pub normal: [f64; 3],
pub tangent_u: [f64; 3],
pub tangent_v: [f64; 3],
}Expand description
An orthonormal tangent frame at a surface point.
Fields§
§normal: [f64; 3]Surface normal (unit vector).
tangent_u: [f64; 3]Tangent along u direction (unit vector).
tangent_v: [f64; 3]Tangent along v direction (unit vector, ≈ normal × tangent_u).
Implementations§
Source§impl TangentFrame
impl TangentFrame
Sourcepub fn from_bezier_surface(surf: &BezierSurface, u: f64, v: f64) -> Self
pub fn from_bezier_surface(surf: &BezierSurface, u: f64, v: f64) -> Self
Compute the tangent frame of a BezierSurface at (u, v).
Sourcepub fn from_loft_surface(surf: &LoftSurface, u: f64, v: f64) -> Self
pub fn from_loft_surface(surf: &LoftSurface, u: f64, v: f64) -> Self
Compute the tangent frame of a LoftSurface at (u, v).
Trait Implementations§
Source§impl Clone for TangentFrame
impl Clone for TangentFrame
Source§fn clone(&self) -> TangentFrame
fn clone(&self) -> TangentFrame
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TangentFrame
impl RefUnwindSafe for TangentFrame
impl Send for TangentFrame
impl Sync for TangentFrame
impl Unpin for TangentFrame
impl UnsafeUnpin for TangentFrame
impl UnwindSafe for TangentFrame
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.