[][src]Struct ultraviolet::mat::Wat3

#[repr(C)]
pub struct Wat3 {
    pub cols: [Wec3; 3],
}

Fields

cols: [Wec3; 3]

Methods

impl Wat3[src]

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

pub fn from_scale(scale: f32x4) -> Self[src]

pub fn from_nonuniform_scale(scale: Wec3) -> Self[src]

pub fn identity() -> Self[src]

pub fn from_euler_angles(roll: f32x4, pitch: f32x4, yaw: f32x4) -> 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")

Important: This function assumes a right-handed, y-up coordinate space where:

  • +X axis points right
  • +Y axis points up
  • +Z axis points towards the viewer (i.e. out of the screen)

This means that you may see unexpected behavior when used with OpenGL or DirectX as they use a different coordinate system. You should use the appropriate projection matrix in projection module to fit your use case to remedy this.

pub fn from_rotation_x(angle: f32x4) -> Self[src]

Create a new rotation matrix from a rotation "about the x axis". This is here as a convenience function for users coming from other libraries; it is more proper to think of this as a rotation in the yz plane.

Important: This function assumes a right-handed, y-up coordinate space where:

  • +X axis points right
  • +Y axis points up
  • +Z axis points towards the viewer (i.e. out of the screen)

This means that you may see unexpected behavior when used with OpenGL or DirectX as they use a different coordinate system. You should use the appropriate projection matrix in projection module to fit your use case to remedy this.

pub fn from_rotation_y(angle: f32x4) -> Self[src]

Create a new rotation matrix from a rotation "about the y axis". This is here as a convenience function for users coming from other libraries; it is more proper to think of this as a rotation in the xz plane.

Important: This function assumes a right-handed, y-up coordinate space where:

  • +X axis points right
  • +Y axis points up
  • +Z axis points towards the viewer (i.e. out of the screen)

This means that you may see unexpected behavior when used with OpenGL or DirectX as they use a different coordinate system. You should use the appropriate projection matrix in projection module to fit your use case to remedy this.

pub fn from_rotation_z(angle: f32x4) -> Self[src]

Create a new rotation matrix from a rotation "about the z axis". This is here as a convenience function for users coming from other libraries; it is more proper to think of this as a rotation in the xy plane.

Important: This function assumes a right-handed, y-up coordinate space where:

  • +X axis points right
  • +Y axis points up
  • +Z axis points towards the viewer (i.e. out of the screen)

This means that you may see unexpected behavior when used with OpenGL or DirectX as they use a different coordinate system. You should use the appropriate projection matrix in projection module to fit your use case to remedy this.

pub fn from_angle_plane(planeangle: WBivec3) -> Self[src]

Construct a rotation matrix given a bivector which defines a plane, rotation orientation, and rotation angle. The bivector defines the plane and orientation, and its magnitude defines the angle of rotation in radians.

This is the equivalent of an axis-angle rotation.

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

pub fn layout() -> Layout[src]

Trait Implementations

impl From<WRotor3> for Wat3[src]

impl Clone for Wat3[src]

impl Copy for Wat3[src]

impl Debug for Wat3[src]

impl Mul<Wat3> for Wat3[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<Wec3> for Wat3[src]

type Output = Wec3

The resulting type after applying the * operator.

Auto Trait Implementations

impl Send for Wat3

impl Sync for Wat3

impl Unpin for Wat3

impl UnwindSafe for Wat3

impl RefUnwindSafe for Wat3

Blanket Implementations

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 = !

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]