Ejemplo n.º 1
0
        public void CopyMaterials()
        {
            Materials.Clear();

            foreach (H3DModel Model in Models)
            {
                foreach (H3DMaterial Material in Model.Materials)
                {
                    //Note: The IF is a workaround for multiple models with same material names.
                    //This kind of problem doesn't happen on BCH, but may happen on converted formats.
                    if (!Materials.Contains(Material.Name))
                    {
                        Materials.Add(Material.MaterialParams);
                    }
                }
            }
        }