From ad8602281050f69a97dc89c3a66fa38b92a62d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Lagier?= Date: Thu, 11 Jul 2024 11:15:00 +0200 Subject: [PATCH] fix marker occlusion --- src/viewer/scene/webgl/occlusion/OcclusionLayer.js | 2 +- src/viewer/scene/webgl/occlusion/OcclusionTester.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/viewer/scene/webgl/occlusion/OcclusionLayer.js b/src/viewer/scene/webgl/occlusion/OcclusionLayer.js index d91f85ecd1..755cefb188 100644 --- a/src/viewer/scene/webgl/occlusion/OcclusionLayer.js +++ b/src/viewer/scene/webgl/occlusion/OcclusionLayer.js @@ -99,7 +99,7 @@ class OcclusionLayer { for (let i = 0; i < this.numMarkers; i++) { if (this.markerList[i]) { const marker = this.markerList[i]; - const worldPos = marker.worldPos; + const worldPos = marker.rtcPos; this.positions[j++] = worldPos[0]; this.positions[j++] = worldPos[1]; this.positions[j++] = worldPos[2]; diff --git a/src/viewer/scene/webgl/occlusion/OcclusionTester.js b/src/viewer/scene/webgl/occlusion/OcclusionTester.js index b473a20f81..9f7a92e3f8 100644 --- a/src/viewer/scene/webgl/occlusion/OcclusionTester.js +++ b/src/viewer/scene/webgl/occlusion/OcclusionTester.js @@ -333,10 +333,7 @@ class OcclusionTester { continue; } - // The `origin` has been changed from `occlusionLayer.origin` to `[ 0, 0, 0 ]` - // because OcclusionLayer markers' transformation is being applied through the - // OcclusionLayer::positions array. See XEOK-33 - const origin = [ 0, 0, 0 ]; + const origin = occlusionLayer.origin; gl.uniformMatrix4fv(this._uViewMatrix, false, createRTCViewMat(camera.viewMatrix, origin));