Forward and reverse test for point in poly collisions

This commit is contained in:
Seth Hillbrand 2024-03-18 15:51:04 -07:00
parent 05cdd44404
commit 4e6cd0d293
1 changed files with 5 additions and 0 deletions

View File

@ -302,6 +302,11 @@ static inline bool Collide( const SHAPE_LINE_CHAIN_BASE& aA, const SHAPE_LINE_CH
closest_dist = 0;
nearest = aA.GetPoint( 0 );
}
else if( aA.IsClosed() && aB.GetPointCount() > 0 && aA.PointInside( aB.GetPoint( 0 ) ) )
{
closest_dist = 0;
nearest = aB.GetPoint( 0 );
}
else
{
std::vector<SEG> a_segs;