Back to class index
| Frustum::ViewportToScreenSpaceSyntaxfloat2 Frustum::ViewportToScreenSpace(float x, float y, int screenWidth, int screenHeight); [4 lines of code]float2 Frustum::ViewportToScreenSpace(const float2 &point, int screenWidth, int screenHeight); [4 lines of code] Maps a point from the normalized viewport space to the screen space. In normalized viewport space, top-left: (-1, 1), top-right: (1, 1), bottom-left: (-1, -1), bottom-right: (-1, 1). In screen space, top-left: (0, 0), top-right: (0, screenWidth-1), bottom-left: (0, screenHeight-1), bottom-right: (screenWidth-1, screenHeight-1). This mapping is affine. See Also |