Skip to content

Rename Contacts to ContactPair#685

Merged
Jondolf merged 2 commits intomainfrom
rename-to-contact-pair
Mar 31, 2025
Merged

Rename Contacts to ContactPair#685
Jondolf merged 2 commits intomainfrom
rename-to-contact-pair

Conversation

@Jondolf
Copy link
Member

@Jondolf Jondolf commented Mar 31, 2025

Objective

Especially after #683, we use the term "contact pair" a lot. However, the contact pair type is called Contacts. This name is very ambiguous: does it represent all contacts in the world, all contacts between two entities, contacts belonging to a specific contact surface, or something else?

Solution

Rename Contacts to ContactPair. It much more accurately describes what the type represents: contact data for a pair of entities that may be in contact. This is also the name used by Rapier.


Migration Guide

Contacts has been renamed to ContactPair.

@Jondolf Jondolf added A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality M-Migration-Guide A breaking change to Avian's public API that needs to be noted in a migration guide C-Code-Quality Improvements to code readability, maintainability, or best practices labels Mar 31, 2025
@Jondolf Jondolf added this to the 0.3 milestone Mar 31, 2025
@Jondolf Jondolf enabled auto-merge (squash) March 31, 2025 15:11
@Jondolf Jondolf merged commit 2ab588d into main Mar 31, 2025
5 checks passed
@Jondolf Jondolf deleted the rename-to-contact-pair branch March 31, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality C-Code-Quality Improvements to code readability, maintainability, or best practices M-Migration-Guide A breaking change to Avian's public API that needs to be noted in a migration guide

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant