[−][src]Struct rg3d_core::math::vec3::Vec3
Fields
x: f32
y: f32
z: f32
Methods
impl Vec3
[src]
pub const ZERO: Self
[src]
pub const UNIT: Self
[src]
pub const RIGHT: Self
[src]
pub const UP: Self
[src]
pub const LOOK: Self
[src]
pub fn new(x: f32, y: f32, z: f32) -> Self
[src]
pub fn scale(&self, scalar: f32) -> Self
[src]
pub fn sqr_len(&self) -> f32
[src]
pub fn len(&self) -> f32
[src]
pub fn dot(&self, b: &Self) -> f32
[src]
pub fn cross(&self, b: &Self) -> Self
[src]
pub fn normalized(&self) -> Option<Self>
[src]
pub fn normalized_ex(&self) -> (Option<Self>, f32)
[src]
Returns normalized vector and its original length. May fail if vector is degenerate.
pub fn normalized_unchecked(&self) -> Self
[src]
pub fn lerp(&self, other: &Self, t: f32) -> Self
[src]
pub fn distance(&self, other: &Self) -> f32
[src]
pub fn sqr_distance(&self, other: &Self) -> f32
[src]
pub fn is_same_direction_as(&self, other: &Self) -> bool
[src]
pub fn min_value(&self) -> f32
[src]
pub fn max_value(&self) -> f32
[src]
pub fn follow(&mut self, other: &Self, fraction: f32)
[src]
pub fn project(&self, normal: &Self) -> Self
[src]
Trait Implementations
impl Add<Vec3> for Vec3
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, b: Self) -> Self
[src]
impl AddAssign<Vec3> for Vec3
[src]
fn add_assign(&mut self, b: Self)
[src]
impl Clone for Vec3
[src]
impl Copy for Vec3
[src]
impl Debug for Vec3
[src]
impl Default for Vec3
[src]
impl FieldData for Vec3
[src]
impl Index<usize> for Vec3
[src]
type Output = f32
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
impl Mul<Vec3> for Vec3
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Vec3) -> Self::Output
[src]
impl Neg for Vec3
[src]
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl PartialEq<Vec3> for Vec3
[src]
impl StructuralPartialEq for Vec3
[src]
impl Sub<Vec3> for Vec3
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, b: Self) -> Self
[src]
impl SubAssign<Vec3> for Vec3
[src]
fn sub_assign(&mut self, b: Self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Vec3
impl Send for Vec3
impl Sync for Vec3
impl Unpin for Vec3
impl UnwindSafe for Vec3
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Visit for T where
T: FieldData + 'static,
[src]
T: FieldData + 'static,