Add BezierCurve:getSegment(t1, t2)

Returns a BezierCurve that corresponds to the curve-segment between t1 and t2
on the original curve.
This commit is contained in:
vrld
2015-03-22 19:22:18 +01:00
parent f7cb16be87
commit f32d770cf6
4 changed files with 64 additions and 0 deletions
+9
View File
@@ -113,6 +113,15 @@ public:
**/
Vector evaluate(double t) const;
/**
* Get curve segment starting at t1 and ending at t2.
* The new curve will be parametrized from 0 <= t <= 1.
* @param t1 Start of the segment.
* @param t2 End of the segment.
* @returns Bezier curve covering the segment.
*/
BezierCurve* getSegment(double t1, double t2) const;
/**
* Renders the curve by subdivision.
* @param accuracy The 'fineness' of the curve.