pub struct ManipulatorGroup<ManipulatorGroupId: Identifier> {
    pub anchor: DVec2,
    pub in_handle: Option<DVec2>,
    pub out_handle: Option<DVec2>,
    pub id: ManipulatorGroupId,
}
Expand description

Structure used to represent a single anchor with up to two optional associated handles along a Subpath

Fields§

§anchor: DVec2§in_handle: Option<DVec2>§out_handle: Option<DVec2>§id: ManipulatorGroupId

Implementations§

source§

impl<ManipulatorGroupId: Identifier> ManipulatorGroup<ManipulatorGroupId>

source

pub fn new( anchor: DVec2, in_handle: Option<DVec2>, out_handle: Option<DVec2> ) -> Self

Construct a new manipulator group from an anchor, in handle and out handle

source

pub fn new_anchor(anchor: DVec2) -> Self

Construct a new manipulator point with just an anchor position

source

pub fn new_with_id( anchor: DVec2, in_handle: Option<DVec2>, out_handle: Option<DVec2>, id: ManipulatorGroupId ) -> Self

Construct a new manipulator group from an anchor, in handle, out handle and an id

source

pub fn new_anchor_with_id(anchor: DVec2, id: ManipulatorGroupId) -> Self

Construct a new manipulator point with just an anchor position and an id

source

pub fn to_bezier( &self, end_group: &ManipulatorGroup<ManipulatorGroupId> ) -> Bezier

Create a bezier curve that starts at the current manipulator group and finishes in the end_group manipulator group.

source

pub fn apply_transform(&mut self, affine_transform: DAffine2)

Apply a transformation to all of the ManipulatorGroup points

source

pub fn is_finite(&self) -> bool

Are all handles at finite positions

source

pub fn flip(self) -> Self

Reverse directions of handles

Trait Implementations§

source§

impl<ManipulatorGroupId: Clone + Identifier> Clone for ManipulatorGroup<ManipulatorGroupId>

source§

fn clone(&self) -> ManipulatorGroup<ManipulatorGroupId>

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<ManipulatorGroupId: Identifier> Debug for ManipulatorGroup<ManipulatorGroupId>

source§

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

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

impl<ManipulatorGroupId: Identifier> Hash for ManipulatorGroup<ManipulatorGroupId>

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<ManipulatorGroupId: PartialEq + Identifier> PartialEq for ManipulatorGroup<ManipulatorGroupId>

source§

fn eq(&self, other: &ManipulatorGroup<ManipulatorGroupId>) -> 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<ManipulatorGroupId: Copy + Identifier> Copy for ManipulatorGroup<ManipulatorGroupId>

source§

impl<ManipulatorGroupId: Identifier> StructuralPartialEq for ManipulatorGroup<ManipulatorGroupId>

Auto Trait Implementations§

§

impl<ManipulatorGroupId> RefUnwindSafe for ManipulatorGroup<ManipulatorGroupId>
where ManipulatorGroupId: RefUnwindSafe,

§

impl<ManipulatorGroupId> Send for ManipulatorGroup<ManipulatorGroupId>
where ManipulatorGroupId: Send,

§

impl<ManipulatorGroupId> Sync for ManipulatorGroup<ManipulatorGroupId>
where ManipulatorGroupId: Sync,

§

impl<ManipulatorGroupId> Unpin for ManipulatorGroup<ManipulatorGroupId>
where ManipulatorGroupId: Unpin,

§

impl<ManipulatorGroupId> UnwindSafe for ManipulatorGroup<ManipulatorGroupId>
where ManipulatorGroupId: UnwindSafe,

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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