I've been trying to figure this thing out for weeks now, but with no luck.So, I am creating this program in WindowsForms and Xna, that allows users to create a 3D room. By draging and customizing diffrent .fbx models, they can "build" a room or whatever and then look at it in 3D.Everything worked nicely so far, untill I got to a point that involves scaling a model. A model is usually made up of multiple meshes, and each mesh has a class that contains information about that mesh such as, position,rotation,name,mesh,scaleFactor... This class also contains a list called ScalableAxes which contains strings of the axes name, in which this mesh can be scalled.
I have also included a parent-child relationship, when a user imports a .fbx model, there is also a custom .pdn file which contains information about parenting. Usually every mesh in the .fbx model becomes a child of a "empty mesh"(just a class, with no mesh or bone assigned to it).
Now lets say this "empty mesh" name is Body and it contains few meshes(childs) such as left side, right side, top side, bottom side, top door, bottom door. Lets say I scale Body on Y axis by a factor of 2. Since Body has no Mesh in his class assigned, it would skip this and loop thru his children. If a children has a mesh, then it would look to ScalableAxes list and if it contains Y(in this case) it would go on to scaling part.
The problem start here. Lets say I come to Left side, left side can be scaled on Y axis, but neither top nor bottom side CANT be scalled on Y axis. So scaling it this way would lead to gaps between left side and top and bottom side*. Also there can be whole variaty of diffrent models, and meshes. For example: one has only one door, other has sides between top and bottom, and so on...
EDIT: For example: left side is 964 on Y axis, top and bottom side are each 18 on Y axis, so combined is 1000 on Y axis. I scale whole Body by 2 on Y axis(meaning new size on Y should be 1000*2 = 2000). If I were to use scaling by 2 on Y axis on all meshes(that can be scaled on Y axis), then left side would be 1928, top and bottom would stay the same so, 18 each on Y axis. This would lead to 1928+18+18, 1964 size on Y axis instead of 2000.
EDIT2:
This program is all about arranging/making furniture in 3D.
So lets say you got this night stand in your project made with this program.
And you find the size of it to small, and you want to scale it verticaly. When you would scale it the "thickness" of all of the elements(meshes that made up this model) should stay the same since you want to make it bigger not "thicker". Only the length and width should change. So the left and right side would get scalled vertically, but top and bottom side wouldn't since that vertical direction is their "thickness".
And if you would want to scale the model horizontally(make it wider), the top and bottom sides would get scalled, but left and right would stay the same since that direction is their "thickness"(they would only have to get moved to the right positions).
Thats why in my previous picture I said that top and bottom side cant be scalled on Y axis, since that was their "thickness".
EDIT 3: bummzack, your method works great and all, but what if I have a furniture that has, 3 or more doors. How would I be able to scale all of the doors equally?
.
Any help is greately appreciated!
