#[non_exhaustive]pub enum PathPiece {
Segment {
start: Point3,
end: Point3,
},
Arc {
centre: Point3,
axis: Vec3,
start: Point3,
angle: Scalar,
},
}Expand description
One smooth piece of a swept disk’s directrix.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Segment
A straight segment from start to end.
Arc
A circular arc: start turned by angle radians, right-handed,
about the line through centre along the unit axis. start - centre must be perpendicular to axis; a negative angle turns
the other way.
Implementations§
Source§impl PathPiece
impl PathPiece
Sourcepub fn start_point(&self) -> Point3
pub fn start_point(&self) -> Point3
The first point, in the direction of travel.
Sourcepub fn start_tangent(&self) -> Vec3
pub fn start_tangent(&self) -> Vec3
The unit tangent at the start, in the direction of travel.
Sourcepub fn end_tangent(&self) -> Vec3
pub fn end_tangent(&self) -> Vec3
The unit tangent at the end, in the direction of travel.
Trait Implementations§
impl Copy for PathPiece
impl StructuralPartialEq for PathPiece
Auto Trait Implementations§
impl Freeze for PathPiece
impl RefUnwindSafe for PathPiece
impl Send for PathPiece
impl Sync for PathPiece
impl Unpin for PathPiece
impl UnsafeUnpin for PathPiece
impl UnwindSafe for PathPiece
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