Skip to content

Conversation

zfergus
Copy link
Member

@zfergus zfergus commented Sep 1, 2025

Description

  • Moved the inclusion of the CCD library to a new position in CMakeLists.txt for better organization.
  • Updated CPM version from 0.40.2 to 0.42.0 in CPM.cmake.
  • Modified ccd_query_io.cmake to use the new CPMAddPackage syntax with options.
  • Updated finite_diff.cmake to use the latest version of the finite-diff package (1.0.3).
  • Adjusted libigl.cmake to use the new CPMAddPackage syntax with options.
  • Updated scalable_ccd.cmake to use the new CPMAddPackage syntax with options.
  • Refactored BroadPhase class methods in broad_phase.cpp and broad_phase.hpp to streamline the build process.
  • Enhanced HashGrid class methods in hash_grid.cpp and hash_grid.hpp for better clarity and efficiency.
  • Improved SpatialHash class methods in spatial_hash.cpp and spatial_hash.hpp to utilize precomputed AABBs.
  • Added new methods to SweepAndPrune and SweepAndTiniestQueue classes for building from precomputed AABBs.
  • Introduced a new function to suggest a good voxel size based on AABBs in voxel_size_heuristic.cpp and voxel_size_heuristic.hpp.
  • Optimized edge_edge_mollifier.cpp with FMA operator in gradient calculations.
  • Updated eigen_ext.tpp to improve error handling during matrix projections.
  • Added a static method to create an empty interval in interval.hpp.

Type of change

  • Enhancement (non-breaking change which improves existing functionality)

- Moved the inclusion of the CCD library to a new position in CMakeLists.txt for better organization.
- Updated CPM version from 0.40.2 to 0.42.0 in CPM.cmake.
- Modified ccd_query_io.cmake to use the new CPMAddPackage syntax with options.
- Updated finite_diff.cmake to use the latest version of the finite-diff package (1.0.3).
- Adjusted libigl.cmake to use the new CPMAddPackage syntax with options.
- Updated scalable_ccd.cmake to use the new CPMAddPackage syntax with options.
- Refactored BroadPhase class methods in broad_phase.cpp and broad_phase.hpp to streamline the build process.
- Enhanced HashGrid class methods in hash_grid.cpp and hash_grid.hpp for better clarity and efficiency.
- Improved SpatialHash class methods in spatial_hash.cpp and spatial_hash.hpp to utilize precomputed AABBs.
- Added new methods to SweepAndPrune and SweepAndTiniestQueue classes for building from precomputed AABBs.
- Introduced a new function to suggest a good voxel size based on AABBs in voxel_size_heuristic.cpp and voxel_size_heuristic.hpp.
- Optimized edge_edge_mollifier.cpp with FMA operator in gradient calculations.
- Updated eigen_ext.tpp to improve error handling during matrix projections.
- Added a static method to create an empty interval in interval.hpp.
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

❌ Patch coverage is 97.70115% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.02%. Comparing base (21edcc2) to head (ec5a059).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ipc/broad_phase/voxel_size_heuristic.cpp 92.30% 1 Missing ⚠️
src/ipc/utils/eigen_ext.tpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #187      +/-   ##
==========================================
- Coverage   96.18%   96.02%   -0.16%     
==========================================
  Files         105      105              
  Lines        8064     8100      +36     
==========================================
+ Hits         7756     7778      +22     
- Misses        308      322      +14     
Flag Coverage Δ
unittests 96.02% <97.70%> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zfergus zfergus requested a review from Copilot September 1, 2025 03:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the BroadPhase class hierarchy to build from pre-computed vertex AABBs directly rather than from vertex positions. The changes streamline the build process by eliminating redundant vertex box computation across different broad phase implementations.

Key changes:

  • Added a new build() method overload that accepts precomputed std::vector<AABB> vertex boxes
  • Refactored all broad phase implementations to use vertex boxes as the primary data source
  • Updated CMake configuration files to use newer versions and improved syntax

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/src/tests/broad_phase/test_broad_phase.cpp Added test for new vertex box-based build functionality
src/ipc/utils/interval.hpp Added empty interval factory method
src/ipc/utils/eigen_ext.tpp Improved error handling in matrix projection functions
src/ipc/distance/edge_edge_mollifier.cpp Optimized gradient calculation with FMA operation
src/ipc/ccd/narrow_phase_ccd.hpp Added comprehensive documentation for CCD methods
src/ipc/candidates/candidates.hpp Added documentation for public methods
src/ipc/broad_phase/* Refactored all broad phase classes to build from vertex boxes
cmake/recipes/* Updated to newer package versions and improved CPMAddPackage syntax
CMakeLists.txt Reorganized CCD library inclusion for better organization

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zfergus zfergus merged commit c4753ba into main Sep 1, 2025
20 checks passed
@zfergus zfergus deleted the broadphase-refactor branch September 1, 2025 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant