Struct fyrox_core::curve::Curve

source ·
pub struct Curve { /* private fields */ }

Implementations§

source§

impl Curve

source

pub const ID: &'static str = "id"

source

pub const NAME: &'static str = "name"

source

pub const KEYS: &'static str = "keys"

source§

impl Curve

source

pub fn set_id(&mut self, id: Uuid)

source

pub fn id(&self) -> Uuid

source

pub fn set_name<S: AsRef<str>>(&mut self, name: S)

source

pub fn name(&self) -> &str

source

pub fn clear(&mut self)

source

pub fn is_empty(&self) -> bool

source

pub fn keys(&self) -> &[CurveKey]

source

pub fn keys_values(&mut self) -> impl Iterator<Item = &mut f32>

source

pub fn add_key(&mut self, new_key: CurveKey)

source

pub fn move_key(&mut self, key_id: usize, location: f32)

source

pub fn max_location(&self) -> f32

source

pub fn value_at(&self, location: f32) -> f32

source

pub fn bounds(&self) -> Rect<f32>

Trait Implementations§

source§

impl Clone for Curve

source§

fn clone(&self) -> Curve

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

impl Debug for Curve

source§

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

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

impl Default for Curve

source§

fn default() -> Self

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

impl From<Vec<CurveKey>> for Curve

source§

fn from(keys: Vec<CurveKey>) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Curve

source§

fn eq(&self, other: &Curve) -> 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.
source§

impl Reflect for Curve
where Self: 'static,

source§

fn type_name(&self) -> &'static str

source§

fn doc(&self) -> &'static str

source§

fn fields_info(&self, func: &mut dyn FnMut(&[FieldInfo<'_, '_>]))

source§

fn into_any(self: Box<Self>) -> Box<dyn Any>

source§

fn set( &mut self, value: Box<dyn Reflect> ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>

source§

fn as_any(&self, func: &mut dyn FnMut(&dyn Any))

source§

fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut dyn Any))

source§

fn as_reflect(&self, func: &mut dyn FnMut(&dyn Reflect))

source§

fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut dyn Reflect))

source§

fn fields(&self, func: &mut dyn FnMut(&[&dyn Reflect]))

source§

fn fields_mut(&mut self, func: &mut dyn FnMut(&mut [&mut dyn Reflect]))

source§

fn field(&self, name: &str, func: &mut dyn FnMut(Option<&dyn Reflect>))

source§

fn field_mut( &mut self, name: &str, func: &mut dyn FnMut(Option<&mut dyn Reflect>) )

source§

fn set_field( &mut self, field: &str, value: Box<dyn Reflect>, func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>) )

Calls user method specified with #[reflect(setter = ..)] or falls back to Reflect::field_mut
source§

fn as_array(&self, func: &mut dyn FnMut(Option<&dyn ReflectArray>))

source§

fn as_array_mut(&mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectArray>))

source§

fn as_list(&self, func: &mut dyn FnMut(Option<&dyn ReflectList>))

source§

fn as_list_mut(&mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectList>))

source§

fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&dyn ReflectInheritableVariable>) )

source§

fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectInheritableVariable>) )

source§

fn as_hash_map(&self, func: &mut dyn FnMut(Option<&dyn ReflectHashMap>))

source§

fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut dyn ReflectHashMap>) )

source§

impl Visit for Curve

source§

fn visit(&mut self, name: &str, visitor: &mut Visitor) -> VisitResult

source§

impl StructuralPartialEq for Curve

Auto Trait Implementations§

§

impl RefUnwindSafe for Curve

§

impl Send for Curve

§

impl Sync for Curve

§

impl Unpin for Curve

§

impl UnwindSafe for Curve

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> FieldValue for T
where T: 'static,

source§

fn as_any(&self) -> &(dyn Any + 'static)

Casts self to a &dyn Any
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<R> GetField for R
where R: Reflect,

source§

fn get_field<T>(&self, name: &str, func: &mut dyn FnMut(Option<&T>))
where T: 'static,

source§

fn get_field_mut<T>(&mut self, name: &str, func: &mut dyn FnMut(Option<&mut T>))
where T: 'static,

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> ResolvePath for T
where T: Reflect,

source§

fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>) )

source§

fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>) )

source§

fn get_resolve_path<'p, T: Reflect>( &self, path: &'p str, func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>) )

source§

fn get_resolve_path_mut<'p, T: Reflect>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>) )

source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where 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, U> TryFrom<U> for T
where 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 T
where 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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,