Struct ultraviolet::mat::Mat2x8[][src]

#[repr(C)]pub struct Mat2x8 {
    pub cols: [Vec2x8; 2],
}

A 2x2 square matrix.

Useful for performing linear transformations (rotation, scaling) on 2d vectors.

Fields

cols: [Vec2x8; 2]

Implementations

impl Mat2x8[src]

pub const fn new(col1: Vec2x8, col2: Vec2x8) -> Self[src]

pub fn identity() -> Self[src]

pub fn into_homogeneous(self) -> Mat3x8[src]

Turn this into a homogeneous 2d transformation matrix.

pub fn transpose(&mut self)[src]

pub fn transposed(&self) -> Self[src]

pub fn determinant(&self) -> f32x8[src]

pub fn adjugate(&self) -> Self[src]

The adjugate of this matrix, i.e. the transpose of the cofactor matrix.

This is equivalent to the inverse but without dividing by the determinant of the matrix, which can be useful in some contexts for better performance.

One such case is when this matrix is interpreted as a a homogeneous transformation matrix, in which case uniform scaling will not affect the resulting projected 3d version of transformed points or vectors.

pub fn inverse(&mut self)[src]

If this matrix is not currently invertable, this function will return an invalid inverse. This status is not checked by the library.

pub fn inversed(&self) -> Self[src]

If this matrix is not currently invertable, this function will return an invalid inverse. This status is not checked by the library.

pub fn layout() -> Layout[src]

pub fn as_array(&self) -> &[f32x8; 4][src]

pub fn as_component_array(&self) -> &[Vec2x8; 2][src]

pub fn as_slice(&self) -> &[f32x8][src]

pub fn as_component_slice(&self) -> &[Vec2x8][src]

pub fn as_byte_slice(&self) -> &[u8][src]

pub fn as_mut_slice(&mut self) -> &mut [f32x8][src]

pub fn as_mut_component_slice(&mut self) -> &mut [Vec2x8][src]

pub fn as_mut_byte_slice(&mut self) -> &mut [u8][src]

pub const fn as_ptr(&self) -> *const f32x8[src]

Returns a constant unsafe pointer to the underlying data in the underlying type. This function is safe because all types here are repr(C) and can be represented as their underlying type.

Safety

It is up to the caller to correctly use this pointer and its bounds.

pub fn as_mut_ptr(&mut self) -> *mut f32x8[src]

Returns a mutable unsafe pointer to the underlying data in the underlying type. This function is safe because all types here are repr(C) and can be represented as their underlying type.

Safety

It is up to the caller to correctly use this pointer and its bounds.

Trait Implementations

impl Add<Mat2x8> for Mat2x8[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Mat2x8> for Mat2x8[src]

impl Clone for Mat2x8[src]

impl Copy for Mat2x8[src]

impl Debug for Mat2x8[src]

impl Default for Mat2x8[src]

impl From<&'_ [f32x8; 4]> for Mat2x8[src]

impl From<[[f32x8; 2]; 2]> for Mat2x8[src]

impl From<[f32x8; 4]> for Mat2x8[src]

impl From<Rotor2x8> for Mat2x8[src]

impl Index<usize> for Mat2x8[src]

type Output = Vec2x8

The returned type after indexing.

impl IndexMut<usize> for Mat2x8[src]

impl Mul<Mat2x8> for Mat2x8[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<Mat2x8> for f32x8[src]

type Output = Mat2x8

The resulting type after applying the * operator.

impl Mul<Vec2x8> for Mat2x8[src]

type Output = Vec2x8

The resulting type after applying the * operator.

impl Mul<f32x8> for Mat2x8[src]

type Output = Mat2x8

The resulting type after applying the * operator.

impl PartialEq<Mat2x8> for Mat2x8[src]

impl StructuralPartialEq for Mat2x8[src]

Auto Trait Implementations

impl RefUnwindSafe for Mat2x8

impl Send for Mat2x8

impl Sync for Mat2x8

impl Unpin for Mat2x8

impl UnwindSafe for Mat2x8

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.