Torque2D Reference
Loading...
Searching...
No Matches

Functions

F32 dglGetPixelScale ()
F32 dglGetWorldToScreenScale ()
 The scale factor of a world unit to a screen unit.
F32 dglProjectRadius (F32 dist, F32 radius)

Detailed Description

Function Documentation

◆ dglGetPixelScale()

F32 dglGetPixelScale ( )

Returns the pixel scale, namely:

viewPort.extent.x / 640.0

◆ dglGetWorldToScreenScale()

F32 dglGetWorldToScreenScale ( )

The scale factor of a world unit to a screen unit.

◆ dglProjectRadius()

F32 dglProjectRadius ( F32 dist,
F32 radius )

Returns the screen length of a line of distance "radius" that is "dist" units away from the camera that is perpendicular to the line of sight, namely:

(radius / dist) * worldToScreenScale