예제 #1
0
        public void Parse(string rs, string eps, string evs)
        {
            var ray = Ray3D.Parse(rs);

            AssertGeometry.AreEqual(Point3D.Parse(eps), ray.ThroughPoint);
            AssertGeometry.AreEqual(Vector3D.Parse(evs), ray.Direction);
        }
예제 #2
0
        public void Equals(string p1s, string v1s, string p2s, string v2s, bool expected)
        {
            var ray1 = Ray3D.Parse(p1s, v1s);
            var ray2 = Ray3D.Parse(p2s, v2s);

            Assert.AreEqual(expected, ray1.Equals(ray2));
            Assert.AreEqual(expected, ray1 == ray2);
            Assert.AreEqual(!expected, ray1 != ray2);
        }
예제 #3
0
        public void IntersectionOf(string pl1s, string pl2s, string eps, string evs)
        {
            var plane1   = Plane.Parse(pl1s);
            var plane2   = Plane.Parse(pl2s);
            var actual   = Ray3D.IntersectionOf(plane1, plane2);
            var expected = Ray3D.Parse(eps, evs);

            AssertGeometry.AreEqual(expected, actual);
        }
예제 #4
0
        public void IntersectionOf(string rootPoint1, string unitVector1, string rootPoint2, string unitVector2, string eps, string evs)
        {
            var plane1   = new Plane(Point3D.Parse(rootPoint1), UnitVector3D.Parse(unitVector1));
            var plane2   = new Plane(Point3D.Parse(rootPoint2), UnitVector3D.Parse(unitVector2));
            var actual   = Ray3D.IntersectionOf(plane1, plane2);
            var expected = Ray3D.Parse(eps, evs);

            AssertGeometry.AreEqual(expected, actual);
        }
 public void Parse(GameBitBuffer buffer)
 {
     Field0 = new Ray3D();
     Field0.Parse(buffer);
     Field1 = buffer.ReadFloat32();
 }