Most 3D games use sphere to sphere collision, but for buildings bounding box would work better.
Just test the three attributes of each point against those of your square building, if any of the points lie inside there is a collision.
If you want some specific source code, please post what you have done so far.