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 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<ManipulatorGroup<ManipulatorGroupId>> for ManipulatorGroup<ManipulatorGroupId>
impl<ManipulatorGroupId: PartialEq + Identifier> PartialEq<ManipulatorGroup<ManipulatorGroupId>> 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 ==
.