pub struct Transform { /* private fields */ }
Expand description
A Transform, when applied, modifies a mesh. When applied to a rule, it transforms all the meshes that rule eventually expands to. Transforms may be translations, scales, rotations, etc.
It may be helpful to think of transforms to rules as transforming the space in which the rule or mesh is evaluated. For example this rule will translate a cube 4.0 on the x axis in our root frame of reference:
let our_translated_cube = Rule::new().push(Tf::tx(4.0), cube());
This rule will translate a cube -4.0 on the x axis in our root frame of reference:
let containing_rule = Rule::new().push(Tf::ry(180.0), our_translated_cube);
This rule will translate a half-sized cube 2.0 on the x axis in our root frame of reference.
let containing_rule = Rule::new().push(Tf::s(0.5), our_translated_cube)
Implementations
Trait Implementations
sourceimpl From<Transform> for TransformArgument
impl From<Transform> for TransformArgument
A single transform will correspond to one invocation.
impl Copy for Transform
Auto Trait Implementations
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
Blanket Implementations
sourceimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
sourcefn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method Read more
sourcefn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default Read more
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.