Struct libreda_db::prelude::Matrix2dTransform [−][src]
Description of a transformation in the euclidean plane by a 2x2 matrix A
.
Transforming a point p
is computed by the matrix product A*p
.
Implementations
impl<T> Matrix2dTransform<T> where
T: CoordinateType,
[src]
T: CoordinateType,
pub fn new(matrix: Matrix2d<T>) -> Matrix2dTransform<T>
[src]
Create a new transform based on a matrix.
pub fn new_rotation90(angle: Angle) -> Matrix2dTransform<T>
[src]
Create a rotation by an integer multiple of 90 degrees.
pub fn new_scaling(factor: T) -> Matrix2dTransform<T>
[src]
Create a scaling by a factor.
pub fn new_mirror_x() -> Matrix2dTransform<T>
[src]
Mirror at the x-axis.
pub fn new_mirror_y() -> Matrix2dTransform<T>
[src]
Mirror at the y-axis.
pub fn transform_point(&self, p: Point<T>) -> Point<T>
[src]
Apply the transformation to a single point.
pub fn to_matrix2d(&self) -> Matrix2d<T>
[src]
Return the matrix describing this transformation.
pub fn try_invert(&self) -> Option<Matrix2dTransform<T>>
[src]
Get the inverse transformation.
Trait Implementations
impl<T> Clone for Matrix2dTransform<T> where
T: CoordinateType + Clone,
[src]
T: CoordinateType + Clone,
pub fn clone(&self) -> Matrix2dTransform<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Debug for Matrix2dTransform<T> where
T: CoordinateType + Debug,
[src]
T: CoordinateType + Debug,
impl<T> Hash for Matrix2dTransform<T> where
T: CoordinateType + Hash,
[src]
T: CoordinateType + Hash,
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> PartialEq<Matrix2dTransform<T>> for Matrix2dTransform<T> where
T: CoordinateType + PartialEq<T>,
[src]
T: CoordinateType + PartialEq<T>,
pub fn eq(&self, other: &Matrix2dTransform<T>) -> bool
[src]
pub fn ne(&self, other: &Matrix2dTransform<T>) -> bool
[src]
impl<T> StructuralPartialEq for Matrix2dTransform<T> where
T: CoordinateType,
[src]
T: CoordinateType,
Auto Trait Implementations
impl<T> RefUnwindSafe for Matrix2dTransform<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Matrix2dTransform<T> where
T: Send,
T: Send,
impl<T> Sync for Matrix2dTransform<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Matrix2dTransform<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Matrix2dTransform<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,