public void RayTest(Ray ray, Cylinder cylinder, double distance) { var computedDistance = Intersector.IntersectCylinder(cylinder, ray); Assert.AreEqual(distance, computedDistance); Console.WriteLine("Expected: {0}. But was: {1}", distance, computedDistance); }
public void RayTest(Ray ray, Point3D center, double radius, Point3D?point) { Point3D?computedPoint = Intersector.IntersectCircle(center, radius, ray); Assert.AreEqual(point, computedPoint); { Console.WriteLine("Point: {0}. Expected: {1}", computedPoint, point); } }
public void RayTest(Ray ray, Ball ball, double distance) { var computedDistance = Intersector.IntersectBall(ball, ray); Assert.AreEqual(distance, computedDistance); { Console.WriteLine("Distance: {0}. Expected: {1}", computedDistance, distance); } }
public void RayTest(Ray ray, Plane plane, Point3D?point) { Point3D?computedPoint = Intersector.IntersectPlane(plane, ray); Assert.AreEqual(point, computedPoint); { Console.WriteLine("Point: {0}. Expected: {1}", computedPoint, point); } }
public void BoxTest(Box box) { var v = Intersector.GetDirection(box); for (int i = 0; i < 3; i++) { Console.WriteLine(v[i]); } var vertex = Intersector.GetVertex(box); for (int i = 0; i < vertex.Capacity; i++) { Console.WriteLine("next: " + vertex[i]); } }