[][src]Struct pathfinder_geometry::vector::Vector4F

pub struct Vector4F(pub F32x4);

3D homogeneous points.

Methods

impl Vector4F[src]

pub fn new(x: f32, y: f32, z: f32, w: f32) -> Vector4F[src]

pub fn splat(value: f32) -> Vector4F[src]

pub fn to_2d(self) -> Vector2F[src]

pub fn to_3d(self) -> Vector3F[src]

Performs perspective division to convert this vector to 3D.

pub fn x(self) -> f32[src]

pub fn y(self) -> f32[src]

pub fn z(self) -> f32[src]

pub fn w(self) -> f32[src]

pub fn scale(self, x: f32) -> Vector4F[src]

pub fn set_x(&mut self, x: f32)[src]

pub fn set_y(&mut self, y: f32)[src]

pub fn set_z(&mut self, z: f32)[src]

pub fn set_w(&mut self, w: f32)[src]

pub fn approx_eq(self, other: Vector4F, epsilon: f32) -> bool[src]

pub fn is_zero(self) -> bool[src]

Checks to see whether this homogeneous coordinate equals zero.

Note that since this treats the coordinate as a homogeneous coordinate, the w is ignored.

pub fn lerp(self, other: Vector4F, t: f32) -> Vector4F[src]

Trait Implementations

impl Add<Vector4F> for Vector4F[src]

type Output = Vector4F

The resulting type after applying the + operator.

impl AddAssign<Vector4F> for Vector4F[src]

impl Clone for Vector4F[src]

impl Copy for Vector4F[src]

impl Debug for Vector4F[src]

impl Default for Vector4F[src]

impl Mul<Vector4F> for Transform4F[src]

type Output = Vector4F

The resulting type after applying the * operator.

impl Mul<Vector4F> for Vector4F[src]

type Output = Vector4F

The resulting type after applying the * operator.

impl Neg for Vector4F[src]

type Output = Vector4F

The resulting type after applying the - operator.

fn neg(self) -> Vector4F[src]

NB: This does not negate w, because that is rarely what you what for homogeneous coordinates.

impl PartialEq<Vector4F> for Vector4F[src]

impl StructuralPartialEq for Vector4F[src]

impl Sub<Vector4F> for Vector4F[src]

type Output = Vector4F

The resulting type after applying the - operator.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.