| 44 | } |
| 45 | |
| 46 | void Terrain::UpdateBounds() |
| 47 | { |
| 48 | PROFILE_CPU(); |
| 49 | _box = BoundingBox(_transform.Translation); |
| 50 | for (int32 i = 0; i < _patches.Count(); i++) |
| 51 | { |
| 52 | auto patch = _patches[i]; |
| 53 | patch->UpdateBounds(); |
| 54 | BoundingBox::Merge(_box, patch->_bounds, _box); |
| 55 | } |
| 56 | BoundingSphere::FromBox(_box, _sphere); |
| 57 | if (_sceneRenderingKey != -1) |
| 58 | GetSceneRendering()->UpdateActor(this, _sceneRenderingKey, ISceneRenderingListener::Bounds); |
| 59 | } |
| 60 | |
| 61 | void Terrain::CacheNeighbors() |
| 62 | { |
nothing calls this directly
no test coverage detected