Skip to content
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

[ Question ] - How does this library/engine handle spatial partitioning? #30

Closed
boxic opened this issue May 2, 2024 · 6 comments
Closed
Labels
question Further information is requested

Comments

@boxic
Copy link

boxic commented May 2, 2024

Sorry if this is an inappropriate place to ask questions rather than file reports or feature requests, but I was just curious how this library/engine handles spatial partitioning - put simpler, how does the library/engine ensure rigid bodies only check for collisions against objects near them? Purely wanting to learn how it works! is there a specific tree structure it uses?

@stephengold
Copy link
Owner

JMonkeyEngine's scene graph is an acyclic directed graph: a tree of spatials, with meshes at the leaves. It gives you the flexibility to organize each scene spatially, if you wish. Whatever scene-graph organization you choose, spatial culling is performed using bounding volumes, either axis-aligned bounding boxes (AABBs) or bounding spheres, at each level of the graph.

JME is a volunteer-run project with an active and welcoming community, but we don't congregate here at GitHub. This is our tracker for bugs and enhancements. If you have (further) questions about how JME works, the best forum for them would be our Discourse hub.

@boxic
Copy link
Author

boxic commented May 3, 2024

thank you for the response!

@boxic boxic closed this as completed May 3, 2024
@stephengold
Copy link
Owner

Re-reading this, I just realized that boxic probably wasn't asking about JMonkeyEngine, as I hastily assumed.
Oops!

@boxic
Copy link
Author

boxic commented May 3, 2024

Yeah I was talking about Bullet I think

@stephengold
Copy link
Owner

Bullet implements 2 broadphase collision algorithms:

  1. incremental 3-D sweep and prune
  2. dynamic bounding-volume hierarchy based on AABB

You basically select one or the other when the physics space is created.

I haven't studied them in detail, but I can point you to the C++ code.

@boxic
Copy link
Author

boxic commented May 4, 2024

Ah okay, that's much more insightful, thank you!

@stephengold stephengold added the question Further information is requested label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants