Struct octoon_math::vec3::Vec3
source · pub struct Vec3<T> {
pub x: T,
pub y: T,
pub z: T,
}
Fields
x: T
y: T
z: T
Implementations
sourceimpl<T> Vec3<T>where
T: Copy,
impl<T> Vec3<T>where
T: Copy,
pub fn to_tuple(&self) -> (T, T, T)
pub fn xx(&self) -> Vec2<T>
pub fn xy(&self) -> Vec2<T>
pub fn xz(&self) -> Vec2<T>
pub fn yx(&self) -> Vec2<T>
pub fn yy(&self) -> Vec2<T>
pub fn yz(&self) -> Vec2<T>
pub fn zx(&self) -> Vec2<T>
pub fn zy(&self) -> Vec2<T>
pub fn zz(&self) -> Vec2<T>
pub fn xxx(&self) -> Self
pub fn xxy(&self) -> Self
pub fn xxz(&self) -> Self
pub fn xyx(&self) -> Self
pub fn xyy(&self) -> Self
pub fn xyz(&self) -> Self
pub fn xzx(&self) -> Self
pub fn xzy(&self) -> Self
pub fn xzz(&self) -> Self
pub fn yxx(&self) -> Self
pub fn yxy(&self) -> Self
pub fn yxz(&self) -> Self
pub fn yyx(&self) -> Self
pub fn yyy(&self) -> Self
pub fn yyz(&self) -> Self
pub fn yzx(&self) -> Self
pub fn yzy(&self) -> Self
pub fn yzz(&self) -> Self
pub fn zxx(&self) -> Self
pub fn zxy(&self) -> Self
pub fn zxz(&self) -> Self
pub fn zyx(&self) -> Self
pub fn zyy(&self) -> Self
pub fn zyz(&self) -> Self
pub fn zzx(&self) -> Self
pub fn zzy(&self) -> Self
pub fn zzz(&self) -> Self
pub fn xxxx(&self) -> Vec4<T>
pub fn xxxy(&self) -> Vec4<T>
pub fn xxxz(&self) -> Vec4<T>
pub fn xxyx(&self) -> Vec4<T>
pub fn xxyy(&self) -> Vec4<T>
pub fn xxyz(&self) -> Vec4<T>
pub fn xxzx(&self) -> Vec4<T>
pub fn xxzy(&self) -> Vec4<T>
pub fn xxzz(&self) -> Vec4<T>
pub fn xyxx(&self) -> Vec4<T>
pub fn xyxy(&self) -> Vec4<T>
pub fn xyxz(&self) -> Vec4<T>
pub fn xyyx(&self) -> Vec4<T>
pub fn xyyy(&self) -> Vec4<T>
pub fn xyyz(&self) -> Vec4<T>
pub fn xyzx(&self) -> Vec4<T>
pub fn xyzy(&self) -> Vec4<T>
pub fn xyzz(&self) -> Vec4<T>
pub fn xzxx(&self) -> Vec4<T>
pub fn xzxy(&self) -> Vec4<T>
pub fn xzxz(&self) -> Vec4<T>
pub fn xzyx(&self) -> Vec4<T>
pub fn xzyy(&self) -> Vec4<T>
pub fn xzyz(&self) -> Vec4<T>
pub fn xzzx(&self) -> Vec4<T>
pub fn xzzy(&self) -> Vec4<T>
pub fn xzzz(&self) -> Vec4<T>
pub fn yxxx(&self) -> Vec4<T>
pub fn yxxy(&self) -> Vec4<T>
pub fn yxxz(&self) -> Vec4<T>
pub fn yxyx(&self) -> Vec4<T>
pub fn yxyy(&self) -> Vec4<T>
pub fn yxyz(&self) -> Vec4<T>
pub fn yxzx(&self) -> Vec4<T>
pub fn yxzy(&self) -> Vec4<T>
pub fn yxzz(&self) -> Vec4<T>
pub fn yyxx(&self) -> Vec4<T>
pub fn yyxy(&self) -> Vec4<T>
pub fn yyxz(&self) -> Vec4<T>
pub fn yyyx(&self) -> Vec4<T>
pub fn yyyy(&self) -> Vec4<T>
pub fn yyyz(&self) -> Vec4<T>
pub fn yyzx(&self) -> Vec4<T>
pub fn yyzy(&self) -> Vec4<T>
pub fn yyzz(&self) -> Vec4<T>
pub fn yzxx(&self) -> Vec4<T>
pub fn yzxy(&self) -> Vec4<T>
pub fn yzxz(&self) -> Vec4<T>
pub fn yzyx(&self) -> Vec4<T>
pub fn yzyy(&self) -> Vec4<T>
pub fn yzyz(&self) -> Vec4<T>
pub fn yzzx(&self) -> Vec4<T>
pub fn yzzy(&self) -> Vec4<T>
pub fn yzzz(&self) -> Vec4<T>
pub fn zxxx(&self) -> Vec4<T>
pub fn zxxy(&self) -> Vec4<T>
pub fn zxxz(&self) -> Vec4<T>
pub fn zxyx(&self) -> Vec4<T>
pub fn zxyy(&self) -> Vec4<T>
pub fn zxyz(&self) -> Vec4<T>
pub fn zxzx(&self) -> Vec4<T>
pub fn zxzy(&self) -> Vec4<T>
pub fn zxzz(&self) -> Vec4<T>
pub fn zyxx(&self) -> Vec4<T>
pub fn zyxy(&self) -> Vec4<T>
pub fn zyxz(&self) -> Vec4<T>
pub fn zyyx(&self) -> Vec4<T>
pub fn zyyy(&self) -> Vec4<T>
pub fn zyyz(&self) -> Vec4<T>
pub fn zyzx(&self) -> Vec4<T>
pub fn zyzy(&self) -> Vec4<T>
pub fn zyzz(&self) -> Vec4<T>
pub fn zzxx(&self) -> Vec4<T>
pub fn zzxy(&self) -> Vec4<T>
pub fn zzxz(&self) -> Vec4<T>
pub fn zzyx(&self) -> Vec4<T>
pub fn zzyy(&self) -> Vec4<T>
pub fn zzyz(&self) -> Vec4<T>
pub fn zzzx(&self) -> Vec4<T>
pub fn zzzy(&self) -> Vec4<T>
pub fn zzzz(&self) -> Vec4<T>
Trait Implementations
sourceimpl<T> AddAssign<Vec3<T>> for Vec3<T>where
T: AddAssign<T>,
impl<T> AddAssign<Vec3<T>> for Vec3<T>where
T: AddAssign<T>,
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresourceimpl<'de, T: Deserialize<'de> + Copy> Deserialize<'de> for Vec3<T>
impl<'de, T: Deserialize<'de> + Copy> Deserialize<'de> for Vec3<T>
sourcefn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T> DivAssign<T> for Vec3<T>where
T: DivAssign<T> + Copy,
impl<T> DivAssign<T> for Vec3<T>where
T: DivAssign<T> + Copy,
sourcefn div_assign(&mut self, s: T)
fn div_assign(&mut self, s: T)
Performs the
/=
operation. Read moresourceimpl<T> DivAssign<Vec3<T>> for Vec3<T>where
T: DivAssign<T>,
impl<T> DivAssign<Vec3<T>> for Vec3<T>where
T: DivAssign<T>,
sourcefn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/=
operation. Read moresourceimpl<T> Interpolation<T> for Vec3<T>where
T: Copy + One + Mul<Output = T> + Add<Output = T> + Sub<Output = T>,
impl<T> Interpolation<T> for Vec3<T>where
T: Copy + One + Mul<Output = T> + Add<Output = T> + Sub<Output = T>,
sourceimpl<T> Math for Vec3<T>where
T: Copy + Math,
impl<T> Math for Vec3<T>where
T: Copy + Math,
fn abs(self) -> Self
fn recip(self) -> Self
fn sqrt(self) -> Self
fn rsqrt(self) -> Self
fn sin(self) -> Self
fn cos(self) -> Self
fn tan(self) -> Self
fn sincos(self) -> (Self, Self)
fn acos(self) -> Self
fn asin(self) -> Self
fn atan(self) -> Self
fn exp(self) -> Self
fn exp2(self) -> Self
fn log(self, _rhs: Self) -> Self
fn log2(self) -> Self
fn log10(self) -> Self
fn to_radians(self) -> Self
fn to_degrees(self) -> Self
fn min(self, _rhs: Self) -> Self
fn max(self, _rhs: Self) -> Self
fn saturate(self) -> Self
fn snorm2unorm(self) -> Self
fn unorm2snorm(self) -> Self
fn clamp(self, minval: Self, maxval: Self) -> Self
sourceimpl<T> Mul<Mat4<T>> for Vec3<T>where
T: Copy + Add<Output = T> + Div<Output = T> + Mul<Output = T>,
impl<T> Mul<Mat4<T>> for Vec3<T>where
T: Copy + Add<Output = T> + Div<Output = T> + Mul<Output = T>,
sourceimpl<T> Mul<Vec3<T>> for Mat4<T>where
T: Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T>,
impl<T> Mul<Vec3<T>> for Mat4<T>where
T: Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T>,
sourceimpl<T> MulAssign<T> for Vec3<T>where
T: MulAssign<T> + Copy,
impl<T> MulAssign<T> for Vec3<T>where
T: MulAssign<T> + Copy,
sourcefn mul_assign(&mut self, s: T)
fn mul_assign(&mut self, s: T)
Performs the
*=
operation. Read moresourceimpl<T> MulAssign<Vec3<T>> for Vec3<T>where
T: MulAssign<T>,
impl<T> MulAssign<Vec3<T>> for Vec3<T>where
T: MulAssign<T>,
sourcefn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moresourceimpl<T> SubAssign<Vec3<T>> for Vec3<T>where
T: SubAssign<T>,
impl<T> SubAssign<Vec3<T>> for Vec3<T>where
T: SubAssign<T>,
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreimpl<T: Copy> Copy for Vec3<T>
impl<T: Eq> Eq for Vec3<T>
impl<T> StructuralEq for Vec3<T>
impl<T> StructuralPartialEq for Vec3<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Vec3<T>where
T: RefUnwindSafe,
impl<T> Send for Vec3<T>where
T: Send,
impl<T> Sync for Vec3<T>where
T: Sync,
impl<T> Unpin for Vec3<T>where
T: Unpin,
impl<T> UnwindSafe for Vec3<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more