Contents

SushiEngine

sky_body_screen_radius

Scalar sky_body_screen_radius(Scalar angular_radius_radians, Scalar projection_scale_y, Scalar viewport_height) noexcept

Parameters

NameTypeDescription
angular_radius_radiansScalar

The body's apparent angular radius.

projection_scale_yScalar

The projection matrix's m[5], which is 1 / tan(fov/2).

viewport_heightScalar

Rendered image height, pixels.

Returns

Scalar

The disc's radius in pixels, never negative.

Description

The pixel radius a body of the given angular radius is drawn at.