70 BezierQuad(
const Tp pt0[3],
const Tp ctrl[3],
const Tp pt1[3], Tp duration = 1.0
f) :
105 Tp duration = (Tp)1);
168 const Tp duration = (Tp)1);
Tp _cached_resolution
The resolution used to compute the arc length.
Vector3_t getVelocity(const Tp t)
BezierQuad(const Vector3_t &pt0, const Vector3_t &ctrl, const Vector3_t &pt1, Tp duration=1.0f)
Constructor from vector.
void getBezier(Vector3_t &pt0, Vector3_t &ctrl, Vector3_t &pt1)
Tp getArcLength(const Tp resolution)
Tp _cached_arc_length
The saved arc length of the spline.
BezierQuad()
Empty constructor.
void setBezFromVel(const Vector3_t &ctrl, const Vector3_t &vel0, const Vector3_t &vel1, const Tp duration=(Tp) 1)
Vector3_t getAcceleration()
void getStatesClosest(Vector3_t &point, Vector3_t &vel, Vector3_t &acc, const Vector3_t pose)
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
void setDuration(const Tp time)
void getStates(Vector3_t &point, Vector3_t &vel, Vector3_t &acc, const Tp t)
Tp getDistToClosestPoint(const Vector3_t &pose)
Vector3_t getPoint(const Tp t)
Return point on bezier point corresponding to time t.
BezierQuad(const Tp pt0[3], const Tp ctrl[3], const Tp pt1[3], Tp duration=1.0f)
Constructor from array.
Vector3_t _pt0
Bezier starting point.
Vector3_t _pt1
bezier end point
Tp _getDistanceSquared(const Tp t, const Vector3_t &pose)
Tp _goldenSectionSearch(const Vector3_t &pose)
Tp _duration
Total time to travle along spline.
void setBezier(const Vector3_t &pt0, const Vector3_t &ctrl, const Vector3_t &pt1, Tp duration=(Tp) 1)
Set new bezier points and duration.
Vector3_t _ctrl
Bezier control point.