public void InnerPointTest() { OrthographicViewVolume viewVolume = new OrthographicViewVolume(); viewVolume.SetWidthAndHeight(1, 1, 1, 10); Vector3F innerPoint = viewVolume.InnerPoint; Assert.AreEqual(0, innerPoint.X); Assert.AreEqual(0, innerPoint.Y); Assert.AreEqual(-5.5f, innerPoint.Z); }
public void InnerPointTest() { OrthographicViewVolume viewVolume = new OrthographicViewVolume(); viewVolume.SetWidthAndHeight(1, 1, 1, 10); Vector3 innerPoint = viewVolume.InnerPoint; Assert.AreEqual(0, innerPoint.X); Assert.AreEqual(0, innerPoint.Y); Assert.AreEqual(-5.5f, innerPoint.Z); }
public void SetWidthAndHeightTest() { OrthographicViewVolume viewVolume = new OrthographicViewVolume(); viewVolume.SetWidthAndHeight(4, 3, 2, 9); Assert.AreEqual(-2, viewVolume.Left); Assert.AreEqual(2, viewVolume.Right); Assert.AreEqual(-1.5f, viewVolume.Bottom); Assert.AreEqual(1.5f, viewVolume.Top); Assert.AreEqual(2, viewVolume.Near); Assert.AreEqual(9, viewVolume.Far); Assert.AreEqual(4, viewVolume.Width); Assert.AreEqual(3, viewVolume.Height); Assert.AreEqual(7, viewVolume.Depth); Assert.AreEqual(4.0f / 3.0f, viewVolume.AspectRatio); Assert.IsNaN(viewVolume.FieldOfViewX); Assert.IsNaN(viewVolume.FieldOfViewY); }
public void SetWidthAndHeightException3() { OrthographicViewVolume viewVolume = new OrthographicViewVolume(); viewVolume.SetWidthAndHeight(2, 1, 1, 0); }