Exemple #1
0
        public void TestRectangleProjection()
        {
            Projection projection = ProjectionUtils.GetRectangleProjection(90, ProjectionUtils.FovVFromAspectRatio(90, 1280.0 / 720), 48000);

            if (projection.Left == projection.Right && projection.Top == projection.Bottom)
            {
                Assert.IsTrue(projection.Left == 17445.15105326362 && projection.Top == 155498.4182922107);
                return;
            }

            Assert.Fail("Left side != right side or top side != bottom side.");
        }
Exemple #2
0
 private Projection CalculateProjection()
 {
     return(ProjectionUtils.GetRectangleProjection(fovHInRadians, fovVInRadians, (int)camera.Position.Z));
 }