Struct components::platform::core::MatrixEntry
source · [−]pub struct MatrixEntry {}
Implementations
sourceimpl MatrixEntry
impl MatrixEntry
sourcepub fn calculate_translation(
&self,
other: &MatrixEntry
) -> (bool, f32, f32, f32)
pub fn calculate_translation(
&self,
other: &MatrixEntry
) -> (bool, f32, f32, f32)
Determines if the only difference between two transforms is a
translation and if so returns what the x
, y
, and z
components of
the translation are.
If the difference between the two translations involves anything
other than a translation then the fn returns false
.
other
A second reference transform
x
The destination for the x-component of the translation
y
The destination for the y-component of the translation
z
The destination for the z-component of the translation
Returns
true
if the only difference between the transform of
self
and the transform of other
is a translation,
otherwise false
.
sourcepub fn get(&self) -> (Matrix, Matrix)
pub fn get(&self) -> (Matrix, Matrix)
Resolves the current self
transform into a Matrix
by
combining the sequence of operations that have been applied to
build up the current transform.
There are two possible ways that this fn may return its
result depending on whether it’s possible to directly point
to an internal Matrix
or whether the result needs to be
composed of multiple operations.
If an internal matrix contains the required result then this
fn will directly return a pointer to that matrix, otherwise
if the fn returns None
then matrix
will be initialized
to match the transform of self
.
matrix
will be left untouched if a direct pointer is
returned.
matrix
The potential destination for the transform as a matrix
Returns
A direct pointer to a Matrix
transform or None
and in that case matrix
will be initialized with
the effective transform represented by self
.
sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
Determines whether self
is known to represent an identity
transform.
If this returns true
then the entry is definitely the identity
matrix. If it returns false
it may or may not be the identity
matrix but no expensive comparison is performed to verify it.
Returns
true
if self
is definitely an identity transform,
otherwise false
.
Trait Implementations
sourceimpl Debug for MatrixEntry
impl Debug for MatrixEntry
sourceimpl Ord for MatrixEntry
impl Ord for MatrixEntry
sourceimpl PartialEq<MatrixEntry> for MatrixEntry
impl PartialEq<MatrixEntry> for MatrixEntry
sourceimpl PartialOrd<MatrixEntry> for MatrixEntry
impl PartialOrd<MatrixEntry> for MatrixEntry
sourcefn partial_cmp(&self, other: &MatrixEntry) -> Option<Ordering>
fn partial_cmp(&self, other: &MatrixEntry) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for MatrixEntry
Auto Trait Implementations
impl RefUnwindSafe for MatrixEntry
impl Send for MatrixEntry
impl Sync for MatrixEntry
impl Unpin for MatrixEntry
impl UnwindSafe for MatrixEntry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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<T> Clamp<T> for T where
T: PartialOrd<T>,
impl<T> Clamp<T> for T where
T: PartialOrd<T>,
fn clamped(self, min: T, max: T) -> T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.