Beispiel #1
0
 public void Clone()
 {
     OrthographicViewVolume orthographicViewVolume = new OrthographicViewVolume(-1.23f, 2.13f, -0.3f, 2.34f, 1.01f, 10.345f);
       OrthographicViewVolume clone = orthographicViewVolume.Clone() as OrthographicViewVolume;
       Assert.IsNotNull(clone);
       Assert.AreEqual(orthographicViewVolume.Left, clone.Left);
       Assert.AreEqual(orthographicViewVolume.Right, clone.Right);
       Assert.AreEqual(orthographicViewVolume.Bottom, clone.Bottom);
       Assert.AreEqual(orthographicViewVolume.Top, clone.Top);
       Assert.AreEqual(orthographicViewVolume.Near, clone.Near);
       Assert.AreEqual(orthographicViewVolume.Far, clone.Far);
       Assert.AreEqual(orthographicViewVolume.FieldOfViewX, clone.FieldOfViewX);
       Assert.AreEqual(orthographicViewVolume.FieldOfViewY, clone.FieldOfViewY);
       Assert.AreEqual(orthographicViewVolume.GetAabb(Pose.Identity).Minimum, clone.GetAabb(Pose.Identity).Minimum);
       Assert.AreEqual(orthographicViewVolume.GetAabb(Pose.Identity).Maximum, clone.GetAabb(Pose.Identity).Maximum);
 }
        public void Clone()
        {
            OrthographicViewVolume orthographicViewVolume = new OrthographicViewVolume(-1.23f, 2.13f, -0.3f, 2.34f, 1.01f, 10.345f);
            OrthographicViewVolume clone = orthographicViewVolume.Clone() as OrthographicViewVolume;

            Assert.IsNotNull(clone);
            Assert.AreEqual(orthographicViewVolume.Left, clone.Left);
            Assert.AreEqual(orthographicViewVolume.Right, clone.Right);
            Assert.AreEqual(orthographicViewVolume.Bottom, clone.Bottom);
            Assert.AreEqual(orthographicViewVolume.Top, clone.Top);
            Assert.AreEqual(orthographicViewVolume.Near, clone.Near);
            Assert.AreEqual(orthographicViewVolume.Far, clone.Far);
            Assert.AreEqual(orthographicViewVolume.FieldOfViewX, clone.FieldOfViewX);
            Assert.AreEqual(orthographicViewVolume.FieldOfViewY, clone.FieldOfViewY);
            Assert.AreEqual(orthographicViewVolume.GetAabb(Pose.Identity).Minimum, clone.GetAabb(Pose.Identity).Minimum);
            Assert.AreEqual(orthographicViewVolume.GetAabb(Pose.Identity).Maximum, clone.GetAabb(Pose.Identity).Maximum);
        }
Beispiel #3
0
 public void AabbTest()
 {
     OrthographicViewVolume viewVolume = new OrthographicViewVolume();
       viewVolume.Set(-1, 1, -1, 1, 2, 5);
       Aabb aabb = viewVolume.GetAabb(Pose.Identity);
       Assert.AreEqual(new Vector3F(-1, -1, -5), aabb.Minimum);
       Assert.AreEqual(new Vector3F(1, 1, -2), aabb.Maximum);
 }
        public void AabbTest()
        {
            OrthographicViewVolume viewVolume = new OrthographicViewVolume();

            viewVolume.Set(-1, 1, -1, 1, 2, 5);
            Aabb aabb = viewVolume.GetAabb(Pose.Identity);

            Assert.AreEqual(new Vector3(-1, -1, -5), aabb.Minimum);
            Assert.AreEqual(new Vector3(1, 1, -2), aabb.Maximum);
        }