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

Method UpdateBounds

Source/Engine/Level/Actors/EnvironmentProbe.cpp:167–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void EnvironmentProbe::UpdateBounds()
168{
169 if (BoxProjection)
170 {
171 OrientedBoundingBox(_radius, _transform).GetBoundingBox(_box);
172 BoundingSphere::FromBox(_box, _sphere);
173 }
174 else
175 {
176 _sphere = BoundingSphere(_transform.Translation, _radius * _transform.Scale.MaxValue());
177 BoundingBox::FromSphere(_sphere, _box);
178 }
179 if (_sceneRenderingKey != -1)
180 GetSceneRendering()->UpdateActor(this, _sceneRenderingKey, ISceneRenderingListener::Bounds);
181}
182
183void EnvironmentProbe::Draw(RenderContext& renderContext)
184{

Callers

nothing calls this directly

Calls 5

UpdateActorMethod · 0.80
OrientedBoundingBoxClass · 0.50
BoundingSphereClass · 0.50
GetBoundingBoxMethod · 0.45
MaxValueMethod · 0.45

Tested by

no test coverage detected