Esempio n. 1
0
        internal MeshPart(Mesh mesh, MeshPartHeader header, byte[] indexBuffer) {
            this.Mesh = mesh;
            this.Header = header;

            var attr = new List<ModelAttribute>();

            for (var i = 0; i < Mesh.Model.Definition.Attributes.Length; ++i) {
                if(((Header.AttributesMask >> i) & 1) == 1)
                    attr.Add(Mesh.Model.Definition.Attributes[i]);
            }

            Attributes = attr.ToArray();
        }
Esempio n. 2
0
        internal MeshPart(Mesh mesh, MeshPartHeader header, byte[] indexBuffer)
        {
            this.Mesh   = mesh;
            this.Header = header;

            List <ModelAttribute> attr = new List <ModelAttribute>();

            for (int i = 0; i < Mesh.Model.Definition.Attributes.Length; ++i)
            {
                if (((Header.AttributesMask >> i) & 1) == 1)
                {
                    attr.Add(Mesh.Model.Definition.Attributes[i]);
                }
            }

            Attributes = attr.ToArray();
        }