[Feature Request] Binary Space Partition (BSP) structure
See original GitHub issueI am creating this issue so people can contribute to this idea. This is a must-have feature for many 3d games.
BSP allows developers to work with just a subset of geometries at a given moment, it can be used to improve rendering and/or check collisions.
Draft interface:
public interface BSP {
void insert(Object userObject, BoundingBox bounds);
void insert(Object userObject, Sphere sphere);
void insert(Object userObject, Triangle triangle);
void insert(Object userObject, Vector3 point);
/...
void remove(Object userObject);
// methods to query geometries
Set<Object> queryNear(Frustum frustum);
Set<Object> queryNear(Ray ray);
Set<Object> queryNear(BoundingBox aabb);
}
What do you think?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Binary Space Partitioning - GeeksforGeeks
Binary Space Partitioning is implemented for recursively subdividing a space into two convex sets by using hyperplanes as partitions.
Read more >Geometry – BSP Tree Tutorial - Apache Commons
Binary space partitioning (BSP) trees are a geometric data structure used throughout Commons Geometry. They can be used for many purposes ...
Read more >A Tutorial on Binary Space Partitioning Trees part of EG ...
The Binary Space Partitioning BSP tree algorithm was initially developed as an efficient method for ordering a set of polygons in order to...
Read more >Space partition tree. “Smart data structures and dumb code…
Binary Space Partition tree (BSP Tree) is a tree where each node recursively divides space in two. And a node can contain an...
Read more >How Much of a Genius-Level Move Was Using Binary Space ...
The following diagram shows the construction and traversal of a BSP tree representing a simple 2D scene. In 2D, the partitioning planes are ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll surely use it in my 3D projects (i already need it actually), so I can help to maintain it. @yuripourre yes, let create an initial PR with minimum features (marking it as draft) then we could work on it to refine the design. Since Nathan is OK with it, i’m closing the request now.
I’m open to adding it, though I probably won’t maintain it personally unless I can find a use for it in my projects. That means @yuripourre or others who do use it would need to maintain it.