[][src]Trait nannou::prelude::Transform

pub trait Transform<P> where
    P: EuclideanSpace
{ fn one() -> Self;
fn look_at(eye: P, center: P, up: <P as EuclideanSpace>::Diff) -> Self;
fn transform_vector(
        &self,
        vec: <P as EuclideanSpace>::Diff
    ) -> <P as EuclideanSpace>::Diff;
fn transform_point(&self, point: P) -> P;
fn concat(&self, other: &Self) -> Self;
fn inverse_transform(&self) -> Option<Self>; fn inverse_transform_vector(
        &self,
        vec: <P as EuclideanSpace>::Diff
    ) -> Option<<P as EuclideanSpace>::Diff> { ... }
fn concat_self(&mut self, other: &Self) { ... } }

A trait representing an affine transformation that can be applied to points or vectors. An affine transformation is one which

Required methods

fn one() -> Self

Create an identity transformation. That is, a transformation which does nothing.

fn look_at(eye: P, center: P, up: <P as EuclideanSpace>::Diff) -> Self

Create a transformation that rotates a vector to look at center from eye, using up for orientation.

fn transform_vector(
    &self,
    vec: <P as EuclideanSpace>::Diff
) -> <P as EuclideanSpace>::Diff

Transform a vector using this transform.

fn transform_point(&self, point: P) -> P

Transform a point using this transform.

fn concat(&self, other: &Self) -> Self

Combine this transform with another, yielding a new transformation which has the effects of both.

fn inverse_transform(&self) -> Option<Self>

Create a transform that "un-does" this one.

Loading content...

Provided methods

fn inverse_transform_vector(
    &self,
    vec: <P as EuclideanSpace>::Diff
) -> Option<<P as EuclideanSpace>::Diff>

Inverse transform a vector using this transform

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

Combine this transform with another, in-place.

Loading content...

Implementors

impl<P, R> Transform<P> for Decomposed<<P as EuclideanSpace>::Diff, R> where
    P: EuclideanSpace,
    R: Rotation<P>,
    <P as EuclideanSpace>::Scalar: BaseFloat,
    <P as EuclideanSpace>::Diff: VectorSpace
[src]

fn concat_self(&mut self, other: &Self)[src]

impl<S> Transform<Vector3<S>> for Transform<S> where
    S: BaseFloat
[src]

fn concat_self(&mut self, other: &Self)[src]

impl<S> Transform<Point2<S>> for Matrix3<S> where
    S: BaseFloat
[src]

fn inverse_transform_vector(
    &self,
    vec: <P as EuclideanSpace>::Diff
) -> Option<<P as EuclideanSpace>::Diff>
[src]

fn concat_self(&mut self, other: &Self)[src]

impl<S> Transform<Point3<S>> for Matrix3<S> where
    S: BaseFloat
[src]

fn inverse_transform_vector(
    &self,
    vec: <P as EuclideanSpace>::Diff
) -> Option<<P as EuclideanSpace>::Diff>
[src]

fn concat_self(&mut self, other: &Self)[src]

impl<S> Transform<Point3<S>> for Matrix4<S> where
    S: BaseFloat
[src]

fn inverse_transform_vector(
    &self,
    vec: <P as EuclideanSpace>::Diff
) -> Option<<P as EuclideanSpace>::Diff>
[src]

fn concat_self(&mut self, other: &Self)[src]

Loading content...