pub struct Matrix4x4 {
pub m: [Float; 16],
}
Fields§
§m: [Float; 16]
Implementations§
Source§impl Matrix4x4
impl Matrix4x4
pub fn new( e0: Float, e1: Float, e2: Float, e3: Float, e4: Float, e5: Float, e6: Float, e7: Float, e8: Float, e9: Float, e10: Float, e11: Float, e12: Float, e13: Float, e14: Float, e15: Float, ) -> Self
pub fn identity() -> Self
pub fn translate(x: Float, y: Float, z: Float) -> Self
pub fn rotate_x(theta: Float) -> Self
pub fn rotate_y(theta: Float) -> Self
pub fn rotate_z(theta: Float) -> Self
pub fn rotate(theta: Float, x: Float, y: Float, z: Float) -> Self
pub fn scale(x: Float, y: Float, z: Float) -> Self
pub fn look_at( ex: Float, ey: Float, ez: Float, lx: Float, ly: Float, lz: Float, ux: Float, uy: Float, uz: Float, ) -> Self
pub fn camera_to_world( ex: Float, ey: Float, ez: Float, lx: Float, ly: Float, lz: Float, ux: Float, uy: Float, uz: Float, ) -> Self
pub fn transpose(&self) -> Self
pub fn inverse(&self) -> Option<Self>
pub fn transform_point(&self, p: &Point3f) -> Point3f
pub fn transform_vector(&self, p: &Vector3f) -> Vector3f
pub fn transform_normal(&self, p: &Normal3f) -> Normal3f
Trait Implementations§
Source§impl From<Matrix4x4> for Quaternion
impl From<Matrix4x4> for Quaternion
impl Copy for Matrix4x4
impl StructuralPartialEq for Matrix4x4
Auto Trait Implementations§
impl Freeze for Matrix4x4
impl RefUnwindSafe for Matrix4x4
impl Send for Matrix4x4
impl Sync for Matrix4x4
impl Unpin for Matrix4x4
impl UnwindSafe for Matrix4x4
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.