Made a quick function to calculate the points for a cubic bezier curve. To use it, you'll need:
- A start point.
- A end point.
- Two control points determining the initial slope at the start/end.
- The number of segments to draw (1 = straight line).
It will then return a list of points on the actual bezier curve to draw.
There's probably room for improvements here, but you can use it as a starting point. This is no
sf::Drawable, so you'll have to use your own drawing (e.g. drawing lines or using a
sf::VertexArray).
Code on the WikiMight be interesting to have some premade class similar to
sf::Line I guess.
Example drawing (20 bezier curves with 50 segments each):