BezierQuad: use template type Tp for default

This commit is contained in:
Dennis Mannhart
2018-07-25 08:50:10 +02:00
parent 7559610a7b
commit 609d412217
+4 -4
View File
@@ -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