mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
[BezierCurve] Add getDerivative(), move(), rotate() and scale().
This commit is contained in:
@@ -48,6 +48,11 @@ public:
|
||||
return controlPoints.size() - 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns First derivative of the curve.
|
||||
*/
|
||||
BezierCurve getDerivative() const;
|
||||
|
||||
/**
|
||||
* @returns i'th control point.
|
||||
**/
|
||||
@@ -68,6 +73,26 @@ public:
|
||||
**/
|
||||
void insertControlPoint(const Vector &point, int pos = -1);
|
||||
|
||||
/**
|
||||
* Move the curve.
|
||||
* @param t Translation vector.
|
||||
*/
|
||||
void translate(const Vector &t);
|
||||
|
||||
/**
|
||||
* Rotate the curve.
|
||||
* @param phi Rotation angle (radians).
|
||||
* @param center Rotation center.
|
||||
*/
|
||||
void rotate(double phi, const Vector ¢er);
|
||||
|
||||
/**
|
||||
* Scale the curve.
|
||||
* @param s Scale factor.
|
||||
* @param center Scale center.
|
||||
*/
|
||||
void scale(double phi, const Vector ¢er);
|
||||
|
||||
/**
|
||||
* Evaluates the curve at time t.
|
||||
* @param t Curve parameter, must satisfy 0 <= t <= 1.
|
||||
|
||||
Reference in New Issue
Block a user