public void Rectangles_Seperate()
 {
     Assert.False(CollisionChecking.Rectangles(context.RectangleBase.X,
                                               context.RectangleBase.Y,
                                               context.RectangleBase.Width,
                                               context.RectangleBase.Height,
                                               context.RectangleSeperate.X,
                                               context.RectangleSeperate.Y,
                                               context.RectangleSeperate.Width,
                                               context.RectangleSeperate.Height));
 }
예제 #2
0
 public void Circles_Collide(Circle circle1, Circle circle2)
 {
     Assert.True(
         CollisionChecking.Circles(
             circle1.X,
             circle1.Y,
             circle1.Radius,
             circle2.X,
             circle2.Y,
             circle2.Radius
             )
         );
 }
예제 #3
0
 public void Circles_Seperate(Circle circle1, Circle circle2)
 {
     Assert.False(
         CollisionChecking.Circles(
             circle1.X,
             circle1.Y,
             circle1.Radius,
             circle2.X,
             circle2.Y,
             circle2.Radius
             )
         );
 }
예제 #4
0
 public void Rectangles_Collide(Rectangle rectangle1, Rectangle rectangle2)
 {
     Assert.True(
         CollisionChecking.Rectangles(
             rectangle1.X,
             rectangle1.Y,
             rectangle1.Width,
             rectangle1.Height,
             rectangle2.X,
             rectangle2.Y,
             rectangle2.Width,
             rectangle2.Height
             )
         );
 }
예제 #5
0
 public void Rectangles_Seperate(Rectangle rectangle1, Rectangle rectangle2)
 {
     Assert.False(
         CollisionChecking.Rectangles(
             rectangle1.X,
             rectangle1.Y,
             rectangle1.Width,
             rectangle1.Height,
             rectangle2.X,
             rectangle2.Y,
             rectangle2.Width,
             rectangle2.Height
             )
         );
 }
예제 #6
0
 public void Rectangles_Collide()
 {
     Assert.True(
         CollisionChecking.Rectangles(
             rectangleBase.X,
             rectangleBase.Y,
             rectangleBase.Width,
             rectangleBase.Height,
             rectangleCollide.X,
             rectangleCollide.Y,
             rectangleCollide.Width,
             rectangleCollide.Height
             )
         );
 }
예제 #7
0
 public void RectangleToCircle_Collide(Rectangle rectangle, Circle circle)
 {
     Assert.True(CollisionChecking.RectangleToCircle(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, circle.X, circle.Y, circle.Radius));
     Assert.True(CollisionChecking.CircleToRectangle(circle.X, circle.Y, circle.Radius, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height));
 }
예제 #8
0
 public void PointsCollide(Vector2 point1, Vector2 point2)
 {
     Assert.True(CollisionChecking.Points(point1.X, point1.Y, point2.X, point2.Y));
 }
예제 #9
0
 public void PointsSeperate(Vector2 point1, Vector2 point2)
 {
     Assert.False(CollisionChecking.Points(point1.X, point1.Y, point2.X, point2.Y));
 }
예제 #10
0
 public void LineToPoint_Collide(Line line, Vector2 point)
 {
     Assert.True(CollisionChecking.LineToPoint(line.BeginX, line.BeginY, line.EndX, line.EndY, point.X, point.Y));
     Assert.True(CollisionChecking.PointToLine(point.X, point.Y, line.BeginX, line.BeginY, line.EndX, line.EndY));
 }
예제 #11
0
 public void Lines_Seperate(Line line1, Line line2)
 {
     Assert.False(CollisionChecking.Lines(line1.BeginX, line1.BeginY, line1.EndX, line1.EndY, line2.BeginX, line2.BeginY, line2.EndX, line2.EndY));
 }
예제 #12
0
 public void CircleToPoint_Collide(Circle circle, Vector2 point)
 {
     Assert.True(CollisionChecking.CircleToPoint(circle.X, circle.Y, circle.Radius, point.X, point.Y));
     Assert.True(CollisionChecking.PointToCircle(point.X, point.Y, circle.X, circle.Y, circle.Radius));
 }
예제 #13
0
 public void CircleToLine_Collide(Circle circle, Line line)
 {
     Assert.True(CollisionChecking.CircleToLine(circle.X, circle.Y, circle.Radius, line.BeginX, line.BeginY, line.EndX, line.EndY));
     Assert.True(CollisionChecking.LineToCircle(line.BeginX, line.BeginY, line.EndX, line.EndY, circle.X, circle.Y, circle.Radius));
 }
예제 #14
0
 public void RectangleToPoint_Collide(Rectangle rectangle, Vector2 point)
 {
     Assert.True(CollisionChecking.RectangleToPoint(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, point.X, point.Y));
     Assert.True(CollisionChecking.PointToRectangle(point.X, point.Y, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height));
 }
예제 #15
0
 public void RectangleToLine_Collide(Rectangle rectangle, Line line)
 {
     Assert.True(CollisionChecking.RectangleToLine(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, line.BeginX, line.BeginY, line.EndX, line.EndY));
     Assert.True(CollisionChecking.LineToRectangle(line.BeginX, line.BeginY, line.EndX, line.EndY, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height));
 }
 public void Circles()
 {
     Assert.True(CollisionChecking.Circles(10, 10, 5, 17, 10, 5));
     Assert.False(CollisionChecking.Circles(10, 10, 5, 20, 10, 5));
 }
예제 #17
0
 public void Lines_Collide(Line line1, Line line2)
 {
     Assert.True(CollisionChecking.Lines(line1.BeginX, line1.BeginY, line1.EndX, line1.EndY, line2.BeginX, line2.BeginY, line2.EndX, line2.EndY));
 }