【翻译】Managed DirectX(第九章)[23]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

         还需要修改一下SetupCamera方法,上一次使用了一个非常大的模型,而这次的却小得多。做如下更新:

private void SetupCamera()

     {

         device.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI / 4, this.Width / this.Height, 1.0f, 100.0f);

         device.Transform.View = Matrix.LookAtLH(new Vector3(0,0, 5.0f), new Vector3(), new Vector3(0,1,0));

         //device.RenderState.Ambient = Color.DarkBlue;

         device.Lights[0].Type = LightType.Directional;

         device.Lights[0].Diffuse = Color.DarkKhaki;

         device.Lights[0].Direction = new Vector3(0, -1, -1);

本文关键:【翻译】Managed DirectX(第九章)
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top