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

Method GetBounds

Source/Editor/Utilities/ViewportIconsRenderer.cpp:73–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71Real ViewportIconsRenderer::MaxSizeDistance = 1000.0f;
72
73void ViewportIconsRenderer::GetBounds(const Vector3& position, const Vector3& viewPosition, BoundingSphere& bounds)
74{
75 Real scale = Math::Square(Vector3::Distance(position, viewPosition) / MaxSizeDistance);
76 Real radius = MinSize + Math::Min<Real>(scale, 1.0f) * (MaxSize - MinSize);
77 bounds = BoundingSphere(position, radius * Scale);
78}
79
80void ViewportIconsRenderer::DrawIcons(RenderContext& renderContext, Actor* actor)
81{

Callers 3

RayCastSelfMethod · 0.45
OnAssetLoadedMethod · 0.45
TryGetPatchCoordToAddMethod · 0.45

Calls 3

SquareFunction · 0.85
DistanceFunction · 0.85
BoundingSphereClass · 0.50

Tested by

no test coverage detected