| 555 | } |
| 556 | |
| 557 | void TerrainBlock::_updateBounds() |
| 558 | { |
| 559 | if ( !mFile ) |
| 560 | return; // quick fix to stop crashing when deleting terrainblocks |
| 561 | |
| 562 | // Setup our object space bounds. |
| 563 | mBounds.minExtents.set( 0.0f, 0.0f, 0.0f ); |
| 564 | mBounds.maxExtents.set( getWorldBlockSize(), getWorldBlockSize(), 0.0f ); |
| 565 | getMinMaxHeight( &mBounds.minExtents.z, &mBounds.maxExtents.z ); |
| 566 | |
| 567 | // Set our mObjBox to be equal to mBounds |
| 568 | if ( mObjBox.maxExtents != mBounds.maxExtents || |
| 569 | mObjBox.minExtents != mBounds.minExtents ) |
| 570 | { |
| 571 | mObjBox = mBounds; |
| 572 | resetWorldBox(); |
| 573 | } |
| 574 | } |
| 575 | |
| 576 | void TerrainBlock::_onZoningChanged( SceneZoneSpaceManager *zoneManager ) |
| 577 | { |