public void SetOriginalAlphas(ModelEffectCollection effectCollection)
 {
     for (int i = 0; i < effectCollection.Count; i++)
     {
         if ((effectCollection[i] is BasicEffect) &&
             !originalAlphas.ContainsKey(effectCollection[i]))
         {
             originalAlphas.Add(effectCollection[i], ((BasicEffect)effectCollection[i]).Alpha);
         }
     }
 }
Example #2
0
		public ModelMesh(GraphicsDevice graphicsDevice, System.Collections.Generic.List<ModelMeshPart> parts)
		{
			// TODO: Complete member initialization
			this.graphicsDevice = graphicsDevice;
			
			MeshParts = new ModelMeshPartCollection(parts);
			
			for (int i = 0; i < parts.Count; i++) {
				parts[i].parent = this;
			}
			
			Effects = new ModelEffectCollection();
		}
Example #3
0
        public ModelMesh(GraphicsDevice graphicsDevice, System.Collections.Generic.List <ModelMeshPart> parts)
        {
            // TODO: Complete member initialization
            this.graphicsDevice = graphicsDevice;

            MeshParts = new ModelMeshPartCollection(parts);

            for (int i = 0; i < parts.Count; i++)
            {
                parts[i].parent = this;
            }

            Effects = new ModelEffectCollection();
        }
Example #4
0
        public ModelMesh(GraphicsDevice graphicsDevice, List<ModelMeshPart> parts)
        {
            // TODO: Complete member initialization
            this.graphicsDevice = graphicsDevice;

            MeshParts = new ModelMeshPartCollection(parts);

            foreach (ModelMeshPart part in parts)
            {
                part.parent = this;
            }

            Effects = new ModelEffectCollection();
        }
Example #5
0
 internal ModelMesh(string name, ModelBone parentBone, BoundingSphere boundingSphere, VertexBuffer vertexBuffer, IndexBuffer indexBuffer, ModelMeshPart[] meshParts, object tag)
 {
     this.boundingSphere = new BoundingSphere();
     this.effects = new ModelEffectCollection();
     this.name = name;
     this.parentBone = parentBone;
     this.boundingSphere = boundingSphere;
     this.vertexBuffer = vertexBuffer;
     this.indexBuffer = indexBuffer;
     this.meshParts = new ModelMeshPartCollection(meshParts);
     this.tag = tag;
     int length = meshParts.Length;
     for (int i = 0; i < length; i++)
     {
         ModelMeshPart part = meshParts[i];
         part.parent = this;
     }
 }
Example #6
0
        public void SetOriginalAlphas(ModelEffectCollection effectCollection)
        {
            if (originalSet)
            {
                return;
            }

            originalAlphas = new float[effectCollection.Count];

            for (int i = 0; i < effectCollection.Count; i++)
            {
                if (effectCollection[i] is SkinnedEffect)
                {
                    originalAlphas[i] = ((SkinnedEffect)effectCollection[i]).Alpha;
                }
            }

            originalSet = true;
        }
Example #7
0
 public ModelMesh()
 {
     Effects = new ModelEffectCollection();
 }
 public void SetOriginalAlphas(ModelEffectCollection effectCollection)
 {
     for (int i = 0; i < effectCollection.Count; i++)
         if ((effectCollection[i] is BasicEffect) &&
             !originalAlphas.ContainsKey(effectCollection[i]))
             originalAlphas.Add(effectCollection[i], ((BasicEffect)effectCollection[i]).Alpha);
 }