[][src]Trait webgl_matrix::MulVectorMatrix

pub trait MulVectorMatrix<Matrix> {
    type VectorType;
    fn mul_matrix_left(&self, lhs: &Matrix) -> Self::VectorType;
fn mul_matrix(&self, rhs: &Matrix) -> Self::VectorType; }

Adds matrix operations to vector types.

Associated Types

Loading content...

Required methods

fn mul_matrix_left(&self, lhs: &Matrix) -> Self::VectorType

Interprets self as a column vector and multiplies the given matrix from the left-hand-side, i.e. lhs * self

fn mul_matrix(&self, rhs: &Matrix) -> Self::VectorType

Interprets self as a row vector and multiplies the given matrix from the right-hand-side, i.e. self * rhs

Loading content...

Implementors

impl MulVectorMatrix<[f32; 16]> for Vec3[src]

type VectorType = Vec4

fn mul_matrix_left(&self, lhs: &Mat4) -> Self::VectorType[src]

Interprets self as a column vector with the 4th component equal to 1 and multiplies the given matrix from the left-hand-side, i.e. lhs * [...self, 1.0]

fn mul_matrix(&self, rhs: &Mat4) -> Self::VectorType[src]

Interprets self as a row vector with the 4th component equal to 1 and multiplies the given matrix from the right-hand-side, i.e. [...self, 1.0] * rhs

impl MulVectorMatrix<[f32; 16]> for Vec4[src]

type VectorType = Vec4

impl MulVectorMatrix<[f32; 9]> for Vec3[src]

type VectorType = Vec3

Loading content...