QuadraticBezier class
Concrete class of quadratic Bézier curves.
Constructors
-
QuadraticBezier(List<
Vector2> points) -
Constructs a quadratic Bézier curve from a List of
Vector2
. The first point inpoints
will be the curve's start point, the second its control point, and the third its end point.
Properties
- boundingBox → Aabb2
-
Returns the axis-aligned bounding box of the curve.
no setterinherited
- endPoint → Vector2
-
The ending guide point for the curve.
no setterinherited
-
extrema
→ List<
double> -
Returns the parameter values that correspond with extrema on both the x
and y axes.
no setterinherited
-
extremaOnX
→ List<
double> -
Returns the parameter values that correspond with minimum and maximum values
on the x axis.
no setterinherited
-
extremaOnY
→ List<
double> -
Returns the parameter values that correspond with minimum and maximum values
on the y axis.
no setterinherited
-
firstOrderDerivativePoints
→ List<
Vector2> -
Derivative points for the first order.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClockwise → bool
-
True if the curve is clockwise.
no setterinherited
- isLinear → bool
-
True if the y values of the control points after being translated and rotated
are within a specified small distance (the constant linearTolerance) from zero.
no setterinherited
- isSimple → bool
-
True if the normal vectors at the start and end points form an angle less
than 60 degrees.
no setterinherited
- length → double
-
The approximate arc length of the curve.
no setterinherited
- order → int
-
The order of the Bézier curve.
no setteroverride
-
points
→ List<
Vector2> -
The start point, end point and control points of the Bézier curve.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startPoint → Vector2
-
The starting guide point for the curve.
no setterinherited
Methods
-
derivativeAt(
double t, {List< Vector2> ? cachedFirstOrderDerivativePoints}) → Vector2 -
Returns the tangent vector at parameter
t
.override -
derivativePoints(
{int derivativeOrder = 1}) → List< Vector2> -
Derivative points for the order
derivativeOrder
. Derivative points describe the derivative function of the polynomial function of this and are used by other methods to calculate derivative values.inherited -
hullPointsAt(
double t) → List< Vector2> -
Returns the hull points at the parameter value
t
.inherited -
intersectionsWithCurve(
Bezier curve, {double curveIntersectionThreshold = 0.5, double minTValueDifference = 0.003}) → List< Intersection> -
Returns the List of intersections between this and
curve
.inherited -
intersectionsWithLineSegment(
Vector2 lineStartPoint, Vector2 lineEndPoint) → List< double> -
Returns the List of parameter values for intersections between this and
the line segment defined by
lineStartPoint
andlineEndPoint
.inherited -
intersectionsWithSelf(
{double curveIntersectionThreshold = 0.5, double minTValueDifference = 0.003}) → List< Intersection> -
Returns the List of intersections between this and itself.
inherited
-
leftSubcurveAt(
double t) → Bezier -
Returns the subcurve obtained by taking the portion of the curve to the
left of parameter value
t
.inherited -
nearestTValue(
Vector2 point, {List< Vector2> ? cachedPositionLookUpTable, double stepSize = 0.1}) → double -
Returns the parameter value along the curve that is closest (in terms of
geometric distance) to the given
point
. The approximation uses a two-pass projection test that relies on the curve's position look up table. First, the method determines the point in the look up table that is closest topoint
. Afterward, it checks the fine interval around that point to see if a better projection can be found.inherited -
normalAt(
double t, {List< Vector2> ? cachedFirstOrderDerivativePoints}) → Vector2 -
The normal vector of the curve at parameter value
t
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offsetCurve(
double distance, {double stepSize = 0.01}) → List< Bezier> -
Returns a List of
Bezier
instances that, when taken together, form an approximation of the offset curvedistance
units away from this.inherited -
offsetPointAt(
double t, double distance, {List< Vector2> ? cachedFirstOrderDerivativePoints}) → Vector2 -
Returns the point
distance
units away in the clockwise direction from the point along the curve at parameter valuet
.inherited -
overlaps(
Bezier curve) → bool -
True if the bounding box of this intersects with the bounding box of
curve
.inherited -
pointAt(
double t) → Vector2 -
Returns the point along the curve at the parameter value
t
.override -
positionLookUpTable(
{int intervalsCount = 50}) → List< Vector2> -
Returns a List of
Vector2
positions at evenly spaced parameter values from 0.0 to 1.0.inherited -
rightSubcurveAt(
double t) → Bezier -
Returns the subcurve obtained by taking the portion of the curve to the
right of parameter value
t
.inherited -
scaledCurve(
double distance) → Bezier -
Returns a Bezier instance whose endpoints are
distance
units away from the endpoints of this and whose control points have been moved in the same direction.inherited -
simpleSlices(
{double stepSize = 0.01}) → List< BezierSlice> -
Returns a List of
BezierSlice
instances containing simple Bezier instances along with their endpoint parameter values from this. In cases where no simple subcurves can be found with the givenstepSize
, returns an empty List.inherited -
simpleSubcurves(
{double stepSize = 0.01}) → List< Bezier> -
Returns a List of simple
Bezier
instances that make up this when taken together. In cases where no simple subcurves can be found with the givenstepSize
, returns an empty List.inherited -
subcurveBetween(
double t1, double t2) → Bezier -
Returns the subcurve obtained by taking the portion of the curve between
parameter values
t1
andt2
.inherited -
toCubicBezier(
) → CubicBezier - Returns a CubicBezier instance with the same start and end points as this and control points positioned so it produces identical points along the curve as this.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited