Skip to main content

classify_contact

Function classify_contact 

Source
pub fn classify_contact(a: &[[i64; 2]], b: &[[i64; 2]]) -> ContactKind
Expand description

Classify the contact between two polygon parts.

Matches polygon.move::shared_edge_relation’s decision tree:

  1. If any edge pair matches exactly → SharedEdge.
  2. Else if any edge pair has a non-degenerate collinear overlap → PartialContact (the on-chain abort case).
  3. Otherwise → None.

Note: Move also performs aabbs_may_contact + SAT overlap checks before this point, but those are orthogonal (overlap → EPartOverlap). This function only classifies boundary contact.