pub struct ConnectionRenderer {
pub smoothness: f32,
pub line_width: f32,
pub arrow_size: f32,
pub selected_color: Vec4,
pub default_color: Vec4,
pub invalid_color: Vec4,
pub hover_color: Vec4,
pub segment_count: usize,
}Fields§
§smoothness: f32§line_width: f32§arrow_size: f32§selected_color: Vec4§default_color: Vec4§invalid_color: Vec4§hover_color: Vec4§segment_count: usizeImplementations§
Source§impl ConnectionRenderer
impl ConnectionRenderer
pub fn get_curve_for_connection(&self, from: Vec2, to: Vec2) -> BezierCurve
pub fn get_polyline_for_connection(&self, from: Vec2, to: Vec2) -> Vec<Vec2>
pub fn get_arrow_transform(&self, curve: &BezierCurve) -> (Vec2, Vec2)
pub fn hit_test_connection( &self, from: Vec2, to: Vec2, point: Vec2, threshold: f32, ) -> bool
Trait Implementations§
Source§impl Clone for ConnectionRenderer
impl Clone for ConnectionRenderer
Source§impl Debug for ConnectionRenderer
impl Debug for ConnectionRenderer
Auto Trait Implementations§
impl Freeze for ConnectionRenderer
impl RefUnwindSafe for ConnectionRenderer
impl Send for ConnectionRenderer
impl Sync for ConnectionRenderer
impl Unpin for ConnectionRenderer
impl UnsafeUnpin for ConnectionRenderer
impl UnwindSafe for ConnectionRenderer
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.