90 BOOST_CHECK( compoundA->Collide( compoundB, 0, &actual ) );
93 BOOST_CHECK( !compoundA->Collide( compoundC, 0, &actual ) );
96 BOOST_CHECK( compoundA->Collide( compoundC, 100, &actual ) );
99 BOOST_CHECK( shapesA[0]->
Collide( compoundB, 0 ) );
100 BOOST_CHECK( shapesA[1]->
Collide( compoundB, 0 ) );
101 BOOST_CHECK( compoundB->Collide( shapesA[0], 0 ) );
102 BOOST_CHECK( compoundB->Collide( shapesA[1], 0 ) );
104 BOOST_CHECK( shapesB[0]->
Collide( compoundA, 0 ) );
105 BOOST_CHECK( shapesB[1]->
Collide( compoundA, 0 ) );
106 BOOST_CHECK( compoundA->Collide( shapesB[0], 0 ) );
107 BOOST_CHECK( compoundA->Collide( shapesB[1], 0 ) );
109 BOOST_CHECK( ! shapesC[0]->
Collide( compoundA, 0 ) );
110 BOOST_CHECK( ! shapesC[1]->
Collide( compoundA, 0 ) );
111 BOOST_CHECK( ! compoundA->Collide( shapesC[0], 0 ) );
112 BOOST_CHECK( ! compoundA->Collide( shapesC[1], 0 ) );
114 BOOST_CHECK( ! shapesA[0]->
Collide( compoundC, 0 ) );
115 BOOST_CHECK( ! shapesA[1]->
Collide( compoundC, 0 ) );
116 BOOST_CHECK( ! compoundC->Collide( shapesA[0], 0 ) );
117 BOOST_CHECK( ! compoundC->Collide( shapesA[1], 0 ) );
119 BOOST_CHECK( shapesC[0]->
Collide( compoundA, 100, &actual ) );
121 BOOST_CHECK( shapesC[1]->
Collide( compoundA, 100, &actual ) );
123 BOOST_CHECK( compoundA->Collide( shapesC[0], 100, &actual ) );
125 BOOST_CHECK( compoundA->Collide( shapesC[1], 100, &actual ) );
static bool Collide(const SHAPE_CIRCLE &aA, const SHAPE_CIRCLE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV)
Common data for some of the SHAPE_POLY_SET tests:
Fixture for the Collision test suite.
std::vector< SHAPE * > shapesB
std::vector< SHAPE * > shapesA
std::vector< SHAPE * > shapesC
SHAPE_COMPOUND * compoundB
~ShapeCompoundCollisionFixture()
ShapeCompoundCollisionFixture()
Constructor.
SHAPE_COMPOUND * compoundC
SHAPE_COMPOUND * compoundA
struct KI_TEST::CommonTestData common
BOOST_TEST(box.ClosestPointTo(VECTOR2D(0, 0))==VECTOR2D(1, 2))
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(ShapeCompoundCollide)
Declares the CollisionFixture as the boost test suite fixture.
VECTOR2< int32_t > VECTOR2I