Browse Source

QA: Fix faulty test of SHAPE_POLY_SET Collision

This test assumed points on a edge are counted as colliding.
This is not true: points on an edge are NOT counted at inside
the poly_set.

THe test does still consider points on a *hole* edge as collisions.
The API to SHAPE_POLY_SET is unclear on if this is correct.
pull/13/head
John Beard 7 years ago
committed by Wayne Stambaugh
parent
commit
55fcbddde8
  1. 6
      qa/common/geometry/test_shape_poly_set_collision.cpp

6
qa/common/geometry/test_shape_poly_set_collision.cpp

@ -57,11 +57,11 @@ struct CollisionFixture
// On a hole edge => inside the polygon
collidingPoints.push_back( VECTOR2I( 40, 25 ) );
// On the outline edge => inside the polygon
collidingPoints.push_back( VECTOR2I( 0, 10 ) );
// Create points not colliding with the poly set.
// On the outline edge => outside the polygon
nonCollidingPoints.push_back( VECTOR2I( 0, 10 ) );
// Completely outside of the polygon
nonCollidingPoints.push_back( VECTOR2I( 200, 200 ) );

Loading…
Cancel
Save