pub struct MatrixEntry(/* private fields */);
Implementations§
Source§impl 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 function 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 function 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
function will directly return a pointer to that matrix, otherwise
if the function returns None
then matrix
will be initialized
to match the transform of self
.
<note>``matrix
will be left untouched if a direct pointer is
returned.</note>
§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§
Source§impl Clone for MatrixEntry
impl Clone for MatrixEntry
Source§fn clone(&self) -> MatrixEntry
fn clone(&self) -> MatrixEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MatrixEntry
impl Debug for MatrixEntry
Source§impl Ord for MatrixEntry
impl Ord for MatrixEntry
Source§fn cmp(&self, other: &MatrixEntry) -> Ordering
fn cmp(&self, other: &MatrixEntry) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MatrixEntry
impl PartialEq for MatrixEntry
Source§impl PartialOrd for MatrixEntry
impl PartialOrd for MatrixEntry
Source§impl StaticType for MatrixEntry
impl StaticType for MatrixEntry
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.