File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
packages/engine/Source/Scene/Model Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ class ModelInstance {
192192 * const boundingSphere = modelInstance.getBoundingSphere(model);
193193 * viewer.camera.flyToBoundingSphere(boundingSphere);
194194 */
195- getBoundingSphere ( model , result ) {
195+ getBoundingSphere ( model , useBoundingSphere2D , mapProjection , result ) {
196196 const modelMatrix = model . modelMatrix ;
197197 const sceneGraph = model . sceneGraph ;
198198 const instanceBoundingSpheres = [ ] ;
@@ -206,8 +206,8 @@ class ModelInstance {
206206 sceneGraph ,
207207 runtimeNode ,
208208 primitiveBoundingSphere ,
209- false ,
210- undefined ,
209+ useBoundingSphere2D ,
210+ mapProjection ,
211211 ) ;
212212 instanceBoundingSpheres . push ( boundingSphere ) ;
213213 }
@@ -254,7 +254,13 @@ class ModelInstance {
254254 let scale = model . scale ;
255255 const radius = model . sceneGraph . rootBoundingSphere . radius ;
256256
257- const boundingSphere = this . getBoundingSphere ( model , scratchBoundingSphere ) ;
257+ const boundingSphere = this . getBoundingSphere (
258+ model ,
259+ useModelMatrix2D ,
260+ frameState . mapProjection ,
261+ scratchBoundingSphere ,
262+ ) ;
263+
258264 const scaleInPixels = frameState . camera . getPixelSize (
259265 boundingSphere ,
260266 frameState . context . drawingBufferWidth ,
You can’t perform that action at this time.
0 commit comments