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. |
|
|
||
| }; | ||
|
|
||
| NodeProcess.prototype.subdivide = function (node, camera, params) { |
There was a problem hiding this comment.
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.