|
@@ -25,6 +25,8 @@ public:
|
|
|
virtual Point2 point(double param) const = 0;
|
|
|
/// Returns the direction the edge has at the point specified by the parameter.
|
|
|
virtual Vector2 direction(double param) const = 0;
|
|
|
+ /// Returns the change of direction (second derivative) at the point specified by the parameter.
|
|
|
+ virtual Vector2 directionChange(double param) const = 0;
|
|
|
/// Returns the minimum signed distance between origin and the edge.
|
|
|
virtual SignedDistance signedDistance(Point2 origin, double ¶m) const = 0;
|
|
|
/// Converts a previously retrieved signed distance from origin to pseudo-distance.
|
|
@@ -53,6 +55,7 @@ public:
|
|
|
LinearSegment * clone() const;
|
|
|
Point2 point(double param) const;
|
|
|
Vector2 direction(double param) const;
|
|
|
+ Vector2 directionChange(double param) const;
|
|
|
SignedDistance signedDistance(Point2 origin, double ¶m) const;
|
|
|
int scanlineIntersections(double x[3], int dy[3], double y) const;
|
|
|
void bound(double &l, double &b, double &r, double &t) const;
|
|
@@ -73,6 +76,7 @@ public:
|
|
|
QuadraticSegment * clone() const;
|
|
|
Point2 point(double param) const;
|
|
|
Vector2 direction(double param) const;
|
|
|
+ Vector2 directionChange(double param) const;
|
|
|
SignedDistance signedDistance(Point2 origin, double ¶m) const;
|
|
|
int scanlineIntersections(double x[3], int dy[3], double y) const;
|
|
|
void bound(double &l, double &b, double &r, double &t) const;
|
|
@@ -81,6 +85,8 @@ public:
|
|
|
void moveEndPoint(Point2 to);
|
|
|
void splitInThirds(EdgeSegment *&part1, EdgeSegment *&part2, EdgeSegment *&part3) const;
|
|
|
|
|
|
+ EdgeSegment * convertToCubic() const;
|
|
|
+
|
|
|
};
|
|
|
|
|
|
/// A cubic Bezier curve.
|
|
@@ -93,6 +99,7 @@ public:
|
|
|
CubicSegment * clone() const;
|
|
|
Point2 point(double param) const;
|
|
|
Vector2 direction(double param) const;
|
|
|
+ Vector2 directionChange(double param) const;
|
|
|
SignedDistance signedDistance(Point2 origin, double ¶m) const;
|
|
|
int scanlineIntersections(double x[3], int dy[3], double y) const;
|
|
|
void bound(double &l, double &b, double &r, double &t) const;
|
|
@@ -101,6 +108,8 @@ public:
|
|
|
void moveEndPoint(Point2 to);
|
|
|
void splitInThirds(EdgeSegment *&part1, EdgeSegment *&part2, EdgeSegment *&part3) const;
|
|
|
|
|
|
+ void deconverge(int param, double amount);
|
|
|
+
|
|
|
};
|
|
|
|
|
|
}
|