Skip to content

Conversation

zfergus
Copy link
Member

@zfergus zfergus commented Sep 2, 2025

Description

This pull request introduces a new broad phase collision detection method, LBVH (Linear Bounding Volume Hierarchy), and adds performance profiling capabilities to the project. It also includes updates to the build system and Python bindings to support these features. The most important changes are grouped below.

LBVH Broad Phase Collision Detection

  • Added implementation of the LBVH class in src/ipc/broad_phase/lbvh.hpp and corresponding source file, providing a new broad phase method for collision detection. This includes node structure, build routines, and candidate detection logic.
  • Added a Python example python/examples/lbvh.py demonstrating LBVH usage and visualization.

Performance Profiling

  • Added a new profiler utility (src/ipc/utils/profiler.cpp, src/ipc/utils/profiler.hpp) to measure and record performance metrics, with CSV output support.
  • Updated the build configuration (CMakeLists.txt, src/ipc/config.hpp.in) to allow enabling/disabling the profiler via the IPC_TOOLKIT_WITH_PROFILER option.
  • Instrumented the BVH broad phase implementation (src/ipc/broad_phase/bvh.cpp) with profiler blocks to collect timing data for key routines.

Type of change

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

…ing support

- Introduced LBVH class for efficient broad phase collision detection.
- Implemented LBVH node structure with AABB intersection checks.
- Added methods for detecting vertex-vertex, edge-vertex, edge-edge, face-vertex, edge-face, and face-face candidates.
- Integrated profiling functionality with IPC_TOOLKIT_WITH_PROFILER flag.
- Updated CMakeLists to include new LBVH test files and source files.
- Added tests for LBVH construction and candidate detection.
- Included Python bindings for LBVH and example usage scripts.
- Enhanced configuration options in config.hpp for profiling support.
Copy link

codecov bot commented Sep 2, 2025

Codecov Report

❌ Patch coverage is 89.06667% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.36%. Comparing base (c4753ba) to head (1bb9f8e).

Files with missing lines Patch % Lines
src/ipc/utils/profiler.cpp 8.10% 34 Missing ⚠️
src/ipc/broad_phase/lbvh.cpp 97.50% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #188      +/-   ##
==========================================
- Coverage   96.02%   94.36%   -1.66%     
==========================================
  Files         105      109       +4     
  Lines        8100     8487     +387     
==========================================
+ Hits         7778     8009     +231     
- Misses        322      478     +156     
Flag Coverage Δ
unittests 94.36% <89.06%> (-1.66%) ⬇️

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.

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