Imagine a track with many poles, each pole being the same geometry; the LL viewer requires a geometry element for every single pole! This patch makes libomv able to parse Collada files where instances reuse geometries, allowing for much more concise Collada files.
(1) handle hierarchical nodes in the visual scene
(2) handle the <triangle> element of geometries. This was done the lazy way: convert <triangles> to <polylist> and call the function that was already there for handling <polylist>
Sample code:
var parser = new OpenMetaverse.ImportExport.ColladaLoader();
var prims = parser.Load(o.FileName);
if (prims != null && prims.Count > 0)
{
var uploader = new OpenMetaverse.ImportExport.ModelUploader(client, prims);
uploader.PrepareUpload();
}
Note that PrepareUpload performs the upload as well in this initial stage.
TODO:
* Image upload
* Support for quads in addition to triangles