Trait vecmat::transform::Transform[][src]

pub trait Transform<T> {
    fn identity() -> Self;
fn inv(self) -> Self;
fn apply(&self, pos: T) -> T;
fn deriv(&self, pos: T, dir: T) -> T;
fn chain(self, other: Self) -> Self; }

General tansformation trait.

It’s assumed that transfomation is a group.

Required methods

fn identity() -> Self[src]

Identity transformation.

fn inv(self) -> Self[src]

Inverse transformation.

fn apply(&self, pos: T) -> T[src]

Perform the transformation itself.

fn deriv(&self, pos: T, dir: T) -> T[src]

Find transformation directional derivative at specified point.

fn chain(self, other: Self) -> Self[src]

Chain two transformations into a new one.

C = A.chain(B) means that C(x) = A(B(x)).

Loading content...

Implementors

impl<A, B, T> Transform<T> for Chain<A, B, T> where
    A: Transform<T> + Reorder<B, T>,
    B: Transform<T> + Reorder<A, T>,
    T: Copy
[src]

fn identity() -> Self[src]

fn inv(self) -> Self[src]

fn apply(&self, pos: T) -> T[src]

fn deriv(&self, pos: T, dir: T) -> T[src]

fn chain(self, other: Self) -> Self[src]

impl<T> Transform<Complex<T>> for Moebius<Complex<T>> where
    T: Neg<Output = T> + Num + Copy
[src]

fn identity() -> Self[src]

fn inv(self) -> Self[src]

fn apply(&self, pos: Complex<T>) -> Complex<T>[src]

fn deriv(&self, pos: Complex<T>, dir: Complex<T>) -> Complex<T>[src]

fn chain(self, other: Self) -> Self[src]

impl<T> Transform<Quaternion<T>> for Moebius<Complex<T>> where
    T: Neg<Output = T> + Num + NumCast + Copy
[src]

fn identity() -> Self[src]

fn inv(self) -> Self[src]

fn apply(&self, pos: Quaternion<T>) -> Quaternion<T>[src]

fn deriv(&self, pos: Quaternion<T>, dir: Quaternion<T>) -> Quaternion<T>[src]

fn chain(self, other: Self) -> Self[src]

impl<T> Transform<Vector<T, 2_usize>> for Rotation2<T> where
    T: Neg<Output = T> + Num + Copy
[src]

fn identity() -> Self[src]

fn inv(self) -> Self[src]

fn apply(&self, pos: Vector<T, 2>) -> Vector<T, 2>[src]

fn deriv(&self, _pos: Vector<T, 2>, dir: Vector<T, 2>) -> Vector<T, 2>[src]

fn chain(self, other: Self) -> Self[src]

impl<T> Transform<Vector<T, 3_usize>> for Rotation3<T> where
    T: Neg<Output = T> + Num + Copy
[src]

fn identity() -> Self[src]

fn inv(self) -> Self[src]

fn apply(&self, pos: Vector<T, 3>) -> Vector<T, 3>[src]

fn deriv(&self, _pos: Vector<T, 3>, dir: Vector<T, 3>) -> Vector<T, 3>[src]

fn chain(self, other: Self) -> Self[src]

impl<T, const N: usize> Transform<Vector<T, N>> for Linear<T, N> where
    T: Neg<Output = T> + Num + Copy
[src]

fn identity() -> Self[src]

fn inv(self) -> Self[src]

fn apply(&self, pos: Vector<T, N>) -> Vector<T, N>[src]

fn deriv(&self, _pos: Vector<T, N>, dir: Vector<T, N>) -> Vector<T, N>[src]

fn chain(self, other: Self) -> Self[src]

impl<T, const N: usize> Transform<Vector<T, N>> for Scale<T> where
    T: Num + Inv<Output = T> + Copy
[src]

fn identity() -> Self[src]

fn inv(self) -> Self[src]

fn apply(&self, pos: Vector<T, N>) -> Vector<T, N>[src]

fn deriv(&self, _pos: Vector<T, N>, dir: Vector<T, N>) -> Vector<T, N>[src]

fn chain(self, other: Self) -> Self[src]

impl<T, const N: usize> Transform<Vector<T, N>> for Shift<T, N> where
    T: Neg<Output = T> + Num + Copy
[src]

fn identity() -> Self[src]

fn inv(self) -> Self[src]

fn apply(&self, pos: Vector<T, N>) -> Vector<T, N>[src]

fn deriv(&self, _pos: Vector<T, N>, dir: Vector<T, N>) -> Vector<T, N>[src]

fn chain(self, other: Self) -> Self[src]

Loading content...