[][src]Struct nova_math::vector::TVec3

pub struct TVec3<T: Real> { /* fields omitted */ }

A generic 3 component vector

Methods

impl<T: Real> TVec3<T>[src]

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

Constructs a new Vec3

pub fn zero() -> Self[src]

Return a vector with all zeroes

pub fn one() -> Self[src]

Return a vector with all ones

pub fn up() -> Self[src]

Return a unit vector that points in the up direction

pub fn down() -> Self[src]

Return a unit vector that points in the down direction

pub fn right() -> Self[src]

Return a unit vector that points in the right direction

pub fn left() -> Self[src]

Return a unit vector that points in the left direction

pub fn forward() -> Self[src]

Return a unit vector that points in the forward direction

pub fn back() -> Self[src]

Return a unit vector that points in the back direction

Trait Implementations

impl<T: Real> Lerp<T> for TVec3<T>[src]

impl<T: Real> IntoRadians for TVec3<T>[src]

impl<T: Real> IntoDegrees for TVec3<T>[src]

impl<T: Real> DotProduct<T> for TVec3<T>[src]

impl<T: Real> CrossProduct for TVec3<T>[src]

impl<T: Real> IntoSTD140 for TVec3<T>[src]

type Output = TVec3P<T>

impl<T: Real> Length for TVec3<T>[src]

type Output = T

impl<T: Real> LengthSquared for TVec3<T>[src]

type Output = T

impl<T: Real> Normalize for TVec3<T>[src]

impl<T: Real> NormalizeAssign for TVec3<T>[src]

impl<T: Real> From<TVec3<T>> for TVec2<T>[src]

fn from(other: TVec3<T>) -> Self[src]

Take the xy components of a Vec3 and produce a Vec2

impl<T: Real> From<T> for TVec3<T>[src]

impl<T: Real> From<TVec2<T>> for TVec3<T>[src]

impl<T: Real> From<TVec4<T>> for TVec3<T>[src]

impl<T: Real> From<[T; 3]> for TVec3<T>[src]

fn from(other: [T; 3]) -> Self[src]

Take the array as a vector

impl<T: Real> From<(T, T, T)> for TVec3<T>[src]

fn from(other: (T, T, T)) -> Self[src]

Take the array as a vector

impl<T: Real> From<TVec3<T>> for TVec4<T>[src]

impl<T: Real> From<TVec3<T>> for TVec3P<T>[src]

impl<T: Real> Display for TVec3<T>[src]

impl<T: Debug + Real> Debug for TVec3<T>[src]

impl<T: Real> Div<TVec3<T>> for TVec3<T>[src]

type Output = TVec3<T>

The resulting type after applying the / operator.

impl<T: Real> Div<T> for TVec3<T>[src]

type Output = TVec3<T>

The resulting type after applying the / operator.

impl<T: Real> Sub<TVec3<T>> for TVec3<T>[src]

type Output = TVec3<T>

The resulting type after applying the - operator.

impl<T: Real> Sub<T> for TVec3<T>[src]

type Output = TVec3<T>

The resulting type after applying the - operator.

impl<T: Real> PartialEq<TVec3<T>> for TVec3<T>[src]

impl<T: Real> Add<TVec3<T>> for TVec3<T>[src]

type Output = TVec3<T>

The resulting type after applying the + operator.

impl<T: Real> Add<T> for TVec3<T>[src]

type Output = TVec3<T>

The resulting type after applying the + operator.

impl<T: Real> Mul<TVec3<T>> for TQuat<T>[src]

type Output = TVec3<T>

The resulting type after applying the * operator.

impl<T: Real> Mul<TVec3<T>> for TVec3<T>[src]

type Output = TVec3<T>

The resulting type after applying the * operator.

impl<T: Real> Mul<T> for TVec3<T>[src]

type Output = TVec3<T>

The resulting type after applying the * operator.

impl<T: Real> Neg for TVec3<T>[src]

type Output = Self

The resulting type after applying the - operator.

impl<T: Real> AddAssign<TVec3<T>> for TVec3<T>[src]

impl<T: Real> AddAssign<T> for TVec3<T>[src]

impl<T: Real> SubAssign<TVec3<T>> for TVec3<T>[src]

impl<T: Real> SubAssign<T> for TVec3<T>[src]

impl<T: Real> MulAssign<TVec3<T>> for TVec3<T>[src]

impl<T: Real> MulAssign<T> for TVec3<T>[src]

impl<T: Real> DivAssign<TVec3<T>> for TVec3<T>[src]

impl<T: Real> DivAssign<T> for TVec3<T>[src]

impl<T: Real> Index<usize> for TVec3<T>[src]

type Output = T

The returned type after indexing.

impl<T: Real> IndexMut<usize> for TVec3<T>[src]

impl<T: Copy + Real> Copy for TVec3<T>[src]

impl<T: Real> Into<[T; 3]> for TVec3<T>[src]

impl<T: Real> Into<(T, T, T)> for TVec3<T>[src]

impl<T: Clone + Real> Clone for TVec3<T>[src]

Auto Trait Implementations

impl<T> Unpin for TVec3<T> where
    T: Unpin

impl<T> Send for TVec3<T> where
    T: Send

impl<T> Sync for TVec3<T> where
    T: Sync

impl<T> UnwindSafe for TVec3<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for TVec3<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> IntoRadians for T where
    T: Real + Pi
[src]

impl<T> IntoDegrees for T where
    T: Real + Pi
[src]

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

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

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

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.

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]