|
@@ -525,6 +525,14 @@ export class TilesRenderer extends TilesRendererBase {
|
|
|
sphere.radius = data[ 3 ];
|
|
|
sphere.applyMatrix4( transform );
|
|
|
|
|
|
+ } else if ( 'box' in tile.boundingVolume ) {
|
|
|
+
|
|
|
+ const data = tile.boundingVolume.box;
|
|
|
+ sphere = new Sphere();
|
|
|
+ box.getBoundingSphere( sphere );
|
|
|
+ sphere.center.set( data[ 0 ], data[ 1 ], data[ 2 ] );
|
|
|
+ sphere.applyMatrix4( transform );
|
|
|
+
|
|
|
}
|
|
|
|
|
|
const region = null;
|
|
@@ -933,9 +941,8 @@ export class TilesRenderer extends TilesRendererBase {
|
|
|
|
|
|
const cached = tile.cached;
|
|
|
const sphere = cached.sphere;
|
|
|
- const box = cached.box;
|
|
|
const inFrustum = cached.inFrustum;
|
|
|
- if ( sphere || box ) {
|
|
|
+ if ( sphere ) {
|
|
|
|
|
|
const cameraInfo = this.cameraInfo;
|
|
|
let inView = false;
|
|
@@ -944,11 +951,7 @@ export class TilesRenderer extends TilesRendererBase {
|
|
|
// Track which camera frustums this tile is in so we can use it
|
|
|
// to ignore the error calculations for cameras that can't see it
|
|
|
const frustum = cameraInfo[ i ].frustum;
|
|
|
-
|
|
|
- const intersectsSphere = sphere && frustum.intersectsSphere( sphere );
|
|
|
- const intersectsBox = box && frustum.intersectsBox( box );
|
|
|
-
|
|
|
- if ( intersectsSphere || intersectsBox ) {
|
|
|
+ if ( frustum.intersectsSphere( sphere ) ) {
|
|
|
|
|
|
inView = true;
|
|
|
inFrustum[ i ] = true;
|