Skip to content

Broadphase implementation - #77

Merged
gallantandre merged 9 commits into
mainfrom
broadphase-implementation
Sep 5, 2026
Merged

gallantandre merged 9 commits into
mainfrom
broadphase-implementation

Conversation

@KristinHolt55

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread blast/world/distance.hpp Outdated
Comment thread blast/world/distance.hpp Outdated
Comment thread blast/blast_world.hpp Outdated
Comment thread tests/world/test_helper/test_dynamic_objects.hpp Outdated
Comment thread tests/world/test_helper/test_helper.hpp Outdated
Comment thread blast/world/broadphase.hpp Outdated
Comment thread blast/world/broadphase.hpp Outdated
return;
}

if (child_type1 == CollisionObjectType::aabb && child_type2 == CollisionObjectType::capsule) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this better than nested if? @gallantandre. Also, I think we should start with the most common if block, so AABB=AABB?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Based on Tracy profiling, most common if block is aabb vs capsule

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@ThomasDuquette Yes, I think generally it's better than a nested if, as long as there is no overlap.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That being said, there is a lot of nesting conditionals here. There’s probably some analysis that we could do to increase the performance, but the algorithm itself is pretty branchy, so I don’t know if there’s actually anything we can do to make it better.

Comment thread blast/world/broadphase.hpp Outdated
Comment thread blast/world/broadphase.hpp
Comment thread blast/world/broadphase.hpp Outdated
Comment thread blast/optimization/constraints.hpp Outdated
Comment thread blast/optimization/constraints.hpp Outdated
Comment thread blast/world/broadphase.hpp
Comment thread blast/world/broadphase.hpp
Comment thread blast/world/broadphase.hpp
Comment thread blast/world/broadphase.hpp Outdated
Comment thread blast/blast_world.hpp Outdated
Comment thread tests/world/test_broadphase.cpp Outdated
Comment thread tests/world/test_broadphase.cpp Outdated
Comment thread tests/world/test_broadphase.cpp Outdated
Comment thread tests/world/test_broadphase.cpp Outdated
Comment thread tests/world/test_broadphase.cpp Outdated
Comment thread tests/world/test_broadphase.cpp Outdated
Comment thread tests/world/test_broadphase.cpp Outdated
@gallantandre
gallantandre merged commit fd12217 into main Sep 5, 2026
6 checks passed
@gallantandre
gallantandre deleted the broadphase-implementation branch September 5, 2026 13:32
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.

3 participants