sway bars in no way touch the frame of the car...
the basic premise of a sway bar is that if one wheel moves up... the other wheel moves up. this means in a corner when the car wants to roll to the outside, the wheels stay planted because the body roll is absorbed into the bar instead of the spring on the outside.
this isn't exact... but it gives you an idea of the shape...
the ends connect to the lower control arms and rotate through the red holders there... you can see that if the left wheel were to move up (towards you) that the bar would flex and pull the right wheel up as well.
hope that helps you see what's going on