[−][src]Struct rg3d_core::math::mat4::Mat4
Fields
f: [f32; 16]Methods
impl Mat4[src]
pub const IDENTITY: Self[src]
pub fn scale(v: Vec3) -> Self[src]
pub fn translate(v: Vec3) -> Self[src]
pub fn ortho(
left: f32,
right: f32,
bottom: f32,
top: f32,
z_near: f32,
z_far: f32
) -> Self[src]
left: f32,
right: f32,
bottom: f32,
top: f32,
z_near: f32,
z_far: f32
) -> Self
pub fn perspective(fov_rad: f32, aspect: f32, z_near: f32, z_far: f32) -> Self[src]
pub fn basis(&self) -> Mat3[src]
pub fn from_quat(q: Quat) -> Self[src]
pub fn look_at(eye: Vec3, at: Vec3, up: Vec3) -> Option<Mat4>[src]
pub fn inverse(&self) -> Result<Mat4, ()>[src]
Returns Ok(inverted_matrix) in case if matrix is invertible, or Err(()) if matrix has determinant == 0 and so not invertible.
pub fn transform_vector(&self, v: Vec3) -> Vec3[src]
pub fn transform_vector_normal(&self, v: Vec3) -> Vec3[src]
pub fn side(&self) -> Vec3[src]
Returns "side" vector from basis. (points right)
pub fn up(&self) -> Vec3[src]
Returns "up" vector from basis.
pub fn look(&self) -> Vec3[src]
Returns "look" vector from basis. (points into screen)
pub fn position(&self) -> Vec3[src]
Returns translation part of matrix.
Trait Implementations
impl Clone for Mat4[src]
impl Copy for Mat4[src]
impl Debug for Mat4[src]
impl Default for Mat4[src]
impl FieldData for Mat4[src]
impl Mul<Mat4> for Mat4[src]
Auto Trait Implementations
impl RefUnwindSafe for Mat4
impl Send for Mat4
impl Sync for Mat4
impl Unpin for Mat4
impl UnwindSafe for Mat4
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &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> 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, 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Visit for T where
T: FieldData + 'static, [src]
T: FieldData + 'static,