[−][src]Struct vec_arith::mat4::Mat4
Methods
impl Mat4<f32>
[src]
pub fn from_translation(trans: Vec3<f32>) -> Self
[src]
pub fn from_rotation(quat: Quat32) -> Self
[src]
pub fn from_rotation_axis_angle(axis: Vec3<f32>, angle: f32) -> Self
[src]
pub fn from_scale(scale: Vec3<f32>) -> Self
[src]
pub fn from_transform(t: Vec3<f32>, q: Quat32, s: Vec3<f32>) -> Self
[src]
pub fn from_perspective(
y_fov: f32,
aspect: f32,
z_near: f32,
z_far: f32,
z_zero_to_one: bool
) -> Self
[src]
y_fov: f32,
aspect: f32,
z_near: f32,
z_far: f32,
z_zero_to_one: bool
) -> Self
pub fn from_ortho(
left: f32,
right: f32,
bottom: f32,
top: f32,
z_near: f32,
z_far: f32,
z_zero_to_one: bool
) -> Self
[src]
left: f32,
right: f32,
bottom: f32,
top: f32,
z_near: f32,
z_far: f32,
z_zero_to_one: bool
) -> Self
pub fn from_ortho_symmetric(
width: f32,
height: f32,
z_near: f32,
z_far: f32,
z_zero_to_one: bool
) -> Self
[src]
width: f32,
height: f32,
z_near: f32,
z_far: f32,
z_zero_to_one: bool
) -> Self
pub fn rotate(self, axis: Vec3<f32>, angle: f32) -> Self
[src]
pub fn rotate_local(self, axis: Vec3<f32>, angle: f32) -> Self
[src]
pub fn get_scale(&self) -> Vec3<f32>
[src]
pub fn get_rotation(&self) -> Quat32
[src]
pub fn get_rotation_axis_angle(self) -> (Vec3<f32>, f32)
[src]
pub fn normalize3x3(self) -> Self
[src]
impl Mat4<f64>
[src]
pub fn from_translation(trans: Vec3<f64>) -> Self
[src]
pub fn from_rotation(quat: Quat64) -> Self
[src]
pub fn from_rotation_axis_angle(axis: Vec3<f64>, angle: f64) -> Self
[src]
pub fn from_scale(scale: Vec3<f64>) -> Self
[src]
pub fn from_transform(t: Vec3<f64>, q: Quat64, s: Vec3<f64>) -> Self
[src]
pub fn from_perspective(
y_fov: f64,
aspect: f64,
z_near: f64,
z_far: f64,
z_zero_to_one: bool
) -> Self
[src]
y_fov: f64,
aspect: f64,
z_near: f64,
z_far: f64,
z_zero_to_one: bool
) -> Self
pub fn from_ortho(
left: f64,
right: f64,
bottom: f64,
top: f64,
z_near: f64,
z_far: f64,
z_zero_to_one: bool
) -> Self
[src]
left: f64,
right: f64,
bottom: f64,
top: f64,
z_near: f64,
z_far: f64,
z_zero_to_one: bool
) -> Self
pub fn from_ortho_symmetric(
width: f64,
height: f64,
z_near: f64,
z_far: f64,
z_zero_to_one: bool
) -> Self
[src]
width: f64,
height: f64,
z_near: f64,
z_far: f64,
z_zero_to_one: bool
) -> Self
pub fn rotate(self, axis: Vec3<f64>, angle: f64) -> Self
[src]
pub fn rotate_local(self, axis: Vec3<f64>, angle: f64) -> Self
[src]
pub fn get_scale(&self) -> Vec3<f64>
[src]
pub fn get_rotation(&self) -> Quat64
[src]
pub fn get_rotation_axis_angle(self) -> (Vec3<f64>, f64)
[src]
pub fn normalize3x3(self) -> Self
[src]
impl<T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T> + MulAssign + DivAssign + Copy> Mat4<T>
[src]
pub fn mul_component_wise(self, rhs: Self) -> Self
[src]
pub fn div_component_wise(self, rhs: Self) -> Self
[src]
pub fn mul_assign_component_wise(&mut self, rhs: Self)
[src]
pub fn div_assign_component_wise(&mut self, rhs: Self)
[src]
pub fn det(&self) -> T
[src]
pub fn transform(&self, vec: Vec4<T>) -> Vec4<T>
[src]
pub fn transform_pos(&self, vec: Vec3<T>) -> Vec3<T>
[src]
pub fn transform_dir(&self, vec: Vec3<T>) -> Vec3<T>
[src]
pub fn scale(self, scale: Vec3<T>) -> Self
[src]
pub fn scale_local(self, scale: Vec3<T>) -> Self
[src]
pub fn translate(self, t: Vec3<T>) -> Self
[src]
pub fn translate_local(self, t: Vec3<T>) -> Self
[src]
pub fn get_translation(&self) -> Vec3<T>
[src]
Trait Implementations
impl<T: Copy> Copy for Mat4<T>
[src]
impl<T: PartialEq> PartialEq<Mat4<T>> for Mat4<T>
[src]
impl Default for Mat4<f32>
[src]
impl Default for Mat4<f64>
[src]
impl<T: Clone> Clone for Mat4<T>
[src]
fn clone(&self) -> Mat4<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Copy> From<[T; 16]> for Mat4<T>
[src]
impl<T: Copy> From<[[T; 4]; 4]> for Mat4<T>
[src]
impl<T: PartialOrd> PartialOrd<Mat4<T>> for Mat4<T>
[src]
fn partial_cmp(&self, other: &Mat4<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &Mat4<T>) -> bool
[src]
fn le(&self, other: &Mat4<T>) -> bool
[src]
fn gt(&self, other: &Mat4<T>) -> bool
[src]
fn ge(&self, other: &Mat4<T>) -> bool
[src]
impl<T: Debug> Debug for Mat4<T>
[src]
impl<T: Sub<Output = U>, U> Sub<Mat4<T>> for Mat4<T>
[src]
type Output = Mat4<U>
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output
[src]
impl<T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T> + Neg<Output = T> + Copy> Div<Mat4<T>> for Mat4<T>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Self::Output
[src]
impl<T: Add<Output = U>, U> Add<Mat4<T>> for Mat4<T>
[src]
type Output = Mat4<U>
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
impl<T: Add<Output = T> + Mul<Output = T> + Copy> Mul<Mat4<T>> for Mat4<T>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self::Output
[src]
impl<T: Neg<Output = U>, U> Neg for Mat4<T>
[src]
type Output = Mat4<U>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<T: AddAssign> AddAssign<Mat4<T>> for Mat4<T>
[src]
fn add_assign(&mut self, rhs: Self)
[src]
impl<T: SubAssign> SubAssign<Mat4<T>> for Mat4<T>
[src]
fn sub_assign(&mut self, rhs: Self)
[src]
impl<T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T> + Neg<Output = T> + Copy> Not for Mat4<T>
[src]
impl<T> Index<usize> for Mat4<T>
[src]
type Output = Vec4<T>
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
impl<T> IndexMut<usize> for Mat4<T>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &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, 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,