Given a group of 3D models spatially arranged in a specific formation, how do I scale them while preserving the relative distances between each other?
Case in point: I have 10 meshes. Six of them are arranged to form a closed square room. The remaining 4 are pieces of furniture placed at appropriate locations inside it. All meshes have a scale of 1.0. I wish to increase it to, say 2.0.
I am not a mathematician, so I’m going to use the most basic terminology I know how to explain the procedure. You may even find the simplicity of the terminology I use easier to understand than mathematic “jargon”
You need to use the nominal centre points of all objects in the formation to determine the exact Formation Centre (this will be, of course, a 3D Vector consisting of an X, Y and Z value)…
Object Total = The total number of objects within your “formation”
The three values you now have constitute the Formation Centre (as a 3D vector).
NOTE: If you are arranging your objects based on a pre-defined fixed point in 3D space (0, 0, 0 for example) you don’t need to do the above calculation, as your Formation Centre will be that fixed point.
If you’ve done this correctly, your objects have now been scaled, still retain their formation, but have moved relative to the Formation Centre and Scale Factor. Simply put: occlusion between these objects can no longer occur as their Positions have scaled along with their Dimensions.