Trait three_d::core::math::Transform [−][src]
pub trait Transform<P>: One where
P: EuclideanSpace, {
fn look_at(eye: P, center: P, up: <P as EuclideanSpace>::Diff) -> Self;
fn look_at_rh(eye: P, center: P, up: <P as EuclideanSpace>::Diff) -> Self;
fn look_at_lh(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) { ... }
}
Expand description
A trait representing an affine transformation that can be applied to points or vectors. An affine transformation is one which
Required methods
fn look_at(eye: P, center: P, up: <P as EuclideanSpace>::Diff) -> Self
fn look_at(eye: P, center: P, up: <P as EuclideanSpace>::Diff) -> Self
Use look_at_rh or look_at_lh
Create a transformation that rotates a vector to look at center
from
eye
, using up
for orientation.
fn look_at_rh(eye: P, center: P, up: <P as EuclideanSpace>::Diff) -> Self
fn look_at_rh(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 look_at_lh(eye: P, center: P, up: <P as EuclideanSpace>::Diff) -> Self
fn look_at_lh(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
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
fn transform_point(&self, point: P) -> P
Transform a point using this transform.
Combine this transform with another, yielding a new transformation which has the effects of both.
fn inverse_transform(&self) -> Option<Self>
fn inverse_transform(&self) -> Option<Self>
Create a transform that “un-does” this one.
Provided methods
fn inverse_transform_vector(
&self,
vec: <P as EuclideanSpace>::Diff
) -> Option<<P as EuclideanSpace>::Diff>
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)
fn concat_self(&mut self, other: &Self)
Combine this transform with another, in-place.
Implementations on Foreign Types
impl<P, R> Transform<P> for Decomposed<<P as EuclideanSpace>::Diff, R> where
P: EuclideanSpace,
R: Rotation<Space = P>,
<P as EuclideanSpace>::Scalar: BaseFloat,
<P as EuclideanSpace>::Diff: VectorSpace,
impl<P, R> Transform<P> for Decomposed<<P as EuclideanSpace>::Diff, R> where
P: EuclideanSpace,
R: Rotation<Space = P>,
<P as EuclideanSpace>::Scalar: BaseFloat,
<P as EuclideanSpace>::Diff: VectorSpace,
pub fn look_at(
eye: P,
center: P,
up: <P as EuclideanSpace>::Diff
) -> Decomposed<<P as EuclideanSpace>::Diff, R>
pub fn look_at(
eye: P,
center: P,
up: <P as EuclideanSpace>::Diff
) -> Decomposed<<P as EuclideanSpace>::Diff, R>
Use look_at_rh or look_at_lh
pub fn look_at_lh(
eye: P,
center: P,
up: <P as EuclideanSpace>::Diff
) -> Decomposed<<P as EuclideanSpace>::Diff, R>
pub fn look_at_rh(
eye: P,
center: P,
up: <P as EuclideanSpace>::Diff
) -> Decomposed<<P as EuclideanSpace>::Diff, R>
pub fn transform_vector(
&self,
vec: <P as EuclideanSpace>::Diff
) -> <P as EuclideanSpace>::Diff
pub fn inverse_transform_vector(
&self,
vec: <P as EuclideanSpace>::Diff
) -> Option<<P as EuclideanSpace>::Diff>
pub fn concat(
&self,
other: &Decomposed<<P as EuclideanSpace>::Diff, R>
) -> Decomposed<<P as EuclideanSpace>::Diff, R>
Use look_at_rh or look_at_lh
Use look_at_rh or look_at_lh
Use look_at_rh or look_at_lh