Hello,
I'm trying to create function which will check mousePosition in order to check if it collides with visible area of my object and if yes it will delete the object from an array. For example: If I go with cursor over some circle's outline(when I draw circle only outlines are enabled to be visible in my window) and then I click on the outline the circle will be deleted from my circle vector. It can be done trough sin and cos but it would be very uneficient since it would have to store position from every pixel in the perimeter of that circle for every circle I draw so I was wondering if there's is some kind of OpenGL or SFML function which can tell position of the pixels in circles outline so i can write som code like:
for(int i = 0; i < object.countOfDrawnPixels() /*<-- function that I am seeking for */; i++)
{
if(object.getCoordinatesOfPixel.at(i) /*<-- also function that I am seeking for*/ == sf::Mouse::getPosition())
{
pixelTriggered = true;
}
}