Hello, so I am watching a great video on "Line Of Sight". Everything has gone great, until he used his "FillTriangle" function to create the sight. Here is the part I need to figure out how to do in SFML properly.
FillTriangle(
fSourceX,
fSourceY,
get<1>(vecVisibilityPolygonPoints[vecVisibilityPolygonPoints.size() - 1]),
get<2>(vecVisibilityPolygonPoints[vecVisibilityPolygonPoints.size() - 1]),
get<1>(vecVisibilityPolygonPoints[0]),
get<2>(vecVisibilityPolygonPoints[0]));
The vector is a tuple of floats. (angle, x, y)
As far as I know, SFML doesn't work like this. Typically when I come across stuff like this, I'll manually set the size and position and call a draw on it. But this one has me confused.
You can do sf::CircleShape triangle(size,3) I know. How can I still use this formula and get a triangle out there using SFML?
I hope this question makes sense. Any help would be appreciated.
PS: I am using SelbaWards line function, but I'm hoping there is an easier way than trying to make a huge function to do this properly.