[go: up one dir, main page]

[][src]Struct ultraviolet::mat::Mat3

pub struct Mat3 {
    pub cols: [Vec3; 3],
}

A 3x3 square matrix.

Useful for performing linear transformations (rotation, scaling) on 3d vectors, or for performing arbitrary transformations (linear + translation, projection, etc) on homogeneous 2d vectors

Fields

cols: [Vec3; 3]

Methods

impl Mat3[src]

pub fn new(col1: Vec3, col2: Vec3, col3: Vec3) -> Self[src]

pub fn identity() -> Self[src]

pub fn from_euler_angles(roll: f32, pitch: f32, yaw: f32) -> Self[src]

Angles are applied in the order roll -> pitch -> yaw

  • Yaw is rotation inside the xz plane ("around the y axis")
  • Pitch is rotation inside the yz plane ("around the x axis")
  • Roll is rotation inside the xy plane ("around the z axis")

Trait Implementations

impl From<Rotor3> for Mat3[src]

impl Clone for Mat3[src]

impl Copy for Mat3[src]

impl Debug for Mat3[src]

impl Mul<Mat3> for Mat3[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<Vec3> for Mat3[src]

type Output = Vec3

The resulting type after applying the * operator.

Auto Trait Implementations

impl Send for Mat3

impl Sync for Mat3

impl Unpin for Mat3

impl UnwindSafe for Mat3

impl RefUnwindSafe for Mat3

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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