mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 19:11:36 +08:00
BezierQuad: use template type Tp for default
This commit is contained in:
@@ -102,7 +102,7 @@ public:
|
|||||||
* Set new bezier points and duration
|
* Set new bezier points and duration
|
||||||
*/
|
*/
|
||||||
void setBezier(const Vector3_t &pt0, const Vector3_t &ctrl, const Vector3_t &pt1,
|
void setBezier(const Vector3_t &pt0, const Vector3_t &ctrl, const Vector3_t &pt1,
|
||||||
Tp duration = 1.0f);
|
Tp duration = (Tp)1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set duration
|
* Set duration
|
||||||
@@ -165,7 +165,7 @@ public:
|
|||||||
* the desired velocity vectors at the end points.
|
* the desired velocity vectors at the end points.
|
||||||
*/
|
*/
|
||||||
void setBezFromVel(const Vector3_t &ctrl, const Vector3_t &vel0, const Vector3_t &vel1,
|
void setBezFromVel(const Vector3_t &ctrl, const Vector3_t &vel0, const Vector3_t &vel1,
|
||||||
const Tp duration = 1.0f);
|
const Tp duration = (Tp)1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the arc length of a bezier spline
|
* Return the arc length of a bezier spline
|
||||||
@@ -183,8 +183,8 @@ private:
|
|||||||
Tp _duration = (Tp)1; /**< Total time to travle along spline */
|
Tp _duration = (Tp)1; /**< Total time to travle along spline */
|
||||||
|
|
||||||
Tp _cached_arc_length = (Tp)0; /**< The saved arc length of the spline */
|
Tp _cached_arc_length = (Tp)0; /**< The saved arc length of the spline */
|
||||||
Tp _cached_resolution = (Tp)(
|
Tp _cached_resolution = (Tp)(-1); /**< The resolution used to compute the arc length.
|
||||||
-1); /**< The resolution used to compute the arc length. Negative number means that cache is not up to date. */
|
Negative number means that cache is not up to date. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Golden section search
|
* Golden section search
|
||||||
|
|||||||
Reference in New Issue
Block a user