![]() |
RaidZeroLib
Coroutine robot framework for VEX V5
|
Piecewise cubic Bézier path over t ∈ [0, 1] with segment-uniform parameterization. More...
#include <PiecewiseCubicBezier.hpp>
Public Member Functions | |
| PiecewiseCubicBezier (std::initializer_list< CubicBezier::Knot > knots) | |
| Constructs a piecewise cubic path from consecutive control knots. | |
| Point | getPoint (double t) const noexcept override |
Position on the path at global parameter t. | |
| Point | getVelocity (double t) const noexcept override |
First derivative dP/dt at global parameter t (w.r.t. global parameter). | |
| Point | getAcceleration (double t) const noexcept override |
Second derivative d²P/dt² at global parameter t (w.r.t. global parameter). | |
| Public Member Functions inherited from rz::ParametricPath | |
| virtual | ~ParametricPath ()=default |
| Virtual destructor. | |
| virtual Angle | getTheta (double t) const noexcept |
| Path heading: orientation of the tangent dP/dt. | |
| virtual Curvature | getCurvature (double t) const noexcept |
| Signed curvature κ(t) = wedge(dP/dt, d²P/dt²) / |dP/dt|³. | |
| virtual Length | getLength (double tStart=0, double tEnd=1) const noexcept |
Arclength along the path between parameters tStart and tEnd. | |
| virtual double | stepT (double t, Length distance) const noexcept |
| Advance the parameter by a target arclength measured along the path. | |
| virtual DiscretePath | toDiscrete (Length distance, bool includeEnd=true) const |
Piecewise cubic Bézier path over t ∈ [0, 1] with segment-uniform parameterization.
Builds a chain of cubic Bézier segments from consecutive control “knots.” The global parameter t is mapped uniformly by segment: if there are N segments, segment k occupies t ∈ [k/N, (k+1)/N], and the segment-local parameter is fractionalIndex = N * t − k in [0, 1].
Continuity: The curve is C¹ guaranteed continuous, C² is up to the user's choice of control points
|
explicit |
Constructs a piecewise cubic path from consecutive control knots.
For a list of M control points, creates M-1 cubic segments: segment i uses knots knots[i] (start) and knots[i+1] (end).
| knots | Non-empty initializer list of control knots (size ≥ 2). |
|
overridevirtualnoexcept |
Second derivative d²P/dt² at global parameter t (w.r.t. global parameter).
| t | Dimensionless global parameter. |
Implements rz::ParametricPath.
|
overridevirtualnoexcept |
Position on the path at global parameter t.
Maps t to the owning segment and evaluates that cubic at its local parameter.
| t | Dimensionless global parameter (clamped conceptually to [0, 1]). |
Implements rz::ParametricPath.
|
overridevirtualnoexcept |
First derivative dP/dt at global parameter t (w.r.t. global parameter).
Internally computes the segment index and local parameter, and returns the cubic’s derivative with respect to its local parameter, scaled by the segment mapping (here, uniform per segment).
| t | Dimensionless global parameter. |
Implements rz::ParametricPath.