Skip to content

Clean up collision detection module structure and re-exports#698

Merged
Jondolf merged 2 commits into
mainfrom
clean-up-modules
Apr 14, 2025
Merged

Clean up collision detection module structure and re-exports#698
Jondolf merged 2 commits into
mainfrom
clean-up-modules

Conversation

@Jondolf

@Jondolf Jondolf commented Apr 14, 2025

Copy link
Copy Markdown
Member

Objective

Some of the collision detection modules are not located in the most appropriate place, and the imports are a bit messy.

Solution

Move

  • layers from collision to collision::collider
  • contact_query from collision to collision::collider::parry
  • feature_id from collision to collision::contact_types

I also removed the collider::* and layers::* re-exports from the collision module, and instead added a prelude for collision detection functionality.


Migration Guide

Some collision detection modules and imports have been reorganized.

The following modules have been moved:

  • layers from collision to collision::collider
  • contact_query from collision to collision::collider::parry
  • feature_id from collision to collision::contact_types

Previously, a lot of collision detection types were also re-exported directly from the collision module. Now, there is instead a prelude for the collision module.

@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 Apr 14, 2025
@Jondolf Jondolf added this to the 0.3 milestone Apr 14, 2025
@Jondolf Jondolf changed the title Clean up collision module structure Clean up collision detection module structure and re-exports Apr 14, 2025
@Jondolf Jondolf merged commit c6c95f9 into main Apr 14, 2025
@Jondolf Jondolf deleted the clean-up-modules branch April 14, 2025 21:43
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