----------------------------------------------------------------------------
| 407 | |
| 408 | //---------------------------------------------------------------------------- |
| 409 | int vtkCell::IntersectWithCell(vtkCell* other, const vtkBoundingBox& boundingBox, |
| 410 | const vtkBoundingBox& otherBoundingBox, double tol) |
| 411 | { |
| 412 | if (!boundingBox.Intersects(otherBoundingBox)) |
| 413 | { |
| 414 | return 0; |
| 415 | } |
| 416 | /** |
| 417 | * Given the strategy of IntersectWithCellImpl, |
| 418 | * the intersection detection is likely to be speeded up |
| 419 | * if exchanging other given this condition. |
| 420 | * The implementation first throws edges from first cell |
| 421 | * to look if it intersects with second cell, then it checks |
| 422 | * the other way. |
| 423 | * Since when one intersection is found, algorithm stops, |
| 424 | * we'd rather check embedded bounding box's cell's edges first. |
| 425 | */ |
| 426 | if (otherBoundingBox.IsSubsetOf(boundingBox)) |
| 427 | { |
| 428 | return IntersectWithCellImpl(other, this, tol); |
| 429 | } |
| 430 | return IntersectWithCellImpl(this, other, tol); |
| 431 | } |
| 432 | |
| 433 | //---------------------------------------------------------------------------- |
| 434 | int vtkCell::IntersectWithCell(vtkCell* other, double tol) |
no test coverage detected