[][src]Struct brutils::math::Vector3

pub struct Vector3 {
    pub x: f64,
    pub y: f64,
    pub z: f64,
}

3 component vector, values are stored as doubles (f64)

Fields

x: f64y: f64z: f64

Methods

impl Vector3[src]

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

pub fn set(&mut self, x: f64, y: f64, z: f64)[src]

pub fn set_from_spherical(&mut self, azimuthal_angle: f64, polar_angle: f64)[src]

pub fn set_random_direction(&mut self)[src]

pub fn length(&self) -> f64[src]

pub fn length_squared(&self) -> f64[src]

pub fn distance(&self, other: &Vector3) -> f64[src]

pub fn distance_squared(&self, other: &Vector3) -> f64[src]

pub fn dot(&self, other: &Vector3) -> f64[src]

pub fn cross(&self, other: &Vector3) -> Vector3[src]

pub fn lerp(&mut self, target: &Vector3, alpha: f64)[src]

pub fn nor(&mut self)[src]

pub fn slerp(&mut self, target: &Vector3, alpha: f64)[src]

pub fn copy(&self) -> Self[src]

pub fn add(&mut self, other: &Vector3)[src]

pub fn subtract(&mut self, other: &Vector3)[src]

pub fn multiply(&mut self, other: &Vector3)[src]

pub fn divide(&mut self, other: &Vector3)[src]

pub fn add_scalar(&mut self, other: f64)[src]

pub fn subtract_scalar(&mut self, other: f64)[src]

pub fn multiply_scalar(&mut self, other: f64)[src]

pub fn divide_scalar(&mut self, other: f64)[src]

pub fn equals(&self, other: &Vector3) -> bool[src]

Trait Implementations

impl Default for Vector3[src]

impl Clone for Vector3[src]

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

Performs copy-assignment from source. Read more

impl Copy for Vector3[src]

impl Debug for Vector3[src]

impl Display for Vector3[src]

Auto Trait Implementations

impl Send for Vector3

impl Sync for Vector3

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?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.

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

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

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