Exemplo n.º 1
0
        public void GetListOfMaterialsWithNameOk()
        {
            var tgcObjLoader = new TGCObjLoader();
            var lines        = File.ReadAllLines(_fullobjpath);

            tgcObjLoader.GetListOfMaterials(lines, _fullobjpath);
            Assert.AreEqual(tgcObjLoader.ListMtllib.First(), "cubotexturacaja.mtl");
        }
Exemplo n.º 2
0
        public void GetListOfMaterialsWithWhiteSpaceOk()
        {
            var tgcObjLoader = new TGCObjLoader();
            var lines        = File.ReadAllLines(_fullobjpathmeshcontextura);

            tgcObjLoader.GetListOfMaterials(lines, _fullobjpathmeshcontextura);
            Assert.AreEqual(tgcObjLoader.ListMtllib.First(), "tgcito con textura.mtl");
        }
Exemplo n.º 3
0
        public void GetListOfMaterialsOk()
        {
            var tgcObjLoader = new TGCObjLoader();
            var lines        = File.ReadAllLines(_fullobjpath);

            tgcObjLoader.GetListOfMaterials(lines, _fullobjpath);
            Assert.Greater(tgcObjLoader.ListMtllib.Count, 0);
        }
        public void LoadObjMaterialFromFileOk()
        {
            TGCObjLoader tgcObjLoader = new TGCObjLoader();
            var          lines        = File.ReadAllLines(_fullMaterialPath);

            tgcObjLoader.GetListOfMaterials(lines, _fullMaterialPath);
            ObjMaterialsLoader objMaterialLoader = new ObjMaterialsLoader();

            objMaterialLoader.LoadMaterialsFromFiles(_fullMaterialPath, tgcObjLoader.ListMtllib);
            Assert.NotNull(objMaterialLoader.ListObjMaterialMesh.First());
        }