MCPcopy Create free account
hub / github.com/Kitware/VTK / IntersectWithCell

Method IntersectWithCell

Common/DataModel/vtkCell.cxx:409–431  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

407
408//----------------------------------------------------------------------------
409int 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//----------------------------------------------------------------------------
434int vtkCell::IntersectWithCell(vtkCell* other, double tol)

Callers 1

Calls 5

GetBoundsMethod · 0.95
IntersectWithCellImplFunction · 0.85
IsSubsetOfMethod · 0.80
vtkBoundingBoxClass · 0.70
IntersectsMethod · 0.45

Tested by

no test coverage detected