Skip to content

Improve and modernize Octree.swift #2044

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mabi99
Copy link

@mabi99 mabi99 commented May 29, 2025

Checklist

Description

Corrected, refined and improved by Marco Binder (Heidelberg, Germany), 2025
using ChatGPT as a coding buddy. BUG FIXES: bug removed in tryAdd, where it was
implicitly expected that elements is never nil (which it was upon subdivision).
REFINEMENTS: improved efficiency in Box .contains(simd3_double), including using
an epsilon to prevent unneccessary subdivision upon rounding errors; several
other steps refined. IMPROVEMENTS: tree now autocollapses upon removing elements,
turning empty leafs into internal nodes again; accepts elements with box-regions
instead of point positions, similar to the Apple GKOctree implementation; now
respects minimumCellSize from initializer, saves it and subdivides only until
reaching minimum size, after which it bulks elements in single leave.

@iiicey
Copy link

iiicey commented May 29, 2025 via email

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.

2 participants