Files
libremetaverse/OpenMetaverse/ImportExport
Bengt Gustafsson ff1e14bf44 Changed handling of collada meshes with multiple instances so that the prim.Asset values are the same in all Prims, while the difference in rotation, position and scale deduced from the Collada instance transform matrix are stored in the Position, Scale and Rotation members of each prim, properly adjusted for the rescaling and offseting done to the mesh vertices to fit into the unit cube of SL meshes.
This fixes bugs related to the case that several instances of the same mesh but with different rotation in their transformation matrix was present in the Collada file, which previously caused distorted objects except for those having the same rotation as the first instance.

A caveat is that now, as the incoming transform matrix is not used when creating the vertices and as the ModelPrim only stores rotation, scale and translation files which have transforms containing shear etc. not encodable by these three vectors will produce erroneous output even if there is only one instance of each mesh.

At the same time save some time and space during conversion by sharing the Positions and Faces members of all prims and not redoing the AddPositions and AddFacesFromPolyList calls for each instace (as results are identical). Applications that change the vertices or faces in situ in individual prim instances may suffer.
2016-12-29 18:29:22 +01:00
..