Torque2D Reference
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Functions

Functions

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

Detailed Description

Function Documentation

F32 dglGetPixelScale ( )

Returns the pixel scale, namely:

viewPort.extent.x / 640.0

F32 dglGetWorldToScreenScale ( )

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

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