-
Notifications
You must be signed in to change notification settings - Fork 290
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
Quadtree #90
Quadtree #90
Conversation
Previously only existed in NodeMesh.
… NodeProcess. Only the level-0 tiles are still created inside Quadtree.
I support the idea of having the Quadtree only concerns about geometric subdivision. Ideally, it could be interchangeable with an octree, kdtree or whatever bounding volume hierarchy. Furthermore, why is a Quadtree a layer rather than a layer using a quadtree ? I imagine a quadtree could be shared between different layers for instance. |
At the moment, I don't think it is possible to move the initial tile creation out without a lot of modifications to the tile creation mechanism (see #71. I am actually integrating bits of #71 to ease the process). I agree that the layer is weirdly defined currently. There should be a difference between the layer and the data structure. It will be addressed in another PR. I will open an issue regarding that matter. |
@@ -84,6 +84,36 @@ define('Scene/NodeProcess', | |||
|
|||
}; | |||
|
|||
NodeProcess.prototype.subdivide = function (node, camera, params) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function only uses params.tree
so it would make sense to change the third argument to quadtree
This PR aims at clarifying the role of Quadtree. Quadtree no longer has up, down and upSublayer functions. The divide function has been added, which returns an array of bounding boxes.
Visibility and tile creation operations are moved to Nodeprocess, allowing most visibility changes to happen in the same class.