Skip to content

Commit

Permalink
Merge pull request #3434 from AnalyticalGraphicsInc/3d-tiles-refine
Browse files Browse the repository at this point in the history
Change 3D Tiles refine to inherit from parent
  • Loading branch information
lilleyse committed Jan 15, 2016
2 parents c5e509e + 2f15f1e commit 0a8b211
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Source/Scene/Cesium3DTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,20 @@ define([
*/
this.geometricError = header.geometricError;

// TODO: use default for a smaller tree.json? Or inherit from parent. Same for "type" and others.
var refine;
if (defined(header.refine)) {
refine = (header.refine === 'replace') ? Cesium3DTileRefine.REPLACE : Cesium3DTileRefine.ADD;
} else if (defined(parent)) {
// Inherit from parent tile if omitted.
refine = parent.refine;
}

/**
* DOC_TBA
*
* @readonly
*/
this.refine = (header.refine === 'replace') ? Cesium3DTileRefine.REPLACE : Cesium3DTileRefine.ADD;
this.refine = refine;

/**
* DOC_TBA
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "batchedNoBuildings.b3dm"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "batchedWithBatchTable.b3dm"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "batchedWithoutBatchTable.b3dm"
}
Expand Down
1 change: 1 addition & 0 deletions Specs/Data/Cesium3DTiles/Composite/Composite/tiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "composite.cmpt"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "compositeOfComposite.cmpt"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "instancedGltfEmbedded.i3dm"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "instancedGltfExternal.i3dm"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "instancedWithBatchTable.i3dm"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "instancedWithoutBatchTable.i3dm"
}
Expand Down
1 change: 1 addition & 0 deletions Specs/Data/Cesium3DTiles/Points/Points/tiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "points.pnts"
}
Expand Down
1 change: 1 addition & 0 deletions Specs/Data/Cesium3DTiles/Tilesets/Tileset/tiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 70,
"refine": "add",
"content": {
"url": "parent.b3dm",
"boundingVolume": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 70,
"refine": "add",
"children": [
{
"boundingVolume": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 70,
"refine": "add",
"content": {
"url": "parent.b3dm",
"boundingVolume": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
]
},
"geometricError": 70,
"refine": "add",
"content": {
"url": "tiles2.json"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "tiles3.json"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
]
},
"geometricError": 0,
"refine": "add",
"content": {
"url": "ll.b3dm"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
]
},
"geometricError": 70,
"refine": "add",
"children": [
{
"boundingVolume": {
Expand Down Expand Up @@ -93,6 +94,7 @@
]
},
"geometricError": 70,
"refine": "add",
"children": [
{
"boundingVolume": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
}
},
"geometricError": 240,
"refine": "add",
"root": {
"boundingVolume": {
"region": [
Expand Down

0 comments on commit 0a8b211

Please sign in to comment.