Detection of planes

Hi, I have a 3D model with several planes and some irregular surfaces. Are there any ways which I can detect the planes and also differentiate between them. My purpose is to find the largest plane and orientate the model such that the largest plane is on the xz plane.



Thanks for the link. I looked at the tutorial, and have a question. See, the example uses a triangle with vertices known. What I have is a complicated model made up of many triangles. So I’ll have to do a picking sort of thing to get three vertices off the plane I am interested in? I was thinking there may be a way to automatically detect the planes?

Sorry, but englsih is not my native english, I don’t understzand your question but I can tell you that in our 3d engine, we used the function for detection collision and we loop for each polygon for testing collision.