[][src]Struct rgx::math::algebra::Vector3

#[repr(C)]
pub struct Vector3<S> {
    pub x: S,
    pub y: S,
    pub z: S,
}

3D vector.

Fields

x: Sy: Sz: S

Methods

impl<S> Vector3<S>[src]

pub const fn new(x: S, y: S, z: S) -> Self[src]

pub fn extend(self, w: S) -> Vector4<S>[src]

Extend vector to four dimensions.

Trait Implementations

impl<S: Clone> Clone for Vector3<S>[src]

impl<S: Copy> Copy for Vector3<S>[src]

impl<S: Debug> Debug for Vector3<S>[src]

impl<S: Eq> Eq for Vector3<S>[src]

impl<T: Copy> From<[T; 3]> for Vector3<T>[src]

impl<S: Hash> Hash for Vector3<S>[src]

impl Mul<Vector3<f32>> for Matrix4<f32>[src]

Transform a Vector3 with a Matrix4.

use rgx::math::*;
let m = Matrix4::from_translation(Vector3::new(8., 8., 0.));
let v = Vector3::new(1., 1., 0.);

assert_eq!(m * v, Vector3::new(9., 9., 0.));

type Output = Vector3<f32>

The resulting type after applying the * operator.

impl<S: PartialEq> PartialEq<Vector3<S>> for Vector3<S>[src]

impl<S> StructuralEq for Vector3<S>[src]

impl<S> StructuralPartialEq for Vector3<S>[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for Vector3<S> where
    S: RefUnwindSafe

impl<S> Send for Vector3<S> where
    S: Send

impl<S> Sync for Vector3<S> where
    S: Sync

impl<S> Unpin for Vector3<S> where
    S: Unpin

impl<S> UnwindSafe for Vector3<S> where
    S: UnwindSafe

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.