Struct octoon_math::mat4::Mat4
source · pub struct Mat4<T> {Show 16 fields
pub a1: T,
pub a2: T,
pub a3: T,
pub a4: T,
pub b1: T,
pub b2: T,
pub b3: T,
pub b4: T,
pub c1: T,
pub c2: T,
pub c3: T,
pub c4: T,
pub d1: T,
pub d2: T,
pub d3: T,
pub d4: T,
}
Fields
a1: T
a2: T
a3: T
a4: T
b1: T
b2: T
b3: T
b4: T
c1: T
c2: T
c3: T
c4: T
d1: T
d2: T
d3: T
d4: T
Implementations
sourceimpl<T> Mat4<T>where
T: Vec + Math + PiByC180,
impl<T> Mat4<T>where
T: Vec + Math + PiByC180,
pub fn rotate_x(theta: T) -> Self
pub fn rotate_y(theta: T) -> Self
pub fn rotate_z(theta: T) -> Self
pub fn rotate(axis: Vec3<T>, theta: T) -> Self
pub fn scale(x: T, y: T, z: T) -> Self
pub fn translate(x: T, y: T, z: T) -> Self
pub fn det(&self) -> T
pub fn inverse(&self) -> Self
pub fn transform_inverse(&self) -> Self
pub fn ortho_lh(left: T, right: T, bottom: T, top: T, znear: T, zfar: T) -> Self
pub fn ortho_rh(left: T, right: T, bottom: T, top: T, znear: T, zfar: T) -> Self
pub fn perspective_fov_lh(fov: T, aspect: T, znear: T, zfar: T) -> Self
pub fn perspective_fov_rh(fov: T, aspect: T, znear: T, zfar: T) -> Self
pub fn lookat_lh(eye: Vec3<T>, center: Vec3<T>, up: Vec3<T>) -> Self
pub fn lookat_rh(eye: Vec3<T>, center: Vec3<T>, up: Vec3<T>) -> Self
pub fn as_ptr(&self) -> *const T
pub fn to_array(&self) -> [T; 16]
Trait Implementations
sourceimpl<T> Mul<Mat4<T>> for Vec3<T>where
T: Copy + Add<Output = T> + Div<Output = T> + Mul<Output = T>,
impl<T> Mul<Mat4<T>> for Vec3<T>where
T: Copy + Add<Output = T> + Div<Output = T> + Mul<Output = T>,
sourceimpl<T> Mul<Vec3<T>> for Mat4<T>where
T: Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T>,
impl<T> Mul<Vec3<T>> for Mat4<T>where
T: Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T>,
impl<T: Copy> Copy for Mat4<T>
impl<T: Eq> Eq for Mat4<T>
impl<T> StructuralEq for Mat4<T>
impl<T> StructuralPartialEq for Mat4<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Mat4<T>where
T: RefUnwindSafe,
impl<T> Send for Mat4<T>where
T: Send,
impl<T> Sync for Mat4<T>where
T: Sync,
impl<T> Unpin for Mat4<T>where
T: Unpin,
impl<T> UnwindSafe for Mat4<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more