p>
{. View = viewMatrix;. Projection = projectionMatrix;. World = worldMatrix * Matrix.CreateRotationY (MathHelper.Pi);. Texture = w;. TextureEnabled = true;. Begin (); (EffectPass pass in effect.CurrentTechnique . Passes)
{. Begin ();. VertexDeclaration = new VertexDeclaration (GraphicsDevice, VertexPositionTexture.VertexElements);. DrawUserIndexedPrimitives (PrimitiveType.TriangleList, e1, 0, e1.Length, indz, 0, indz.Length/3);. End ();
}. End ();
}
// Малювання об'єкта 6 (стіна перпендикулярно напрямку погляду) (indz.Length> 0)
{. View = viewMatrix;. Projection = projectionMatrix;. World = worldMatrix * Matrix.CreateRotationY (MathHelper.PiOver2);. Texture = s;. TextureEnabled = true;. Begin (); (EffectPass pass in effect.CurrentTechnique . Passes)
{. Begin ();. VertexDeclaration = new VertexDeclaration (GraphicsDevice, VertexPositionTexture.VertexElements);. DrawUserIndexedPrimitives (PrimitiveType.TriangleList, e1, 0, e1.Length, indz, 0, indz.Length/3);. End ();
}. End ();
}
// Малювання об'єкта 7 (стіна перпендикулярно напрямку погляду) (indz.Length> 0)
{. View = viewMatrix;. Projection = projectionMatrix;. World = worldMatrix * Matrix.CreateRotationY (-MathHelper.PiOver2);. Texture = n;. TextureEnabled = true;. Begin (); (EffectPass pass in effect. CurrentTechnique.Passes)
{. Begin ();. VertexDeclaration = new VertexDeclaration (GraphicsDevice, VertexPositionTexture.VertexElements);. DrawUserIndexedPrimitives (PrimitiveType.TriangleList, e1, 0, e1.Length, indz, 0, indz.Length/3);. End ();
}. End ();
}
// Малювання об'єкта 8 (стіна перпендикулярно напрямку погляду) (indz.Length> 0)
{. View = viewMatrix;. Projection = projectionMatrix;. World = worldMatrix * Matrix.CreateTranslation (0,100,0);. ​​Texture = up;. TextureEnabled = true;. Begin (); (EffectPass pass in effect.CurrentTechnique . Passes)
{. Begin ();. VertexDeclaration = new VertexDeclaration (GraphicsDevice, VertexPositionTexture.VertexElements);. DrawUserIndexedPrimitives (PrimitiveType.TriangleList, e1, 0, e1.Length, indz, 0, indz.Length/3);. End ();
}. End ();
}. Draw (gameTime);
}
}
}
Файл Program.cs
using System; Lab5
{class Program
{
///
///The main entry point for the application.
/// void Main (string [] args)
{(Game1 game = new Game1 ())
{. Run ();
}
}
}
}