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); } } }
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(); }
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(); }
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(); }
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; } }
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; }
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); }