Alignable

Trait Alignable 

Source
pub trait Alignable: Clone {
    // Required methods
    fn is_aligned(&self, other: &Self) -> bool;
    fn align_with(&mut self, other: &mut Self);
}
Expand description

A trait for aligning two items

Alignment is actually the meaning of preparation for interpolation.

For example, if we want to interpolate two VItems, we need to align all their inner components like ComponentVec<VPoint> to the same length.

Required Methods§

Source

fn is_aligned(&self, other: &Self) -> bool

Checking if two items are aligned

Source

fn align_with(&mut self, other: &mut Self)

Aligning two items

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Alignable for DVec3

Source§

fn align_with(&mut self, _other: &mut Self)

Source§

fn is_aligned(&self, _other: &Self) -> bool

Source§

impl<T: Opacity + Alignable + Clone> Alignable for Vec<T>

Source§

fn is_aligned(&self, other: &Self) -> bool

Source§

fn align_with(&mut self, other: &mut Self)

Implementors§