UHSampleGame.CoreObjects.StaticModel.Draw C# (CSharp) Method

Draw() public method

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void
        public override void Draw(GameTime gameTime)
        {
            // Draw all of the meshes for a model
            foreach (ModelMesh mesh in model.Meshes)
            {
                //each mesh has an effect
                foreach (BasicEffect effect in mesh.Effects)
                {
                    effect.EnableDefaultLighting();

                    //Where will the model be in the world?
                    effect.World = transforms[mesh.ParentBone.Index];

                    //How are we viewing it?
                    effect.View = view;

                    //Projection information
                    effect.Projection = cameraManager.ProjectionMatrix;
                }
                // Draw the mesh, using the effects set above.
                mesh.Draw();
            }

            base.Draw(gameTime);
        }