pub enum CoordinateSpaceMapping<Src, Dst> {
Local,
ScaleOffset(ScaleOffset),
Transform(Transform3D<f32, Src, Dst>),
}
Expand description
Transformation between two nodes in the spatial tree that can sometimes be encoded more efficiently than with a full matrix.
Variants§
Implementations§
source§impl<Src, Dst> CoordinateSpaceMapping<Src, Dst>
impl<Src, Dst> CoordinateSpaceMapping<Src, Dst>
pub fn into_transform(self) -> Transform3D<f32, Src, Dst>
pub fn into_fast_transform(self) -> FastTransform<Src, Dst>
pub fn is_perspective(&self) -> bool
pub fn is_2d_axis_aligned(&self) -> bool
pub fn is_2d_scale_translation(&self) -> bool
pub fn scale_factors(&self) -> (f32, f32)
pub fn inverse(&self) -> Option<CoordinateSpaceMapping<Dst, Src>>
pub fn as_2d_scale_offset(&self) -> Option<ScaleOffset>
Trait Implementations§
source§impl<Src: Clone, Dst: Clone> Clone for CoordinateSpaceMapping<Src, Dst>
impl<Src: Clone, Dst: Clone> Clone for CoordinateSpaceMapping<Src, Dst>
source§fn clone(&self) -> CoordinateSpaceMapping<Src, Dst>
fn clone(&self) -> CoordinateSpaceMapping<Src, Dst>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Src, Dst> From<CoordinateSpaceMapping<Src, Dst>> for TransformKey
impl<Src, Dst> From<CoordinateSpaceMapping<Src, Dst>> for TransformKey
source§fn from(transform: CoordinateSpaceMapping<Src, Dst>) -> TransformKey
fn from(transform: CoordinateSpaceMapping<Src, Dst>) -> TransformKey
Converts to this type from the input type.
Auto Trait Implementations§
impl<Src, Dst> Freeze for CoordinateSpaceMapping<Src, Dst>
impl<Src, Dst> RefUnwindSafe for CoordinateSpaceMapping<Src, Dst>where
Src: RefUnwindSafe,
Dst: RefUnwindSafe,
impl<Src, Dst> Send for CoordinateSpaceMapping<Src, Dst>
impl<Src, Dst> Sync for CoordinateSpaceMapping<Src, Dst>
impl<Src, Dst> Unpin for CoordinateSpaceMapping<Src, Dst>
impl<Src, Dst> UnwindSafe for CoordinateSpaceMapping<Src, Dst>where
Src: UnwindSafe,
Dst: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more