2d collision

any info about performing 2d collision detection between triangles and boxes ?
Thanks !

First idea I get on this is to test the intersection betwenn any of the triangles lines with any of the box lines. If at least one intersects, they are colliding.
If none of the lines intersect, test if the center of the triangle lies within the center of the box. At last, test if the center of the box lies within the center of the triangle. If none of the above tests succed, the triangle and the box does not collide.