Struct Vec3d

Source
pub struct Vec3d { /* private fields */ }

Implementations§

Source§

impl Vec3d

Source

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

Source

pub fn one() -> Self

Source

pub fn zero() -> Self

Source§

impl Vec3d

Source

pub fn floor(self) -> Self

Source

pub fn ceil(self) -> Self

Source

pub fn round(self) -> Self

Source

pub fn trunc(self) -> Self

Source

pub fn fract(self) -> Self

Source

pub fn abs(self) -> Self

Source

pub fn signum(self) -> Self

Source

pub fn powf(self, n: f64) -> Self

Source

pub fn sqrt(self) -> Self

Source

pub fn exp(self) -> Self

Source

pub fn exp2(self) -> Self

Source

pub fn ln(self) -> Self

Source

pub fn log(self, base: f64) -> Self

Source

pub fn log2(self) -> Self

Source

pub fn log10(self) -> Self

Source

pub fn cbrt(self) -> Self

Source

pub fn sin(self) -> Self

Source

pub fn cos(self) -> Self

Source

pub fn tan(self) -> Self

Source

pub fn sin_cos(self) -> (Self, Self)

Source

pub fn lerp(self, rhs: Self, s: f64) -> Self

Source

pub fn lerp_vec(self, rhs: Self, s: Self) -> Self

Source

pub fn is_nan(self) -> bool

Source

pub fn is_infinite(self) -> bool

Source

pub fn is_finite(self) -> bool

Source

pub fn recip(self) -> Self

Source

pub fn max(self, rhs: Self) -> Self

Source

pub fn min(self, rhs: Self) -> Self

Source

pub fn clamp(self, min: Self, max: Self) -> Self

Source

pub fn saturate(self) -> Self

Source

pub fn min_element(self) -> f64

Source

pub fn max_element(self) -> f64

Source§

impl Vec3d

Source

pub fn dot(self, rhs: Self) -> f64

Source

pub fn cross(self, rhs: Self) -> Self

Source

pub fn length(self) -> f64

Source

pub fn length_squared(self) -> f64

Source

pub fn length_recip(self) -> f64

Source

pub fn distance(self, rhs: Self) -> f64

Source

pub fn distance_squared(self, rhs: Self) -> f64

Source

pub fn normalize(self) -> Self

Source

pub fn try_normalize(self) -> Option<Self>

Source

pub fn normalize_or_zero(self) -> Self

Source

pub fn is_normalized(self) -> bool

Source

pub fn angle_between(self, rhs: Self) -> f64

Source§

impl Vec3d

Source

pub fn to_array(self) -> [f64; 3]

Source

pub fn to_tuple(self) -> (f64, f64, f64)

Source

pub fn to_vec3f(self) -> Vec3f

Source

pub fn to_homogeneous_coord_point(self) -> Vec4d

Source

pub fn to_homogeneous_coord_vector(self) -> Vec4d

Source§

impl Vec3d

Source

pub fn x(self) -> f64

Source

pub fn y(self) -> f64

Source

pub fn z(self) -> f64

Source

pub fn xx(self) -> Vec2d

Source

pub fn xy(self) -> Vec2d

Source

pub fn xz(self) -> Vec2d

Source

pub fn yx(self) -> Vec2d

Source

pub fn yy(self) -> Vec2d

Source

pub fn yz(self) -> Vec2d

Source

pub fn zx(self) -> Vec2d

Source

pub fn zy(self) -> Vec2d

Source

pub fn zz(self) -> Vec2d

Source

pub fn xxx(self) -> Self

Source

pub fn xxy(self) -> Self

Source

pub fn xxz(self) -> Self

Source

pub fn xyx(self) -> Self

Source

pub fn xyy(self) -> Self

Source

pub fn xyz(self) -> Self

Source

pub fn xzx(self) -> Self

Source

pub fn xzy(self) -> Self

Source

pub fn xzz(self) -> Self

Source

pub fn yxx(self) -> Self

Source

pub fn yxy(self) -> Self

Source

pub fn yxz(self) -> Self

Source

pub fn yyx(self) -> Self

Source

pub fn yyy(self) -> Self

Source

pub fn yyz(self) -> Self

Source

pub fn yzx(self) -> Self

Source

pub fn yzy(self) -> Self

Source

pub fn yzz(self) -> Self

Source

