前田稔(Maeda Minoru)の超初心者のプログラム入門
void SetupMatrices() { Matrix view, w; w= Matrix.RotationY(Environment.TickCount / 1000.0f); view = Matrix.Translation(0, 0, 5); view = w * view; device.SetTransform(TransformType.View, view); device.Transform.Projection = Matrix.PerspectiveFovLH((float)(Math.PI / 4), 1.0f, 1.0f, 1000.0f); } |
wy = Matrix.RotationY(rotx / 50.0f); wx = Matrix.RotationX(roty / 50.0f); view = Matrix.Translation(0, 0, 5); view = wy * wx * view; device.SetTransform(TransformType.View, view); |