예제 #1
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();
		}
예제 #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();
        }
예제 #3
0
파일: ModelMesh.cs 프로젝트: khbecker/FNA
        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();
        }
예제 #4
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;
     }
 }
예제 #5
0
 protected virtual void ReadMeshParts(ref ModelMeshPartCollection meshParts)
 {
     ReadList(ref meshParts, CreateModelMeshPartCollection, CreateModelMeshPart, ReadMeshPart);
 }
예제 #6
0
 private EnableMeshParts(Matrix view, Matrix projection, Matrix localWorld, ModelMeshPartCollection meshes)
     : base(view, projection)
 {
     LocalWorld = localWorld;
     Meshes = meshes;
 }
예제 #7
0
 public static void Enable(Matrix view, Matrix projection, Matrix localWorld, ModelMeshPartCollection meshes)
 {
     new EnableMeshParts(view, projection, localWorld, meshes).Enable();
 }