Ejemplo n.º 1
0
 protected void RestorePartEffectMapping(PartEffectMapping mapping)
 {
     foreach (ModelMesh mesh in Model.Meshes)
     {
         foreach (ModelMeshPart meshPart in mesh.MeshParts)
         {
             meshPart.Effect = mapping[meshPart];
         }
     }
 }
Ejemplo n.º 2
0
        protected PartEffectMapping CurrentPartEffectMapping()
        {
            PartEffectMapping mapping = new PartEffectMapping();

            foreach (ModelMesh mesh in Model.Meshes)
            {
                foreach (ModelMeshPart meshPart in mesh.MeshParts)
                {
                    mapping[meshPart] = meshPart.Effect;
                }
            }
            return(mapping);
        }