[−][src]Struct mini_math::Matrix
A 4x4 matrix, suitable for 3D transformations.
Methods
impl Matrix
[src]
pub fn identity() -> Self
[src]
The identity matrix.
pub fn zero() -> Self
[src]
A matrix composed entirely of zeroes.
pub fn look_at(eye: Point, target: Point, up: Vector) -> Self
[src]
A look-at matrix suitable for positioning a camera.
pub fn perspective(
aspect_ratio: f32,
fov_radians: f32,
znear: f32,
zfar: f32
) -> Self
[src]
aspect_ratio: f32,
fov_radians: f32,
znear: f32,
zfar: f32
) -> Self
A perspective matrix suitable for use as a camera projection.
pub fn translation(v: Vector) -> Self
[src]
A matrix that translates by the given vector.
pub fn rotation_x(angle_radians: f32) -> Self
[src]
A matrix that rotates around the x-axis.
pub fn rotation_y(angle_radians: f32) -> Self
[src]
A matrix that rotates around the y-axis.
pub fn rotation_z(angle_radians: f32) -> Self
[src]
A matrix that rotates around the z-axis.
pub fn uniform_scale(scale: f32) -> Self
[src]
A matrix that scales uniformly in all dimensions.
pub fn transpose(&self) -> Self
[src]
The transpose of this matrix (i.e. this matrix flipped along the diagonal)
pub fn invert(&self) -> Self
[src]
The inverse of this matrix.
Trait Implementations
impl<'_> NearlyEqual for &'_ Matrix
[src]
fn nearly_equals(self, rhs: Self) -> bool
[src]
impl Clone for Matrix
[src]
impl Copy for Matrix
[src]
impl PartialEq<Matrix> for Matrix
[src]
impl Debug for Matrix
[src]
impl<'_> Mul<&'_ Matrix> for Matrix
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: &Matrix) -> Self
[src]
impl Mul<Matrix> for Matrix
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self
[src]
impl Mul<Point> for Matrix
[src]
type Output = Point
The resulting type after applying the *
operator.
fn mul(self, rhs: Point) -> Point
[src]
impl Mul<Vector> for Matrix
[src]
type Output = Vector
The resulting type after applying the *
operator.
fn mul(self, rhs: Vector) -> Vector
[src]
impl StructuralPartialEq for Matrix
[src]
impl AsBytes for Matrix
[src]
fn only_derive_is_allowed_to_implement_this_trait() where
Self: Sized,
[src]
Self: Sized,
fn as_bytes(&self) -> &[u8]
[src]
fn as_bytes_mut(&mut self) -> &mut [u8] where
Self: FromBytes,
[src]
Self: FromBytes,
impl FromBytes for Matrix
[src]
fn only_derive_is_allowed_to_implement_this_trait() where
Self: Sized,
[src]
Self: Sized,
Auto Trait Implementations
impl Send for Matrix
impl Sync for Matrix
impl Unpin for Matrix
impl UnwindSafe for Matrix
impl RefUnwindSafe for Matrix
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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<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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,