[−][src]Struct semeion::math::transform::Transform
The transformation matrix for 2 dimensions.
Implementations
impl Transform
[src]
pub fn identity() -> Self
[src]
Constructs the identity matrix.
pub fn zero() -> Self
[src]
Constructs a transformation matrix where all the elements are equal to zero.
pub fn translate(translation: impl Into<Vector>) -> Self
[src]
Constructs a translation transformation and specifies the displacements in the direction of the x-axis and y-axis.
pub fn translation(&self) -> Vector
[src]
Gets the translation vector.
pub fn scale(scale: impl Into<Vector>) -> Self
[src]
Constructs a scale transformation that has the specified scale factors and the origin as center point.
pub fn scale_around(
scale: impl Into<Vector>,
center: impl Into<Coordinate>
) -> Self
[src]
scale: impl Into<Vector>,
center: impl Into<Coordinate>
) -> Self
Constructs a scale transformation that has the specified scale factors and the given center point.
pub fn scaling(&self) -> Vector
[src]
Gets the scaling vector.
pub fn rotate(angle: f32) -> Self
[src]
Constructs a rotation transformation with the given angle in degrees around the origin.
pub fn rotate_around(angle: f32, center: impl Into<Coordinate>) -> Self
[src]
Constructs a rotation transformation with the given angle in degrees and the given center point.
pub fn rotation(&self) -> f32
[src]
Gets the rotation angle in degrees.
pub fn transpose(&self) -> Self
[src]
Gets the transpose of this matrix.
pub fn to_row_matrix4(&self) -> [[f32; 4]; 4]
[src]
Gets the 4x4 row matrix representation of this transformation matrix.
pub fn to_column_matrix4(&self) -> [[f32; 4]; 4]
[src]
Gets the 4x4 column matrix representation of this transformation matrix.
Trait Implementations
impl Add<Transform> for Transform
[src]
type Output = Self
The resulting type after applying the +
operator.
pub fn add(self, other: Self) -> Self
[src]
impl AddAssign<Transform> for Transform
[src]
pub fn add_assign(&mut self, other: Self)
[src]
impl Clone for Transform
[src]
impl Copy for Transform
[src]
impl Debug for Transform
[src]
impl Default for Transform
[src]
impl Deref for Transform
[src]
type Target = [[f32; 3]; 3]
The resulting type after dereferencing.
pub fn deref(&self) -> &Self::Target
[src]
impl DerefMut for Transform
[src]
impl From<[[f32; 3]; 3]> for Transform
[src]
impl From<Transform> for [[f32; 3]; 3]
[src]
impl Mul<Point<f32>> for Transform
[src]
type Output = Vector
The resulting type after applying the *
operator.
pub fn mul(self, other: Vector) -> Vector
[src]
impl Mul<Transform> for Transform
[src]
type Output = Self
The resulting type after applying the *
operator.
pub fn mul(self, other: Self) -> Self
[src]
impl Mul<f32> for Transform
[src]
type Output = Self
The resulting type after applying the *
operator.
pub fn mul(self, other: f32) -> Self
[src]
impl MulAssign<Transform> for Transform
[src]
pub fn mul_assign(&mut self, other: Self)
[src]
impl MulAssign<f32> for Transform
[src]
pub fn mul_assign(&mut self, other: f32)
[src]
impl PartialEq<Transform> for Transform
[src]
impl StructuralPartialEq for Transform
[src]
impl Sub<Transform> for Transform
[src]
type Output = Self
The resulting type after applying the -
operator.
pub fn sub(self, other: Self) -> Self
[src]
impl SubAssign<Transform> for Transform
[src]
pub fn sub_assign(&mut self, other: Self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
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>,