pub fn zxx(self) -> Self

Source

pub fn zxy(self) -> Self

Source

pub fn zxz(self) -> Self

Source

pub fn zyx(self) -> Self

Source

pub fn zyy(self) -> Self

Source

pub fn zyz(self) -> Self

Source

pub fn zzx(self) -> Self

Source

pub fn zzy(self) -> Self

Source

pub fn zzz(self) -> Self

Source

pub fn xxxx(self) -> Vec4d

Source

pub fn xxxy(self) -> Vec4d

Source

pub fn xxxz(self) -> Vec4d

Source

pub fn xxyx(self) -> Vec4d

Source

pub fn xxyy(self) -> Vec4d

Source

pub fn xxyz(self) -> Vec4d

Source

pub fn xxzx(self) -> Vec4d

Source

pub fn xxzy(self) -> Vec4d

Source

pub fn xxzz(self) -> Vec4d

Source

pub fn xyxx(self) -> Vec4d

Source

pub fn xyxy(self) -> Vec4d

Source

pub fn xyxz(self) -> Vec4d

Source

pub fn xyyx(self) -> Vec4d

Source

pub fn xyyy(self) -> Vec4d

Source

pub fn xyyz(self) -> Vec4d

Source

pub fn xyzx(self) -> Vec4d

Source

pub fn xyzy(self) -> Vec4d

Source

pub fn xyzz(self) -> Vec4d

Source

pub fn xzxx(self) -> Vec4d

Source

pub fn xzxy(self) -> Vec4d

Source

pub fn xzxz(self) -> Vec4d

Source

pub fn xzyx(self) -> Vec4d

Source

pub fn xzyy(self) -> Vec4d

Source

pub fn xzyz(self) -> Vec4d

Source

pub fn xzzx(self) -> Vec4d

Source

pub fn xzzy(self) -> Vec4d

Source

pub fn xzzz(self) -> Vec4d

Source

pub fn yxxx(self) -> Vec4d

Source

pub fn yxxy(self) -> Vec4d

Source

pub fn yxxz(self) -> Vec4d

Source

pub fn yxyx(self) -> Vec4d

Source

pub fn yxyy(self) -> Vec4d

Source

pub fn yxyz(self) -> Vec4d

Source

pub fn yxzx(self) -> Vec4d

Source

pub fn yxzy(self) -> Vec4d

Source

pub fn yxzz(self) -> Vec4d

Source

pub fn yyxx(self) -> Vec4d

Source

pub fn yyxy(self) -> Vec4d

Source

pub fn yyxz(self) -> Vec4d

Source

pub fn yyyx(self) -> Vec4d

Source

pub fn yyyy(self) -> Vec4d

Source

pub fn yyyz(self) -> Vec4d

Source

pub fn yyzx(self) -> Vec4d

Source

pub fn yyzy(self) -> Vec4d

Source

pub fn yyzz(self) -> Vec4d

Source

pub fn yzxx(self) -> Vec4d

Source

pub fn yzxy(self) -> Vec4d

Source

pub fn yzxz(self) -> Vec4d

Source

pub fn yzyx(self) -> Vec4d

Source

pub fn yzyy(self) -> Vec4d

Source

pub fn yzyz(self) -> Vec4d

Source

pub fn yzzx(self) -> Vec4d

Source

pub fn yzzy(self) -> Vec4d

Source

pub fn yzzz(self) -> Vec4d

Source

pub fn zxxx(self) -> Vec4d

Source

pub fn zxxy(self) -> Vec4d

Source

pub fn zxxz(self) -> Vec4d

Source

pub fn zxyx(self) -> Vec4d

Source

pub fn zxyy(self) -> Vec4d

Source

pub fn zxyz(self) -> Vec4d

Source

pub fn zxzx(self) -> Vec4d

Source

pub fn zxzy(self) -> Vec4d

Source

pub fn zxzz(self) -> Vec4d

Source

pub fn zyxx(self) -> Vec4d

Source

pub fn zyxy(self) -> Vec4d

Source

pub fn zyxz(self) -> Vec4d

Source

pub fn zyyx(self) -> Vec4d

Source

pub fn zyyy(self) -> Vec4d

Source

pub fn zyyz(self) -> Vec4d

Source

pub fn zyzx(self) -> Vec4d

Source

pub fn zyzy(self) -> Vec4d

