Exemple #1
0
        internal MxBlockModel Clone(MxBlockModel m)
        {
            if (m == null)
            {
                m = new MxBlockModel(VertCount, FaceCount);
            }

            foreach (var vertex in Vertices)
            {
                m.AddVertex(vertex);
            }
            foreach (var face in Faces)
            {
                m.AddFace(face);
            }

            m.NormalBinding = NormalBinding;
            if (NormalBinding != MxBinding.UnBound)
            {
                m.Normals = new List <MxNormal>(Normals);
            }

            m.ColorBinding = ColorBinding;
            if (ColorBinding != MxBinding.UnBound)
            {
                m.Colors = new List <Color>(Colors);
            }

            return(m);
        }
Exemple #2
0
        internal MxBlockModel Clone(MxBlockModel m)
        {
            if (m == null)
            {
                m = new MxBlockModel(VertCount, FaceCount);
            }

            foreach (var vertex in Vertices)
            {
                m.AddVertex(vertex);
            }
            foreach (var face in Faces)
            {
                m.AddFace(face);
            }

            m.NormalBinding = NormalBinding;
            if (NormalBinding != MxBinding.UnBound)
            {
                m.Normals = new List<MxNormal>(Normals);
            }

            m.ColorBinding = ColorBinding;
            if (ColorBinding != MxBinding.UnBound)
            {
                m.Colors = new List<Color>(Colors);
            }

            return m;
        }