ComputeBoundsScreenRadiusSquared

Computes the screen radius squared of a given sphere bounds in the given view.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/SceneManagement.h

Include

#include "SceneManagement.h"

Source

/Engine/Source/Runtime/Engine/Private/SceneManagement.cpp

Syntax

float ComputeBoundsScreenRadiusSquared
(
    const FVector4 & BoundsOrigin,
    const float SphereRadius,
    const FVector4 & ViewOrigin,
    const FMatrix & ProjMatrix
)

Remarks

Computes the screen radius squared of a given sphere bounds in the given view. This is used at runtime instead of ComputeBoundsScreenSize to avoid a square root.

Returns

float - The screen size calculated

Parameters

Parameter

Description

Origin

Origin of the bounds in world space

SphereRadius

Radius of the sphere to use to calculate screen coverage

ViewOrigin

The view origin involved in the calculation

ProjMatrix

The projection matrix of the view involved in the calculation

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss