|
KiCad PCB EDA Suite
|
Generic cubic Bezier representation. More...
#include <bezier_curves.h>
Public Member Functions | |
| BEZIER ()=default | |
| constexpr | BEZIER (const VECTOR2< NumericType > &aStart, const VECTOR2< NumericType > &aC1, const VECTOR2< NumericType > &aC2, const VECTOR2< NumericType > &aEnd) |
| constexpr VECTOR2< NumericType > | PointAt (double aT) const |
| Evaluate the Bezier curve at a given t value. | |
| constexpr void | Split (double aT, BEZIER &aLeft, BEZIER &aRight) const |
| Split the Bezier curve into two curves at aT using de Casteljau subdivision. | |
| constexpr BEZIER | SubCurve (double aT0, double aT1) const |
| Extract a sub-curve from aT0 to aT1 using de Casteljau subdivision. | |
Public Attributes | |
| VECTOR2< NumericType > | Start |
| VECTOR2< NumericType > | C1 |
| VECTOR2< NumericType > | C2 |
| VECTOR2< NumericType > | End |
Generic cubic Bezier representation.
Definition at line 90 of file bezier_curves.h.
Referenced by Split(), and SubCurve().
|
inlineconstexpr |
Evaluate the Bezier curve at a given t value.
aT doesn't have to be in the range [0, 1], but if it's not, the point will not be on the curve.
| aT | the t value to evaluate the curve at (0 = start, 1 = end) |
Definition at line 110 of file bezier_curves.h.
References C1, C2, End, and Start.
Referenced by BOOST_AUTO_TEST_CASE(), and SubCurve().
|
inlineconstexpr |
Split the Bezier curve into two curves at aT using de Casteljau subdivision.
| aT | the t value to split the curve at (0 = start, 1 = end). |
| aLeft | receives the curve segment from 0 to aT. |
| aRight | receives the curve segment from aT to 1. |
Definition at line 129 of file bezier_curves.h.
References BEZIER(), C1, C2, End, and Start.
Referenced by SubCurve().
|
inlineconstexpr |
Extract a sub-curve from aT0 to aT1 using de Casteljau subdivision.
Definition at line 145 of file bezier_curves.h.
References BEZIER(), left, PointAt(), right, and Split().
Referenced by BOOST_AUTO_TEST_CASE().
Definition at line 194 of file bezier_curves.h.
Referenced by BEZIER(), bezierSpeedAt(), PointAt(), Split(), and TransformEllipseToBeziers().
Definition at line 195 of file bezier_curves.h.
Referenced by BEZIER(), bezierSpeedAt(), PointAt(), Split(), and TransformEllipseToBeziers().
Definition at line 196 of file bezier_curves.h.
Referenced by BEZIER(), bezierSpeedAt(), BOOST_AUTO_TEST_CASE(), PointAt(), Split(), and TransformEllipseToBeziers().
Definition at line 193 of file bezier_curves.h.
Referenced by BEZIER(), bezierSpeedAt(), BOOST_AUTO_TEST_CASE(), PointAt(), Split(), and TransformEllipseToBeziers().