[−][src]Struct flo_curves::bezier::CurveSection
Represents a subsection of a bezier curve
Methods
impl<'a, C: 'a + BezierCurve> CurveSection<'a, C>
[src]
pub fn new(curve: &'a C, t_min: f64, t_max: f64) -> CurveSection<'a, C>
[src]
Creates a new curve section from a region of another bezier curve
pub fn t_for_t(&self, t: f64) -> f64
[src]
Returns the t value on the full curve for a t value on the section
pub fn is_tiny(&self) -> bool
[src]
Returns true if this section is so small as to represent a point
pub fn subsection(&self, t_min: f64, t_max: f64) -> CurveSection<'a, C>
[src]
Creates a sub-section from this curve section (dividing it further)
Unlike calling section
, this keeps the same type and avoids the need
for recursive recalculation for things like the control points. This means
that original_curve_t_values
will return the coordinates for the same
original curve as the curve that this subsection was created from.
pub fn original_curve_t_values(&self) -> (f64, f64)
[src]
Returns the original t values (t_min, t_max) that this section was created from
pub fn section_t_for_original_t(&self, t: f64) -> f64
[src]
Given a 't' value on the original curve, returns the equivalent value on this section
Trait Implementations
impl<'a, C: 'a + BezierCurve> BezierCurve for CurveSection<'a, C>
[src]
fn start_point(&self) -> Self::Point
[src]
The start point of this curve
fn end_point(&self) -> Self::Point
[src]
The end point of this curve
fn control_points(&self) -> (Self::Point, Self::Point)
[src]
The control points in this curve
fn point_at_pos(&self, t: f64) -> Self::Point
[src]
Given a value t from 0 to 1, returns a point on this curve
fn reverse<Curve: BezierCurveFactory<Point = Self::Point>>(self) -> Curve
[src]
fn t_for_point(&self, point: &Self::Point) -> Option<f64>
[src]
fn subdivide<Curve: BezierCurveFactory<Point = Self::Point>>(
&self,
t: f64
) -> (Curve, Curve)
[src]
&self,
t: f64
) -> (Curve, Curve)
fn bounding_box<Bounds: BoundingBox<Point = Self::Point>>(&self) -> Bounds
[src]
fn fast_bounding_box<Bounds: BoundingBox<Point = Self::Point>>(&self) -> Bounds
[src]
fn search_with_bounds<MatchFn: Fn(Self::Point, Self::Point) -> bool>(
&self,
max_error: f64,
match_fn: MatchFn
) -> Vec<f64>
[src]
&self,
max_error: f64,
match_fn: MatchFn
) -> Vec<f64>
fn find_extremities(&self) -> Vec<f64>
[src]
fn estimate_length(&self, max_t: f64) -> f64
[src]
fn section<'a>(&'a self, t_min: f64, t_max: f64) -> CurveSection<'a, Self>
[src]
impl<'a, C: Clone + 'a + BezierCurve> Clone for CurveSection<'a, C> where
C::Point: Clone,
C::Point: Clone,
[src]
C::Point: Clone,
C::Point: Clone,
fn clone(&self) -> CurveSection<'a, C>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, C: 'a + BezierCurve> Geo for CurveSection<'a, C>
[src]
Auto Trait Implementations
impl<'a, C> !RefUnwindSafe for CurveSection<'a, C>
impl<'a, C> Send for CurveSection<'a, C> where
C: Sync,
<C as Geo>::Point: Send,
C: Sync,
<C as Geo>::Point: Send,
impl<'a, C> !Sync for CurveSection<'a, C>
impl<'a, C> Unpin for CurveSection<'a, C> where
<C as Geo>::Point: Unpin,
<C as Geo>::Point: Unpin,
impl<'a, C> UnwindSafe for CurveSection<'a, C> where
C: RefUnwindSafe,
<C as Geo>::Point: UnwindSafe,
C: RefUnwindSafe,
<C as Geo>::Point: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,