Struct makepad_widgets::Vec3

pub struct Vec3 {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}

Fields§

§x: f32§y: f32§z: f32

Implementations§

§

impl Vec3

pub fn from_lerp(a: Vec3, b: Vec3, f: f32) -> Vec3

pub fn all(x: f32) -> Vec3

pub fn to_vec2(&self) -> Vec2

pub fn scale(&self, f: f32) -> Vec3

pub fn cross(a: Vec3, b: Vec3) -> Vec3

pub fn dot(&self, other: Vec3) -> f32

pub fn normalize(&self) -> Vec3

Trait Implementations§

§

impl Add<Vec3> for Vec3

§

type Output = Vec3

The resulting type after applying the + operator.
§

fn add(self, rhs: Vec3) -> Vec3

Performs the + operation. Read more
§

impl Add<f32> for Vec3

§

type Output = Vec3

The resulting type after applying the + operator.
§

fn add(self, rhs: f32) -> Vec3

Performs the + operation. Read more
§

impl AddAssign<Vec3> for Vec3

§

fn add_assign(&mut self, rhs: Vec3)

Performs the += operation. Read more
§

impl AddAssign<f32> for Vec3

§

fn add_assign(&mut self, rhs: f32)

Performs the += operation. Read more
§

impl Clone for Vec3

§

fn clone(&self) -> Vec3

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
§

impl Debug for Vec3

§

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

Formats the value using the given formatter. Read more
§

impl Default for Vec3

§

fn default() -> Vec3

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

impl Display for Vec3

§

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

Formats the value using the given formatter. Read more
§

impl Div<Vec3> for Vec3

§

type Output = Vec3

The resulting type after applying the / operator.
§

fn div(self, rhs: Vec3) -> Vec3

Performs the / operation. Read more
§

impl Div<f32> for Vec3

§

type Output = Vec3

The resulting type after applying the / operator.
§

fn div(self, rhs: f32) -> Vec3

Performs the / operation. Read more
§

impl DivAssign<Vec3> for Vec3

§

fn div_assign(&mut self, rhs: Vec3)

Performs the /= operation. Read more
§

impl DivAssign<f32> for Vec3

§

fn div_assign(&mut self, rhs: f32)

Performs the /= operation. Read more
§

impl LiveApply for Vec3

§

fn apply( &mut self, cx: &mut Cx, from: ApplyFrom, index: usize, nodes: &[LiveNode] ) -> usize

§

fn apply_over(&mut self, cx: &mut Cx, nodes: &[LiveNode])

§

impl LiveHook for Vec3

§

fn before_live_design(_cx: &mut Cx)

§

fn apply_value_unknown( &mut self, cx: &mut Cx, _apply_from: ApplyFrom, index: usize, nodes: &[LiveNode] ) -> usize

§

fn apply_value_instance( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, index: usize, nodes: &[LiveNode] ) -> usize

§

fn skip_apply( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, _index: usize, _nodes: &[LiveNode] ) -> Option<usize>

§

fn before_apply( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, _index: usize, _nodes: &[LiveNode] )

§

fn after_apply( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, _index: usize, _nodes: &[LiveNode] )

§

fn after_apply_from(&mut self, cx: &mut Cx, apply_from: ApplyFrom)

§

fn after_new_from_doc(&mut self, _cx: &mut Cx)

§

fn after_new_before_apply(&mut self, _cx: &mut Cx)

§

impl LiveNew for Vec3

§

fn live_design_with(_cx: &mut Cx)

§

fn new(_cx: &mut Cx) -> Vec3

§

fn live_type_info(_cx: &mut Cx) -> LiveTypeInfo

§

fn new_apply( cx: &mut Cx, from: ApplyFrom, index: usize, nodes: &[LiveNode] ) -> Selfwhere Self: Sized,

§

fn new_apply_mut_index( cx: &mut Cx, from: ApplyFrom, index: &mut usize, nodes: &[LiveNode] ) -> Selfwhere Self: Sized,

§

fn new_from_ptr(cx: &mut Cx, live_ptr: Option<LivePtr>) -> Selfwhere Self: Sized,

§

fn new_main(cx: &mut Cx) -> Selfwhere Self: Sized,

§

fn update_main(&mut self, cx: &mut Cx)

§

fn new_local(cx: &mut Cx) -> Selfwhere Self: Sized,

§

fn new_from_module( cx: &mut Cx, module_id: LiveModuleId, id: LiveId ) -> Option<Self>where Self: Sized,

§

fn update_from_module( &mut self, cx: &mut Cx, module_id: LiveModuleId, id: LiveId )

§

impl LiveRead for Vec3

§

fn live_read_to(&self, id: LiveId, out: &mut Vec<LiveNode, Global>)

§

fn live_read(&self) -> Vec<LiveNode, Global>

§

impl Mul<Vec3> for Vec3

§

type Output = Vec3

The resulting type after applying the * operator.
§

fn mul(self, rhs: Vec3) -> Vec3

Performs the * operation. Read more
§

impl Mul<f32> for Vec3

§

type Output = Vec3

The resulting type after applying the * operator.
§

fn mul(self, rhs: f32) -> Vec3

Performs the * operation. Read more
§

impl MulAssign<Vec3> for Vec3

§

fn mul_assign(&mut self, rhs: Vec3)

Performs the *= operation. Read more
§

impl MulAssign<f32> for Vec3

§

fn mul_assign(&mut self, rhs: f32)

Performs the *= operation. Read more
§

impl Neg for Vec3

§

type Output = Vec3

The resulting type after applying the - operator.
§

fn neg(self) -> Vec3

Performs the unary - operation. Read more
§

impl PartialEq<Vec3> for Vec3

§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl Sub<Vec3> for Vec3

§

type Output = Vec3

The resulting type after applying the - operator.
§

fn sub(self, rhs: Vec3) -> Vec3

Performs the - operation. Read more
§

impl Sub<f32> for Vec3

§

type Output = Vec3

The resulting type after applying the - operator.
§

fn sub(self, rhs: f32) -> Vec3

Performs the - operation. Read more
§

impl SubAssign<Vec3> for Vec3

§

fn sub_assign(&mut self, rhs: Vec3)

Performs the -= operation. Read more
§

impl SubAssign<f32> for Vec3

§

fn sub_assign(&mut self, rhs: f32)

Performs the -= operation. Read more
§

impl ToLiveValue for Vec3

§

impl Copy for Vec3

§

impl StructuralPartialEq 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§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

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

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

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<T> WidgetAction for Twhere T: 'static + Clone + ?Sized,