public void DrawModel(Model model, Matrix world)
 {
     foreach (ModelMesh mesh in model.Meshes)
     {
         foreach (BasicEffect be in mesh.Effects)
         {
             be.Projection     = camera.getProj();
             be.View           = camera.getView();
             be.World          = world;
             be.TextureEnabled = true;
         }
         mesh.Draw();
     }
 }
예제 #2
0
 public void DrawModel(Model mod, Matrix world)
 {
     Vector3[] vec = null;
     foreach (ModelMesh mesh in mod.Meshes)
     {
         foreach (ModelMeshPart part in mesh.MeshParts)
         {
             part.IndexBuffer.GetData(vec);
         }
         foreach (BasicEffect be in mesh.Effects)
         {
             be.Projection     = camera.getProj();
             be.View           = camera.getView();
             be.World          = world;
             be.TextureEnabled = true;
         }
         mesh.Draw();
     }
 }