|
@@ -941,8 +941,9 @@ export class TilesRenderer extends TilesRendererBase {
|
|
|
|
|
|
const cached = tile.cached;
|
|
const cached = tile.cached;
|
|
const sphere = cached.sphere;
|
|
const sphere = cached.sphere;
|
|
|
|
+ const box = cached.box;
|
|
const inFrustum = cached.inFrustum;
|
|
const inFrustum = cached.inFrustum;
|
|
- if ( sphere ) {
|
|
|
|
|
|
+ if ( sphere || box ) {
|
|
|
|
|
|
const cameraInfo = this.cameraInfo;
|
|
const cameraInfo = this.cameraInfo;
|
|
let inView = false;
|
|
let inView = false;
|
|
@@ -951,7 +952,11 @@ export class TilesRenderer extends TilesRendererBase {
|
|
// Track which camera frustums this tile is in so we can use it
|
|
// 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
|
|
// to ignore the error calculations for cameras that can't see it
|
|
const frustum = cameraInfo[ i ].frustum;
|
|
const frustum = cameraInfo[ i ].frustum;
|
|
- if ( frustum.intersectsSphere( sphere ) ) {
|
|
|
|
|
|
+
|
|
|
|
+ const intersectsSphere = sphere && frustum.intersectsSphere( sphere );
|
|
|
|
+ const intersectsBox = box && frustum.intersectsBox( box );
|
|
|
|
+
|
|
|
|
+ if ( intersectsSphere || intersectsBox ) {
|
|
|
|
|
|
inView = true;
|
|
inView = true;
|
|
inFrustum[ i ] = true;
|
|
inFrustum[ i ] = true;
|