Source

pub fn zyzz(self) -> Vec4d

Source

pub fn zzxx(self) -> Vec4d

Source

pub fn zzxy(self) -> Vec4d

Source

pub fn zzxz(self) -> Vec4d

Source

pub fn zzyx(self) -> Vec4d

Source

pub fn zzyy(self) -> Vec4d

Source

pub fn zzyz(self) -> Vec4d

Source

pub fn zzzx(self) -> Vec4d

Source

pub fn zzzy(self) -> Vec4d

Source

pub fn zzzz(self) -> Vec4d

Trait Implementations§

Source§

impl Add<Vec3d> for f64

Source§

type Output = Vec3d

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Vec3d) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<f64> for Vec3d

Source§

type Output = Vec3d

The resulting type after applying the + operator.
Source§

fn add(self, rhs: f64) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for Vec3d

Source§

type Output = Vec3d

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Vec3d) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign<f64> for Vec3d

Source§

fn add_assign(&mut self, rhs: f64)

Performs the += operation. Read more
Source§

impl AddAssign for Vec3d

Source§

fn add_assign(&mut self, rhs: Vec3d)

Performs the += operation. Read more
Source§

impl Clone for Vec3d

Source§

fn clone(&self) -> Vec3d

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Vec3d

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for Vec3d

Source§

fn default() -> Self

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

impl Display for Vec3d

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Div<Vec3d> for f64

Source§

type Output = Vec3d

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Vec3d) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<f64> for Vec3d

Source§

type Output = Vec3d

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f64) -> Self::Output

Performs the / operation. Read more
Source§

impl Div for Vec3d

Source§

type Output = Vec3d

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Vec3d) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign<f64> for Vec3d

Source§

fn div_assign(&mut self, rhs: f64)

Performs the /= operation. Read more
Source§

impl DivAssign for Vec3d

Source§

fn div_assign(&mut self, rhs: Vec3d)

Performs the /= operation. Read more
Source§

impl From<(Vec2d, f64)> for Vec3d

Source§

fn from(v: (Vec2d, f64)) -> Self

Converts to this type from the input type.
Source§

impl From<(f64, f64, f64)> for Vec3d

Source§

fn from(v: (f64, f64, f64)) -> Self

Converts to this type from the input type.
Source§

impl From<Vec3d> for Vec2d

Source§

fn from(v: Vec3d) -> Self

Converts to this type from the input type.
Source§

impl From<Vec4d> for Vec3d

Source§

fn from(v: Vec4d) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Vec3d

Source§

fn from(v: f64) -> Self

Converts to this type from the input type.
Source§

impl Index<usize> for Vec3d

Source§

type Output = f64

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Vec3d

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl Mul<Vec3d> for Mat3d

Source§

type Output = Vec3d

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vec3d) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Vec3d> for f64

Source§

type Output = Vec3d

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vec3d) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<f64> for Vec3d

Source§

type Output = Vec3d

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f64) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for Vec3d

Source§

type Output = Vec3d

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vec3d) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign<f64> for Vec3d

Source§

fn mul_assign(&mut self, rhs: f64)

Performs the *= operation. Read more
Source§

impl MulAssign for Vec3d

Source§

fn mul_assign(&mut self, rhs: Vec3d)

Performs the *= operation. Read more
Source§

impl Neg for Vec3d

Source§

type Output = Vec3d

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl PartialEq for Vec3d

Source§

fn eq(&self, other: &Vec3d) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Sub<Vec3d> for f64

Source§

type Output = Vec3d

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Vec3d) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<f64> for Vec3d

Source§

type Output = Vec3d

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: f64) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for Vec3d

Source§

type Output = Vec3d

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Vec3d) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign<f64> for Vec3d

Source§

fn sub_assign(&mut self, rhs: f64)

Performs the -= operation. Read more
Source§

impl SubAssign for Vec3d

Source§

fn sub_assign(&mut self, rhs: Vec3d)

Performs the -= operation. Read more
Source§

impl Copy for Vec3d

Source§

impl StructuralPartialEq for Vec3d

Auto Trait Implementations§

§

impl Freeze for Vec3d

§

impl RefUnwindSafe for Vec3d

§

impl Send for Vec3d

§

impl Sync for Vec3d

§

impl Unpin for Vec3d

§

impl UnwindSafe for Vec3d

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.