Esempio n. 1
0
        private ObjSubMesh NewSubMesh(int smooth)
        {
            var mesh = GetCurrentMesh();

            mesh.SubMeshes.Add(CurrentSubMesh = new ObjSubMesh(mesh)
            {
                SmoothGroup = smooth
            });
            return(CurrentSubMesh);
        }
Esempio n. 2
0
        public void MergeSubMeshes()
        {
            var submesh = new ObjSubMesh(this);

            submesh.PositionFaces = SubMeshes.SelectMany(i => i.PositionFaces).ToList();
            submesh.NormalFaces   = SubMeshes.SelectMany(i => i.NormalFaces).ToList();
            submesh.TexCoordFaces = SubMeshes.SelectMany(i => i.TexCoordFaces).ToList();

            SubMeshes.Clear();
            SubMeshes.Add(submesh);
        }