|
@@ -191420,18 +191420,33 @@ and limitations under the License.
|
|
|
,
|
|
|
t.prototype.updateSubTiles = function(e, n, r, o, a, s, c) {
|
|
|
for (var l = !0, u = [-.25 * o, .25 * o, -.25 * o, .25 * o], d = [.25 * o, .25 * o, -.25 * o, -.25 * o], p = 0; p < 4; ++p) {
|
|
|
- var h = c + p.toString(10);
|
|
|
- if (!e.tilePresenceMap || e.tilePresenceMap[h]) {
|
|
|
+ var h = c + p.toString(10); //一级(512):0 1 2 3分别为左上、右上、左下、右下。二级(1024)就是把一级的每一块分裂,如00 01 02 03分别是0的左上、右上、左下、右下……
|
|
|
+ //if (!e.tilePresenceMap || e.tilePresenceMap[h]) { //去掉判断,直接显示
|
|
|
var f = a + u[p]
|
|
|
, m = s + d[p];
|
|
|
- i.sharedData.tempVector.set(f, m, 0),
|
|
|
- e.isTileVisible(i.sharedData.tempVector, .5 * o, n) ? (this.children[p] || (this.children[p] = new t(this.mapLayer,this.objectGroup,this.tileColor)),
|
|
|
+ i.sharedData.tempVector.set(f, m, 0);
|
|
|
+ if(e.isTileVisible(i.sharedData.tempVector, .5 * o, n)){
|
|
|
+ if(log ){
|
|
|
+ console.log('isTileVisible '+h)
|
|
|
+ }
|
|
|
+
|
|
|
+ this.children[p] || (this.children[p] = new t(this.mapLayer,this.objectGroup,this.tileColor))
|
|
|
+ l = this.children[p].update(e, n, r - 1, .5 * o, f, m, h, log) && l
|
|
|
+ }else{
|
|
|
+ if(this.children[p]){
|
|
|
+ this.children[p].remove()
|
|
|
+ delete this.children[p]
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ /* e.isTileVisible(i.sharedData.tempVector, .5 * o, n) ? (this.children[p] || (this.children[p] = new t(this.mapLayer,this.objectGroup,this.tileColor)),
|
|
|
l = this.children[p].update(e, n, r - 1, .5 * o, f, m, h) && l) : this.children[p] && (this.children[p].remove(),
|
|
|
- delete this.children[p])
|
|
|
- }
|
|
|
+ delete this.children[p]) */
|
|
|
+ //}
|
|
|
}
|
|
|
return l && this.removeObject3D(),
|
|
|
- l
|
|
|
+ l
|
|
|
+
|
|
|
}
|
|
|
,
|
|
|
t.prototype.createTileObject = function(t, e, n, a) {
|
|
@@ -191443,6 +191458,9 @@ and limitations under the License.
|
|
|
, u = n / e + .5 * (c - 1)
|
|
|
, d = -a / e + .5 * (c - 1)
|
|
|
, p = t.getTileUrl(Math.round(l), Math.round(u), Math.round(d));
|
|
|
+ if(p.includes("mapTest3/2") ){
|
|
|
+ console.log(p)
|
|
|
+ }
|
|
|
this.mesh.renderOrder = -(1e6 - l - 100 * (t.zIndex || 0));
|
|
|
var h = this.mesh.material;
|
|
|
h.map = t.textureLoader.load(p, (function(t) {
|
|
@@ -191603,7 +191621,7 @@ and limitations under the License.
|
|
|
c.projection = n.crsLocal,
|
|
|
c.zIndex = 0,
|
|
|
c.textureLoader = a.getTextureLoader(),
|
|
|
- c._tilePresenceMap = e.decodeBitStream(c.tiledMapEntity.quadtree),
|
|
|
+ c._tilePresenceMap = e.decodeBitStream(c.tiledMapEntity.quadtree),//包含tile分裂信息,如果写错了会造成tile显示不全
|
|
|
c
|
|
|
}
|
|
|
return r(e, t),
|
|
@@ -208435,7 +208453,7 @@ and limitations under the License.
|
|
|
}
|
|
|
}
|
|
|
,
|
|
|
- t.prototype.getTransformationMatrix = function(t) {
|
|
|
+ t.prototype.getTransformationMatrix = function(t) {//点云截取 所有点在乘上这个矩阵后, 还能落在 1 * 1 * 1的box内的点就是所裁剪的
|
|
|
var e = this.ViewService.mainView.getVolumeClippingLayer().getBoxFrame()
|
|
|
, n = (new o.Matrix4).getInverse(e.matrixWorld)
|
|
|
, i = t.m2w_;
|