I have constructed a 3D model in Flash CS4/AS3 consisting of a space containing numerous block Display objects. For each block, I maintain an array of Vector3D vertices. I rotate a camera viewpoint around the constructed 3D model.
My question: Given the current camera viewpoint, how do I determine the correct order for my block DisplayObjects?
By calculating the average distance from the camera to a block's vertices, I can determine the correct order but only when all blocks are of the same dimensions and positions symmetrically about the space. However, this approach is too crude for the space that I need to represent.