Struct fyrox_math::curve::Curve
source · pub struct Curve {
pub id: Uuid,
pub name: String,
pub keys: Vec<CurveKey>,
}Fields§
§id: Uuid§name: String§keys: Vec<CurveKey>Implementations§
source§impl Curve
impl Curve
pub fn set_id(&mut self, id: Uuid)
pub fn id(&self) -> Uuid
pub fn set_name<S: AsRef<str>>(&mut self, name: S)
pub fn name(&self) -> &str
pub fn clear(&mut self)
pub fn is_empty(&self) -> bool
pub fn keys(&self) -> &[CurveKey]
pub fn keys_values(&mut self) -> impl Iterator<Item = &mut f32>
pub fn add_key(&mut self, new_key: CurveKey)
pub fn move_key(&mut self, key_id: usize, location: f32)
pub fn max_location(&self) -> f32
pub fn value_at(&self, location: f32) -> f32
pub fn bounds(&self) -> Rect<f32>
Trait Implementations§
source§impl PartialEq for Curve
impl PartialEq for Curve
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.