computeBoundingSphere method
void
computeBoundingSphere(
)
override
Implementation
@override
void computeBoundingSphere() {
if ( this.boundingSphere == null ) {
this.boundingSphere = BoundingSphere();
}
final geometryCount = _geometryCount;
final boundingSphere = this.boundingSphere;
final active = _active;
boundingSphere?.empty();
for (int i = 0; i < geometryCount; i ++ ) {
if ( active[ i ] == false ) continue;
getMatrixAt( i, _matrix );
getBoundingSphereAt( i, _sphere ).applyMatrix4( _matrix );
boundingSphere?.union( _sphere );
}
}