Struct ultraviolet::mat::DMat2 [−][src]
Expand description
A 2x2 square matrix.
Useful for performing linear transformations (rotation, scaling) on 2d vectors.
Fields
cols: [DVec2; 2]Implementations
impl DMat2[src]
impl DMat2[src]pub const fn new(col1: DVec2, col2: DVec2) -> Self[src]
pub fn identity() -> Self[src]
pub fn into_homogeneous(self) -> DMat3[src]
pub fn into_homogeneous(self) -> DMat3[src]Turn this into a homogeneous 2d transformation matrix.
pub fn transpose(&mut self)[src]
pub fn transposed(&self) -> Self[src]
pub fn determinant(&self) -> f64[src]
pub fn adjugate(&self) -> Self[src]
pub fn adjugate(&self) -> Self[src]The adjugate of this matrix, i.e. the transpose of the cofactor matrix.
This is equivalent to the inverse but without dividing by the determinant of the matrix, which can be useful in some contexts for better performance.
One such case is when this matrix is interpreted as a a homogeneous transformation matrix, in which case uniform scaling will not affect the resulting projected 3d version of transformed points or vectors.
pub fn inverse(&mut self)[src]
pub fn inverse(&mut self)[src]If this matrix is not currently invertable, this function will return an invalid inverse. This status is not checked by the library.
pub fn inversed(&self) -> Self[src]
pub fn inversed(&self) -> Self[src]If this matrix is not currently invertable, this function will return an invalid inverse. This status is not checked by the library.
pub fn layout() -> Layout[src]
pub fn as_array(&self) -> &[f64; 4][src]
pub fn as_component_array(&self) -> &[DVec2; 2][src]
pub fn as_slice(&self) -> &[f64][src]
pub fn as_component_slice(&self) -> &[DVec2][src]
pub fn as_byte_slice(&self) -> &[u8][src]
pub fn as_mut_slice(&mut self) -> &mut [f64][src]
pub fn as_mut_component_slice(&mut self) -> &mut [DVec2][src]
pub fn as_mut_byte_slice(&mut self) -> &mut [u8][src]
pub const fn as_ptr(&self) -> *const f64[src]
pub const fn as_ptr(&self) -> *const f64[src]Returns a constant unsafe pointer to the underlying data in the underlying type. This function is safe because all types here are repr(C) and can be represented as their underlying type.
Safety
It is up to the caller to correctly use this pointer and its bounds.
pub fn as_mut_ptr(&mut self) -> *mut f64[src]
pub fn as_mut_ptr(&mut self) -> *mut f64[src]Returns a mutable unsafe pointer to the underlying data in the underlying type. This function is safe because all types here are repr(C) and can be represented as their underlying type.
Safety
It is up to the caller to correctly use this pointer and its bounds.
Trait Implementations
impl AddAssign<DMat2> for DMat2[src]
impl AddAssign<DMat2> for DMat2[src]fn add_assign(&mut self, rhs: DMat2)[src]
fn add_assign(&mut self, rhs: DMat2)[src]Performs the += operation. Read more
impl<'de> Deserialize<'de> for DMat2[src]
impl<'de> Deserialize<'de> for DMat2[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
impl From<ColumnMatrix2<f64>> for DMat2[src]
impl From<ColumnMatrix2<f64>> for DMat2[src]fn from(v: ColumnMatrix2<f64>) -> Self[src]
fn from(v: ColumnMatrix2<f64>) -> Self[src]Performs the conversion.
impl Copy for DMat2[src]
impl Pod for DMat2[src]
impl StructuralPartialEq for DMat2[src]
Auto Trait Implementations
impl RefUnwindSafe for DMat2
impl Send for DMat2
impl Sync for DMat2
impl Unpin for DMat2
impl UnwindSafe for DMat2
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,