ComputeBoundsScreenSize

Computes the screen size 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 ComputeBoundsScreenSize
(
    const FVector4 & BoundsOrigin,
    const float SphereRadius,
    const FVector4 & ViewOrigin,
    const FMatrix & ProjMatrix
)

Remarks

Computes the screen size of a given sphere bounds in the given view. The screen size is the projected diameter of the bounding sphere of the model. i.e. 0.5 means half the screen's maximum dimension.

Returns

float - The screen size calculated

Parameters

Parameter

Description

BoundsOrigin

Origin of the bounds in world space

SphereRadius

Radius of the sphere to use to calculate screen coverage

ViewOrigin

The origin of the view to calculate the display factor for

ProjMatrix

The projection matrix used to scale screen size bounds

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