48 bool collided =
static_cast<SHAPE*
>( &lineA )->
Collide( &lineB, 0, &actual, &location );
50 BOOST_CHECK( collided );
52 BOOST_CHECK_MESSAGE( location ==
VECTOR2I( 5, 0 ),
"Expected: " <<
VECTOR2I( 5, 0 ) <<
" Actual: " << location );
66 bool collided =
static_cast<SHAPE*
>( &lineA )->
Collide( &arcB, 0, &actual, &location );
68 BOOST_CHECK( collided );
70 BOOST_CHECK_MESSAGE( location ==
VECTOR2I( 7, 0 ),
"Expected: " <<
VECTOR2I( 7, 0 ) <<
" Actual: " << location );
83 bool collided =
static_cast<SHAPE*
>( &arcA )->
Collide( &arcB, 0, &actual, &location );
85 BOOST_CHECK( collided );
87 BOOST_CHECK_MESSAGE( location ==
VECTOR2I( 5, 5 ),
"Expected: " <<
VECTOR2I( 5, 5 ) <<
" Actual: " << location );
102 bool collided =
static_cast<SHAPE*
>( &lineA )->
Collide( &lineB, 7, &actual, &location );
104 BOOST_CHECK( collided );
105 BOOST_CHECK_MESSAGE( actual == 6,
"Expected: " << 6 <<
" Actual: " << actual );
106 BOOST_CHECK_MESSAGE( location ==
VECTOR2I( 0, 0 ),
"Expected: " <<
VECTOR2I( 0, 0 ) <<
" Actual: " << location );
121 bool collided =
static_cast<SHAPE*
>( &lineA )->
Collide( &lineB, 0, &actual, &location );
123 BOOST_CHECK( !collided );
124 BOOST_CHECK_MESSAGE( actual == 0,
"Expected: " << 0 <<
" Actual: " << actual );
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
An abstract shape on 2D plane.
static bool Collide(const SHAPE_CIRCLE &aA, const SHAPE_CIRCLE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV)
BOOST_TEST(box.ClosestPointTo(VECTOR2D(0, 0))==VECTOR2D(1, 2))
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(Collide_LineToLine)
VECTOR2< int32_t > VECTOR2I