pub struct TransformationMatrix(/* private fields */);Expand description
A matrix representing a unitary transformation.
Can represent rotations, reflections, or combinations of rotations/reflections.
Implementations§
Source§impl TransformationMatrix
impl TransformationMatrix
Sourcepub fn identity() -> TransformationMatrix
pub fn identity() -> TransformationMatrix
The identity transformation.
Maps any point to itself.
Sourcepub fn rotate(&self, angle: Rotation) -> TransformationMatrix
pub fn rotate(&self, angle: Rotation) -> TransformationMatrix
A rotation matrix rotating by the given Rotation.
Sourcepub fn reflect_vert(&self) -> TransformationMatrix
pub fn reflect_vert(&self) -> TransformationMatrix
A matrix representing a reflection across the x-axis.
Sourcepub fn inverse(&self) -> TransformationMatrix
pub fn inverse(&self) -> TransformationMatrix
The inverse of the transformation matrix.
Trait Implementations§
Source§impl Clone for TransformationMatrix
impl Clone for TransformationMatrix
Source§fn clone(&self) -> TransformationMatrix
fn clone(&self) -> TransformationMatrix
Returns a duplicate 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 Debug for TransformationMatrix
impl Debug for TransformationMatrix
Source§impl Default for TransformationMatrix
impl Default for TransformationMatrix
Source§fn default() -> TransformationMatrix
fn default() -> TransformationMatrix
Returns the “default value” for a type. Read more
Source§impl Deref for TransformationMatrix
impl Deref for TransformationMatrix
Source§impl DerefMut for TransformationMatrix
impl DerefMut for TransformationMatrix
Source§impl<'de> Deserialize<'de> for TransformationMatrix
impl<'de> Deserialize<'de> for TransformationMatrix
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransformationMatrix, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransformationMatrix, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Rotation> for TransformationMatrix
impl From<Rotation> for TransformationMatrix
Source§fn from(value: Rotation) -> TransformationMatrix
fn from(value: Rotation) -> TransformationMatrix
Converts to this type from the input type.
Source§impl Hash for TransformationMatrix
impl Hash for TransformationMatrix
Source§impl Mul<Point> for TransformationMatrix
impl Mul<Point> for TransformationMatrix
Source§impl Mul for TransformationMatrix
impl Mul for TransformationMatrix
Source§type Output = TransformationMatrix
type Output = TransformationMatrix
The resulting type after applying the
* operator.Source§fn mul(self, rhs: TransformationMatrix) -> <TransformationMatrix as Mul>::Output
fn mul(self, rhs: TransformationMatrix) -> <TransformationMatrix as Mul>::Output
Performs the
* operation. Read moreSource§impl PartialEq for TransformationMatrix
impl PartialEq for TransformationMatrix
Source§impl Serialize for TransformationMatrix
impl Serialize for TransformationMatrix
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for TransformationMatrix
impl Eq for TransformationMatrix
impl StructuralPartialEq for TransformationMatrix
Auto Trait Implementations§
impl Freeze for TransformationMatrix
impl RefUnwindSafe for TransformationMatrix
impl Send for TransformationMatrix
impl Sync for TransformationMatrix
impl Unpin for TransformationMatrix
impl UnwindSafe for TransformationMatrix
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].