BG_GetFOV(): Returns the current field of view.
BG_WorldPoint(): Transforms the point from local (view) space back to world space. This is an inverse of the world-to-local transformation.
The near and far plane came from another function in my BGU library (BGU_SetClipPlanes).

As long as you know what you have set your fov, near and far planes to, you should be able to use those values in this function.