Struct suzy::platform::opengl::Mat4 [−][src]
A 4x4 matrix used for vertex transformations.
Components are stored in column-major order.
Implementations
impl Mat4
[src]
pub const fn identity() -> Self
[src]
The identity matrix.
pub const fn translate(x: f32, y: f32) -> Self
[src]
Create a translation matrix with the given offsets.
pub const fn scale(x: f32, y: f32) -> Self
[src]
Create a scaling matrix with the given multipliers.
pub fn rotate(radians: f32) -> Self
[src]
Create a rotation matrix that rotates a 2D element around the given angle (in radians).
Trait Implementations
impl AsRef<[f32; 16]> for Mat4
[src]
impl Clone for Mat4
[src]
impl Copy for Mat4
[src]
impl Debug for Mat4
[src]
impl Default for Mat4
[src]
impl From<[f32; 16]> for Mat4
[src]
impl<I, J> Index<(I, J)> for Mat4 where
I: Into<usize>,
J: Into<usize>,
[src]
I: Into<usize>,
J: Into<usize>,
impl<I, J> IndexMut<(I, J)> for Mat4 where
I: Into<usize>,
J: Into<usize>,
[src]
I: Into<usize>,
J: Into<usize>,
impl Mul<&'_ (f32, f32, f32, f32)> for &Mat4
[src]
type Output = (f32, f32, f32, f32)
The resulting type after applying the *
operator.
fn mul(self, rhs: &(f32, f32, f32, f32)) -> (f32, f32, f32, f32)
[src]
impl Mul<&'_ (f32, f32, f32, f32)> for Mat4
[src]
type Output = (f32, f32, f32, f32)
The resulting type after applying the *
operator.
fn mul(self, rhs: &(f32, f32, f32, f32)) -> (f32, f32, f32, f32)
[src]
impl Mul<&'_ Mat4> for &Mat4
[src]
type Output = Mat4
The resulting type after applying the *
operator.
fn mul(self, rhs: &Mat4) -> Mat4
[src]
impl Mul<&'_ Mat4> for Mat4
[src]
type Output = Mat4
The resulting type after applying the *
operator.
fn mul(self, rhs: &Mat4) -> Mat4
[src]
impl Mul<(f32, f32, f32, f32)> for &Mat4
[src]
type Output = (f32, f32, f32, f32)
The resulting type after applying the *
operator.
fn mul(self, rhs: (f32, f32, f32, f32)) -> (f32, f32, f32, f32)
[src]
impl Mul<(f32, f32, f32, f32)> for Mat4
[src]
type Output = (f32, f32, f32, f32)
The resulting type after applying the *
operator.
fn mul(self, rhs: (f32, f32, f32, f32)) -> (f32, f32, f32, f32)
[src]
impl Mul<Mat4> for Mat4
[src]
type Output = Mat4
The resulting type after applying the *
operator.
fn mul(self, rhs: Mat4) -> Mat4
[src]
impl Mul<Mat4> for &Mat4
[src]
type Output = Mat4
The resulting type after applying the *
operator.
fn mul(self, rhs: Mat4) -> Mat4
[src]
impl MulAssign<&'_ Mat4> for Mat4
[src]
fn mul_assign(&mut self, rhs: &Mat4)
[src]
impl MulAssign<Mat4> for Mat4
[src]
fn mul_assign(&mut self, rhs: Mat4)
[src]
impl PartialEq<Mat4> for Mat4
[src]
impl StructuralPartialEq for Mat4
[src]
Auto Trait Implementations
impl RefUnwindSafe for Mat4
impl Send for Mat4
impl Sync for Mat4
impl Unpin for Mat4
impl UnwindSafe for Mat4
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>,