Designing and using a mesh with many subsets
I am trying to design a nice robot model in 3ds max and export it as an x-file, so I can use it.
That is fairly easy, but the problem is that when I design and position the various sub elements, they are stored in the xfile with vertices in the subobjects local coorinatesystem (which is good), but when I call mesh.drawSubset, the transformation matrix, which positions the subobejcts relative to eachother in the world, is used automatically.
That might have been a bit unclear, but the problem is this. I have a box with its center at 0,0,0 and a size of 200 in all three directions. On one of its corners (at 100,100,100) I have another box, and that other box has its model space center at 100,100,100. The other box has a size of 20 in all directions.
That is stored in an xfile and the first box has a transformmatrix which is the identity matrix, since its model space is identical to the world. The other box has a matrix which moves its center to 100,100,100. This means that if i call drawSubset for the two, they end up the right places, BUT....
If i want the small box to sit in the corner of the other and rotate, then I have a problem. I should rotate the box before the transform matrix moves it. If not then the box rotates arround the world center and not its own center.
How do I control when the transformationmatrix from the xfile is being used? It seems that it is being used before the worldtransform that I specify. Or simply... how do I make the small box sit in the corner of the other and rotate arrount its own (small box') center?

