pub struct ControlPoint {
pub position: Vec2,
pub in_tangent: Vec2,
pub out_tangent: Vec2,
pub weight: f32,
pub broken_tangents: bool,
pub corner: bool,
}Fields§
§position: Vec2§in_tangent: Vec2§out_tangent: Vec2§weight: f32§broken_tangents: bool§corner: boolImplementations§
Source§impl ControlPoint
impl ControlPoint
pub fn new(pos: Vec2) -> Self
pub fn corner(pos: Vec2) -> Self
pub fn with_tangents(pos: Vec2, in_t: Vec2, out_t: Vec2) -> Self
pub fn in_handle_world(&self) -> Vec2
pub fn out_handle_world(&self) -> Vec2
Sourcepub fn set_out_tangent_smooth(&mut self, new_out: Vec2)
pub fn set_out_tangent_smooth(&mut self, new_out: Vec2)
Mirror the out tangent to maintain C1 continuity
Sourcepub fn set_in_tangent_smooth(&mut self, new_in: Vec2)
pub fn set_in_tangent_smooth(&mut self, new_in: Vec2)
Mirror the in tangent to maintain C1 continuity
Trait Implementations§
Source§impl Clone for ControlPoint
impl Clone for ControlPoint
impl Copy for ControlPoint
Source§impl Debug for ControlPoint
impl Debug for ControlPoint
Source§impl PartialEq for ControlPoint
impl PartialEq for ControlPoint
impl StructuralPartialEq for ControlPoint
Auto Trait Implementations§
impl Freeze for ControlPoint
impl RefUnwindSafe for ControlPoint
impl Send for ControlPoint
impl Sync for ControlPoint
impl Unpin for ControlPoint
impl UnsafeUnpin for ControlPoint
impl UnwindSafe for ControlPoint
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.