public ColladaScene(COLLADA collada, DAE.ImportSettings settings)
            {
                Settings    = settings;
                geometries  = FindLibraryItem <library_geometries>(collada.Items);
                images      = FindLibraryItem <library_images>(collada.Items);
                scenes      = FindLibraryItem <library_visual_scenes>(collada.Items);
                effects     = FindLibraryItem <library_effects>(collada.Items);
                controllers = FindLibraryItem <library_controllers>(collada.Items);
                materials   = FindLibraryItem <library_materials>(collada.Items);

                if (collada.asset != null)
                {
                    UpAxisType = collada.asset.up_axis;
                    UintSize   = collada.asset.unit;
                }
            }
        public static STGenericScene Read(string fileName, DAE.ImportSettings settings = null)
        {
            if (settings == null)
            {
                settings = new DAE.ImportSettings();
            }

            Stopwatch sw = new Stopwatch();

            sw.Start();

            STGenericScene Scene = new STGenericScene();

            COLLADA      collada      = COLLADA.Load(fileName);
            ColladaScene colladaScene = new ColladaScene(collada, settings);

            //Usually there is only one scene, but it can be possible some tools use multiple per model
            //Each one contains node hiearchies for bones and meshes
            foreach (var scene in colladaScene.scenes.visual_scene)
            {
                var  model = new STGenericModel(scene.name);
                Node Root  = LoadScene(scene, model, colladaScene);
                Scene.Models.Add(model);

                if (colladaScene.materials != null)
                {
                    foreach (var mat in colladaScene.materials.material)
                    {
                        model.Materials.Add(LoadMaterial(mat));
                    }
                }
                else
                {
                    model.Materials.Add(new STGenericMaterial()
                    {
                        Name = "Dummy"
                    });
                }

                if (model.Skeleton.Bones.Count == 0)
                {
                    model.Skeleton.Bones.Add(new STBone(model.Skeleton, "root"));
                }

                if (settings.FixDuplicateNames)
                {
                    //Adjust duplicate names

                    /*    foreach (var mesh in model.Meshes)
                     *  {
                     *      var names = model.Meshes.Select(x => x.Name).ToList();
                     *      mesh.Name = Utility.RenameDuplicateString(names, mesh.Name, 0, 2);
                     *  }
                     *
                     *  foreach (var mat in model.Materials)
                     *  {
                     *      var names = model.Materials.Select(x => x.Name).ToList();
                     *      mat.Name = Utility.RenameDuplicateString(names, mat.Name, 0, 2);
                     *  }
                     *
                     *  foreach (var bone in model.Skeleton.Bones)
                     *  {
                     *      var names = model.Skeleton.Bones.Select(x => x.Name).ToList();
                     *      bone.Name = Utility.RenameDuplicateString(names, bone.Name, 0, 2);
                     *  }*/
                }
            }

            sw.Stop();
            Console.WriteLine("Elapsed={0}", sw.Elapsed);

            return(Scene);
        }