-
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
BrowseTree #54
Comments
I think a following architecture is more clear? BrowseTree : (updateView, etc) Class inherit from BrowseTree and NodeProcess must have same name. Then we can initiate a BrowseTree with a specific tree corresponding to type of data we want to process? |
attention this part will change this week |
FYI, here is a Chunk class i did in my ChunkedLoD version, may be it helps: var Chunk = function(options){
p/s: you can add an extent to store bbox if you want |
Create empty child chunks, data has not been filled yet. Chunk.prototype.createChildChunks = function() {
if ((this.children.length === 0)) {
var level = this.level + 1;
var x = this.x * 2;
var y = this.y * 2;
this.children.push( new Chunk({
x : x,
y : y,
level : level,
parent : this
}));
this.children.push( new Chunk({
x : x + 1,
y : y,
level : level,
parent : this
}));
this.children.push( new Chunk({
x : x,
y : y + 1,
level : level,
parent : this
}));
this.children.push( new Chunk({
x : x + 1,
y : y + 1,
level : level,
parent : this
}));
}
return this.children;
}; |
I add in browseTree :
|
I start the new browse tree |
I am assigning myself to this issue to speed up the implementation of some functionalities required for #41. |
@Jeremy-Gaillard any news on this issue? |
I think this issue is no longer relevant. I'm closing it. |
@mbredif and I designed a more elegant way to manage the browseTree an loading mechanisms.
The most important issue in the current implementation is the need to modify the browseTree class each time we need to add a new layer type, so we think a redesign is required.
First off, a clarification of the roles of each class:
A node that can be part of a hierarchical structures (let's call them tiles) must have a constructor which creates an empty tile composed only of metadata (tile id, bounding box...). This metadata will be used by the provider to download the relevant data. A tile should also have a load function, which adds the actual data to it.
The instantiation of the tiles is no longer done by the providers. The quadtree does it during the subdivision. When a quadtree is created, the root node is also instantiated (which solves the problem raised in my comment in issue #40).
NodeProcess has a unique entry point, a function that returns a boolean indicating if a node is culled or not. It doesn't change the state of a node.
New browseTree algorithm (replacing the processNode function):
This is just a draft and may need to be changed.
Tiles have three states: loaded, divided and pending.
Lastly, when adding a layer, you have to specify a NodeProcess. So the Scene function addLayer(layer,provider) becomes addLayer(layer,provider,nodeProcess). I think the NodeProcess will only change when you change between a globe or a planar representation.
The text was updated successfully, but these errors were encountered: