#[repr(transparent)]pub struct Vec3 { /* private fields */ }
Expand description
A structure capable of holding a vector with three dimensions: x, y, and z.
The contents of the Vec3
structure are private and should
never be accessed directly.
Implementations
sourceimpl Vec3
impl Vec3
sourcepub fn x(&self) -> f32
pub fn x(&self) -> f32
Retrieves the first component of the given vector self
.
Returns
the value of the first component of the vector
sourcepub fn y(&self) -> f32
pub fn y(&self) -> f32
Retrieves the second component of the given vector self
.
Returns
the value of the second component of the vector
sourcepub fn z(&self) -> f32
pub fn z(&self) -> f32
Retrieves the third component of the given vector self
.
Returns
the value of the third component of the vector
sourcepub fn interpolate(&self, v2: &Vec3, factor: f64) -> Vec3
pub fn interpolate(&self, v2: &Vec3, factor: f64) -> Vec3
sourcepub fn one() -> Vec3
pub fn one() -> Vec3
Provides a constant pointer to a vector with three components, all sets to 1.
Returns
a constant vector
sourcepub fn x_axis() -> Vec3
pub fn x_axis() -> Vec3
Provides a constant pointer to a vector with three components with values set to (1, 0, 0).
Returns
a constant vector
sourcepub fn y_axis() -> Vec3
pub fn y_axis() -> Vec3
Provides a constant pointer to a vector with three components with values set to (0, 1, 0).
Returns
a constant vector
Trait Implementations
sourceimpl StaticType for Vec3
impl StaticType for Vec3
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
impl Copy for Vec3
impl Eq for Vec3
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
sourceimpl<T> ToClosureReturnValue for T where
T: ToValue,
impl<T> ToClosureReturnValue for T where
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a SendValue
clone of self
.