Skip to content

Commit

Permalink
bbox centerPosition when tiling bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sdson committed Apr 11, 2018
1 parent 4d69903 commit 71b1632
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/mago3d/core/MagoManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ MagoManager.prototype.startRender = function(scene, isLastFrustum, frustumIdx, n
gl.viewport(0, 0, this.sceneState.drawingBufferWidth, this.sceneState.drawingBufferHeight);
this.renderGeometry(gl, cameraPosition, currentShader, renderTexture, ssao_idx, this.visibleObjControlerNodes);
// test mago geometries.***********************************************************************************************************
this.renderMagoGeometries(ssao_idx); //TEST
//this.renderMagoGeometries(ssao_idx); //TEST
this.depthFboNeo.unbind();
this.swapRenderingFase();

Expand All @@ -1310,7 +1310,7 @@ MagoManager.prototype.startRender = function(scene, isLastFrustum, frustumIdx, n
this.swapRenderingFase();

// 3) test mago geometries.***********************************************************************************************************
this.renderMagoGeometries(ssao_idx); //TEST
//this.renderMagoGeometries(ssao_idx); //TEST

// test. Draw the buildingNames.***
if (this.magoPolicy.getShowLabelInfo())
Expand Down Expand Up @@ -6535,9 +6535,10 @@ MagoManager.prototype.calculateBoundingBoxesNodes = function()
var tMatrix = ManagerUtils.calculateTransformMatrixAtWorldPosition(worldCoordPosition, heading, pitch, roll, undefined, tMatrix, this);

// now calculate the geographicCoord of the center of the bBox.
var bboxCenterPoint = buildingSeed.bBox.getCenterPoint(bboxCenterPoint);
var bboxCenterPointWorldCoord = tMatrix.transformPoint3D(bboxCenterPoint, bboxCenterPointWorldCoord);
buildingSeed.geographicCoordOfBBox = ManagerUtils.pointToGeographicCoord(bboxCenterPointWorldCoord, buildingSeed.geographicCoordOfBBox, this); // original.
//var bboxCenterPoint = buildingSeed.bBox.getCenterPoint(bboxCenterPoint);
//var bboxCenterPointWorldCoord = tMatrix.transformPoint3D(bboxCenterPoint, bboxCenterPointWorldCoord);
//buildingSeed.geographicCoordOfBBox = ManagerUtils.pointToGeographicCoord(bboxCenterPointWorldCoord, buildingSeed.geographicCoordOfBBox, this); // original.
buildingSeed.geographicCoordOfBBox.setLonLatAlt(longitude, latitude, height);
}
}

Expand Down

0 comments on commit 71b1632

Please sign in to comment.