Struct bezier_rs::ManipulatorGroup
source · 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>
impl<ManipulatorGroupId: Identifier> ManipulatorGroup<ManipulatorGroupId>
sourcepub fn new(
anchor: DVec2,
in_handle: Option<DVec2>,
out_handle: Option<DVec2>
) -> Self
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
sourcepub fn new_anchor(anchor: DVec2) -> Self
pub fn new_anchor(anchor: DVec2) -> Self
Construct a new manipulator point with just an anchor position
sourcepub fn new_with_id(
anchor: DVec2,
in_handle: Option<DVec2>,
out_handle: Option<DVec2>,
id: ManipulatorGroupId
) -> Self
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
sourcepub fn new_anchor_with_id(anchor: DVec2, id: ManipulatorGroupId) -> Self
pub fn new_anchor_with_id(anchor: DVec2, id: ManipulatorGroupId) -> Self
Construct a new manipulator point with just an anchor position and an id
sourcepub fn to_bezier(
&self,
end_group: &ManipulatorGroup<ManipulatorGroupId>
) -> Bezier
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.
sourcepub fn apply_transform(&mut self, affine_transform: DAffine2)
pub fn apply_transform(&mut self, affine_transform: DAffine2)
Apply a transformation to all of the ManipulatorGroup points
Trait Implementations§
source§impl<ManipulatorGroupId: Clone + Identifier> Clone for ManipulatorGroup<ManipulatorGroupId>
impl<ManipulatorGroupId: Clone + Identifier> Clone for ManipulatorGroup<ManipulatorGroupId>
source§fn clone(&self) -> ManipulatorGroup<ManipulatorGroupId>
fn clone(&self) -> ManipulatorGroup<ManipulatorGroupId>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<ManipulatorGroupId: Identifier> Debug for ManipulatorGroup<ManipulatorGroupId>
impl<ManipulatorGroupId: Identifier> Debug for ManipulatorGroup<ManipulatorGroupId>
source§impl<ManipulatorGroupId: Identifier> Hash for ManipulatorGroup<ManipulatorGroupId>
impl<ManipulatorGroupId: Identifier> Hash for ManipulatorGroup<ManipulatorGroupId>
source§impl<ManipulatorGroupId: PartialEq + Identifier> PartialEq for ManipulatorGroup<ManipulatorGroupId>
impl<ManipulatorGroupId: PartialEq + Identifier> PartialEq for ManipulatorGroup<ManipulatorGroupId>
source§fn eq(&self, other: &ManipulatorGroup<ManipulatorGroupId>) -> bool
fn eq(&self, other: &ManipulatorGroup<ManipulatorGroupId>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<ManipulatorGroupId: Copy + Identifier> Copy for ManipulatorGroup<ManipulatorGroupId>
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> 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