Struct polystrip::vertex::Matrix4 [−][src]
A 4 x 4 column major matrix in screen space
Implementations
impl Matrix4
[src]
pub fn identity() -> Matrix4
[src]
Returns the identity matrix.
pub fn translate(v: Vector2) -> Matrix4
[src]
Returns a matrix that translates by the given X and Y values, in screen space
pub fn rotate(r: f32) -> Matrix4
[src]
Returns a matrix that rotates the XY plane counterclockwise about the origin by the given angle.
Interprets the angle to be in radians.
pub fn scale(f: f32) -> Matrix4
[src]
Returns a matrix that scales the XY plane by the given factor
pub fn scale_nonuniform(x: f32, y: f32) -> Matrix4
[src]
Returns a matrix that scales the X coordinate by the given factor and the Y coordinate by the given factor.
pub fn perspective(fovy: f32, aspect: f32, near: f32, far: f32) -> Matrix4
[src]
Returns a simple perspective matrix from the four passed parameters. Equivalent to the
gluPerspective
function in OpenGL.
See also RendererBuilder::real_3d
Parameters
fovy
: The angle of the field of view up and down, in radians. Must be nonzero and cannot be a multiple of tau (2π)aspect
: The ratio of screen width to screen height. Should be updated when the window is resized. Must be nonzero.near
: Distance from the camera to the near clipping plane, in screen-space coordinates.far
: Distance from the camera to the far clipping plane, in screen-space coordinates. Must not be equal tonear
.
pub fn row(&self, i: usize) -> [f32; 4]
[src]
Trait Implementations
impl Clone for Matrix4
[src]
impl Copy for Matrix4
[src]
impl Debug for Matrix4
[src]
impl Deref for Matrix4
[src]
type Target = ColumnMatrix4<f32>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl DerefMut for Matrix4
[src]
impl From<[[f32; 4]; 4]> for Matrix4
[src]
impl From<ColumnMatrix4<f32>> for Matrix4
[src]
fn from(v: ColumnMatrix4<f32>) -> Self
[src]
impl From<Matrix4> for ColumnMatrix4<f32>
[src]
impl Mul<Matrix4> for Matrix4
[src]
type Output = Matrix4
The resulting type after applying the *
operator.
fn mul(self, rhs: Matrix4) -> Matrix4
[src]
impl PartialEq<Matrix4> for Matrix4
[src]
impl PartialOrd<Matrix4> for Matrix4
[src]
fn partial_cmp(&self, other: &Matrix4) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Pod for Matrix4
[src]
impl StructuralPartialEq for Matrix4
[src]
impl Zeroable for Matrix4
[src]
Auto Trait Implementations
impl RefUnwindSafe for Matrix4
impl Send for Matrix4
impl Sync for Matrix4
impl Unpin for Matrix4
impl UnwindSafe for Matrix4
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,