| 473 | |
| 474 | |
| 475 | bool cPieceGenerator::CheckConnection( |
| 476 | const cPiece::cConnector & a_ExistingConnector, |
| 477 | const Vector3i & a_ToPos, |
| 478 | const cPiece & a_Piece, |
| 479 | const cPiece::cConnector & a_NewConnector, |
| 480 | int a_NumCCWRotations, |
| 481 | const cPlacedPieces & a_OutPieces |
| 482 | ) |
| 483 | { |
| 484 | // For each placed piece, test the hitbox against the new piece: |
| 485 | cCuboid RotatedHitBox = a_Piece.RotateHitBoxToConnector(a_NewConnector, a_ToPos, a_NumCCWRotations); |
| 486 | RotatedHitBox.Sort(); |
| 487 | for (cPlacedPieces::const_iterator itr = a_OutPieces.begin(), end = a_OutPieces.end(); itr != end; ++itr) |
| 488 | { |
| 489 | if ((*itr)->GetHitBox().DoesIntersect(RotatedHitBox)) |
| 490 | { |
| 491 | return false; |
| 492 | } |
| 493 | } |
| 494 | return true; |
| 495 | } |
| 496 | |
| 497 | |
| 498 |
nothing calls this directly
no test coverage detected