我试图在 xna 框架中实现倾斜投影( http://en.wikipedia.org/wiki/Oblique_projection ):
float cos = (float)Math.Cos(DegreeToRadian(45)) * -1;
float sin = (float)Math.Sin(DegreeToRadian(45)) * -1;
Matrix obliqueProjection = new Matrix(
1, 0, cos, 0,
0, 1, sin, 0,
0, 0, 1, 0,
0, 0, 0, 1);
Matrix orthographicProjection = Matrix.CreateOrthographic(10, 10, -1, 100000);
projection = orthographicProjection*obliqueProjection;
如您所见,我只是将正交投影与斜投影相乘。
我得到的是:
http://imageshack.us/photo/my-images/835/oblique1.png/
它基本上是正交投影的样子,但有一些奇怪的远剪辑。
我怎样才能实现正确的斜投影?提前谢谢