Just break paddle into 4 pieces, and keep it as one piece :)
Collide method returns -1 if rects do not collide, or a first index of collision.
CollideIndex method returns IEnumerable indexes of collided rects. ;)
Paddle p;
World w;
Ball b;
Rect[] paddleSections = new Rect[]
{
p.Section[0],
p.Section[1],
p.Section[2],
p.Section[3],
}
Rect[] worldSections = new Rect[]
{
new Rect(p.Top, p.Left, p.Right, p.Bottom) // just simple world, for example
}
Rect[] ballSections = new Rect[]
{
new Rect(p.Top, p.Left, p.Right, p.Bottom) // just one ball piece, for example
}
Rect[] bricksSection = GetBrickRects();
int index = 0;
if ((index = Collide(ballSections, worldSections) != -1)
{
foreach(int collideIndex in CollideIndex(ballSection[index], worldSection)
{
// worldSection[collideIndex] intersects ballSections[index]
...
// something goes up here
}
}
Call your favorite algorithm against balls, walls, bricks.
Do not forget to send me a copy of your game!