Esempio n. 1
0
        /// <summary>
        /// Clone this component.
        /// </summary>
        /// <returns>Cloned copy of this component.</returns>
        override public BaseComponent Clone()
        {
            CompositeModelRenderer ret = new CompositeModelRenderer(_entity.Model);

            CopyBasics(ret);
            for (int i = 0; i < _entity.MeshesCount; ++i)
            {
                Core.Graphics.MeshEntity other = ret.GetMesh(i);
                Core.Graphics.MeshEntity self  = GetMesh(i);
                other.MaterialOverride = self.MaterialOverride.Clone();
                other.BlendingState    = self.BlendingState;
                other.SetMaterials(self.OverrideMaterials);
                other.RenderingQueue = self.RenderingQueue;
            }
            return(ret);
        }
Esempio n. 2
0
 /// <summary>
 /// Set alternative materials for a specific mesh id.
 /// </summary>
 /// <param name="material">Materials to set.</param>
 public void SetMaterials(Core.Graphics.Materials.MaterialAPI[] material)
 {
     _entity.SetMaterials(material);
 }