Struct plotters::coord::ranged3d::ProjectionMatrix[][src]

pub struct ProjectionMatrix(_);
Expand description

The projection matrix which is used to project the 3D space to the 2D display panel

Implementations

impl ProjectionMatrix[src]

pub fn one() -> Self[src]

Returns the identity matrix

pub fn zero() -> Self[src]

Returns the zero maxtrix

pub fn shift(x: f64, y: f64, z: f64) -> Self[src]

Returns the matrix which shift the coordinate

pub fn rotate(x: f64, y: f64, z: f64) -> Self[src]

Returns the matrix which rotates the coordinate

pub fn scale(factor: f64) -> Self[src]

Returns the matrix that applies a scale factor

pub fn normalize(&mut self)[src]

Normalize the matrix, this will make the metric unit to 1

pub fn projected_depth(&self, (x, y, z): (i32, i32, i32)) -> i32[src]

Get the distance of the point in guest coordinate from the screen in pixels

Trait Implementations

impl AsMut<[[f64; 4]; 4]> for ProjectionMatrix[src]

fn as_mut(&mut self) -> &mut [[f64; 4]; 4][src]

Performs the conversion.

impl AsRef<[[f64; 4]; 4]> for ProjectionMatrix[src]

fn as_ref(&self) -> &[[f64; 4]; 4][src]

Performs the conversion.

impl Clone for ProjectionMatrix[src]

fn clone(&self) -> ProjectionMatrix[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for ProjectionMatrix[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for ProjectionMatrix[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl From<[[f64; 4]; 4]> for ProjectionMatrix[src]

fn from(data: [[f64; 4]; 4]) -> Self[src]

Performs the conversion.

impl Mul<(f64, f64, f64)> for ProjectionMatrix[src]

type Output = (i32, i32)

The resulting type after applying the * operator.

fn mul(self, (x, y, z): (f64, f64, f64)) -> (i32, i32)[src]

Performs the * operation. Read more

impl Mul<(i32, i32, i32)> for ProjectionMatrix[src]

type Output = (i32, i32)

The resulting type after applying the * operator.

fn mul(self, (x, y, z): (i32, i32, i32)) -> (i32, i32)[src]

Performs the * operation. Read more

impl Mul<ProjectionMatrix> for ProjectionMatrix[src]

type Output = ProjectionMatrix

The resulting type after applying the * operator.

fn mul(self, other: ProjectionMatrix) -> ProjectionMatrix[src]

Performs the * operation. Read more

impl Copy for ProjectionMatrix[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]

🔬 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, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.