I have a bunch of side by side rectangles that make up a matrix that will be colored if they intersect with a specified rectangle.
The problem is that when I use the intersect function, I do not know how to specify that I just want the intersection between the matrix rectangles and just the specified rectangle shape bounds, not the whole bounding box (it has been rotated).
So, basically the black squares that touch the white rectangle are the only ones that should be colored yellow:
if (Tiles[r][c].getGlobalBounds().intersects(Environment_1_Barrier.getGlobalBounds()))
{
Tiles[r][c].setFillColor(sf::Color::Yellow);
}