pub struct TangentSpace { /* private fields */ }
Expand description
Wraps the relevant results generated when calculating the tangent space for a particular vertex on a particular face.
Typically, you will call tangent
to retrieve the
tangent value.
Implementations§
Source§impl TangentSpace
impl TangentSpace
Sourcepub const fn bi_tangent(&self) -> [f32; 3]
pub const fn bi_tangent(&self) -> [f32; 3]
Returns the normalized bi-tangent as an [x, y, z]
array.
Sourcepub const fn tangent_magnitude(&self) -> f32
pub const fn tangent_magnitude(&self) -> f32
Returns the magnitude of the tangent.
Sourcepub const fn bi_tangent_magnitude(&self) -> f32
pub const fn bi_tangent_magnitude(&self) -> f32
Returns the magnitude of the bi-tangent.
Sourcepub const fn is_orientation_preserving(&self) -> bool
pub const fn is_orientation_preserving(&self) -> bool
Indicates if this generated tangent preserves the original orientation of the face.
Sourcepub const fn tangent_encoded(&self) -> [f32; 4]
pub const fn tangent_encoded(&self) -> [f32; 4]
Returns an encoded summary of the tangent and bi-tangent as an [x, y, z, w]
array.
Trait Implementations§
Source§impl Clone for TangentSpace
impl Clone for TangentSpace
Source§fn clone(&self) -> TangentSpace
fn clone(&self) -> TangentSpace
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 moreSource§impl Default for TangentSpace
impl Default for TangentSpace
Source§impl PartialEq for TangentSpace
impl PartialEq for TangentSpace
impl Copy for TangentSpace
impl StructuralPartialEq for TangentSpace
Auto Trait Implementations§
impl Freeze for TangentSpace
impl RefUnwindSafe for TangentSpace
impl Send for TangentSpace
impl Sync for TangentSpace
impl Unpin for TangentSpace
impl UnwindSafe for TangentSpace
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