public void OneCubeTotallyIncludedInTheOtherWithSameCenterTest() { Point centerA; Point centerB; Cube cubeA; Cube cubeB; bool collide; centerA = new Point(0, 0, 0); centerB = new Point(0, 0, 0); cubeA = new Cube(centerA, 1, 1, 1); cubeB = new Cube(centerB, 2, 2, 2); collide = SpatialCubesCalculator.Collide(cubeA, cubeB); Assert.IsTrue(collide); }
public void TwoCubesFullyOverlappingTest() { Point centerA; Point centerB; Cube cubeA; Cube cubeB; bool collide; centerA = new Point(1, 1, 1); centerB = new Point(1, 1, 1); cubeA = new Cube(centerA, 1, 1, 1); cubeB = new Cube(centerB, 1, 1, 1); collide = SpatialCubesCalculator.Collide(cubeA, cubeB); Assert.IsTrue(collide); }
public void TwoCubesSharingAVertexTest() { Point centerA; Point centerB; Cube cubeA; Cube cubeB; bool collide; centerA = new Point(0, 0, 0); centerB = new Point(2, 2, 2); cubeA = new Cube(centerA, 2, 2, 2); cubeB = new Cube(centerB, 2, 2, 2); collide = SpatialCubesCalculator.Collide(cubeA, cubeB); Assert.IsTrue(collide); }
public void TwoCubesInSameQuadrantAndPlaneAppartTest() { Point centerA; Point centerB; Cube cubeA; Cube cubeB; bool collide; centerA = new Point(2, 2, 0); centerB = new Point(2, 5, 0); cubeA = new Cube(centerA, 1, 1, 1); cubeB = new Cube(centerB, 1, 1, 1); collide = SpatialCubesCalculator.Collide(cubeA, cubeB); Assert.IsFalse(collide); }
public void TwoCubesInDiffentQuadrantAndPlaneTest() { Point centerA; Point centerB; Cube cubeA; Cube cubeB; bool collide; centerA = new Point(-3, -5, 1); centerB = new Point(4, 4, 3); cubeA = new Cube(centerA, 2, 2, 2); cubeB = new Cube(centerB, 2, 2, 2); collide = SpatialCubesCalculator.Collide(cubeA, cubeB); Assert.IsFalse(collide); }