pub struct PerspectiveMatrix {
pub data: [[f64; 3]; 3],
}Expand description
A 3×3 homogeneous perspective (projective) transform matrix stored in row-major order.
The matrix maps homogeneous image coordinates (x, y, 1)ᵀ to new
coordinates via (x', y', w')ᵀ = M · (x, y, 1)ᵀ. The Cartesian result
is (x'/w', y'/w').
Fields§
§data: [[f64; 3]; 3]Row-major 3×3 elements: [[a,b,c],[d,e,f],[g,h,i]].
Implementations§
Source§impl PerspectiveMatrix
impl PerspectiveMatrix
Sourcepub fn from_array(m: [f64; 9]) -> Self
pub fn from_array(m: [f64; 9]) -> Self
Create from a flat row-major array of 9 elements.
Trait Implementations§
Source§impl Clone for PerspectiveMatrix
impl Clone for PerspectiveMatrix
Source§fn clone(&self) -> PerspectiveMatrix
fn clone(&self) -> PerspectiveMatrix
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PerspectiveMatrix
impl Debug for PerspectiveMatrix
Source§impl Default for PerspectiveMatrix
impl Default for PerspectiveMatrix
impl Copy for PerspectiveMatrix
Auto Trait Implementations§
impl Freeze for PerspectiveMatrix
impl RefUnwindSafe for PerspectiveMatrix
impl Send for PerspectiveMatrix
impl Sync for PerspectiveMatrix
impl Unpin for PerspectiveMatrix
impl UnsafeUnpin for PerspectiveMatrix
impl UnwindSafe for PerspectiveMatrix
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 more