FastLED 3.9.15
|
Catmull–Rom spline through arbitrary points.
Simply add control points and compute(α) will smoothly interpolate through them.
Definition at line 244 of file xypath_impls.h.
#include <xypath_impls.h>
Public Member Functions | |
CatmullRomPath (const Ptr< CatmullRomParams > &p=NewPtr< CatmullRomParams >()) | |
void | addPoint (float x, float y) |
Add a point with separate x,y coordinates. | |
void | addPoint (vec2f p) |
Add a point in [0,1]² to the path. | |
void | clear () |
Clear all control points. | |
vec2f | compute (float alpha) override |
const Str | name () const override |
CatmullRomParams & | params () |
const CatmullRomParams & | params () const |
size_t | size () const |
Get the number of control points. | |
![]() | |
virtual bool | hasDrawBounds (rect< int > *bounds) |
![]() | |
virtual int | ref_count () const |
Private Member Functions | |
vec2f | interpolate (const vec2f &p0, const vec2f &p1, const vec2f &p2, const vec2f &p3, float t) const |
Private Attributes | |
Ptr< CatmullRomParams > | mParams |
Additional Inherited Members | |
![]() | |
Referent () | |
Referent (const Referent &) | |
Referent (Referent &&) | |
virtual | ~Referent () |
virtual void | destroy () const |
Referent & | operator= (const Referent &) |
Referent & | operator= (Referent &&) |
virtual void | ref () const |
virtual void | unref () const |