MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / UpdateBounds

Method UpdateBounds

Source/Engine/Terrain/Terrain.cpp:46–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void 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
61void Terrain::CacheNeighbors()
62{

Callers

nothing calls this directly

Calls 4

UpdateActorMethod · 0.80
BoundingBoxClass · 0.50
MergeFunction · 0.50
CountMethod · 0.45

Tested by

no test coverage detected