Struct flo_animation::PathCurve
[−]
[src]
pub struct PathCurve(pub PathPoint, pub PathElement);
A start point and a following element describes a bezier curve
Trait Implementations
impl Copy for PathCurve
[src]
impl Clone for PathCurve
[src]
fn clone(&self) -> PathCurve
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl BezierCurve for PathCurve
[src]
A point and an element form a bezier curve (ie, a start point and the following element)
type Point = PathPoint
fn from_points(
start: PathPoint,
end: PathPoint,
control_point1: PathPoint,
control_point2: PathPoint
) -> PathCurve
[src]
start: PathPoint,
end: PathPoint,
control_point1: PathPoint,
control_point2: PathPoint
) -> PathCurve
Creates a new bezier curve of the same type from some points Read more
fn start_point(&self) -> PathPoint
[src]
The start point of this curve Read more
fn end_point(&self) -> PathPoint
[src]
The end point of this curve Read more
fn control_points(&self) -> (PathPoint, PathPoint)
[src]
The control points in this curve Read more
fn reverse(self) -> Self
[src]
Reverses the direction of this curve Read more
fn point_at_pos(&self, t: f64) -> Self::Point
[src]
Given a value t from 0 to 1, returns a point on this curve Read more
fn subdivide(&self, t: f64) -> (Self, Self)
[src]
Given a value t from 0 to 1, finds a point on this curve and subdivides it, returning the two resulting curves Read more
fn bounding_box(&self) -> (Self::Point, Self::Point)
[src]
Computes the bounds of this bezier curve Read more
fn find_extremities(&self) -> Vec<f64>
[src]
Finds the t values where this curve has extremities Read more
fn fit_from_points(points: &[Self::Point], max_error: f64) -> Option<Vec<Self>>
[src]
Generates a curve by attempting to find a best fit against a set of points Read more
fn estimate_length(&self, max_t: f64) -> f64
[src]
Attempts to estimate the length of this curve Read more