I am working on the view scaling / FOV. Presently a FOV (e.g. 55 degrees) is set for
the window, and can be changed by pressing 'x' and 'X' keys. This FOV means the
horizontal field of view for the window, which is OK until the window becomes tall and
thin when scaling to the window width becomes a bit silly (lots of sky above and
ground below gets shown, with the interesting part of the view becoming very small in
the middle).
What I am doing is (re)defining the FGViewer::{get_,set_,}fov members to mean the
Nominal FOV, the exact meaning of which will depend on the setting of
FGViewer::scalingType, to one of:
// nominal Field Of View actually applies to ...
// (therefore scaling of view is proportional to ...)
SCALING_WIDTH, // window width
SCALING_MAX, // max(width, height)
// SCALING_G_MEAN, // geometric_mean(width, height)
// SCALING_INDEPENDENT // (not affected by window size)
SCALING_WIDTH is the present behaviour. SCALING_MAX is traditional in this sort of
context: if the window is taller than its width, then the view is scaled to the
window's height, else its width. I propose to make SCALING_MAX the default, and
probably no-one will want to change it, but if they do, it could easily be linked to a
property or something. SCALING_G_MEAN (which I'm quite fond of) and
SCALING_INDEPENDENT are other ideas that could easily be implemented if someone wants
them.
Is this OK? Comments?
[Details: I'll remove FGViewer::get_fov_ratio() (silly function; I shouldn't have
introduced it), and add get_h_fov() and get_v_fov() which will return results
depending on the window shape, scaling mode and nominal FOV. These are required for
ssgSetFOV. I won't add a way of manipulating the scaling type unless and until
someone wants it.]
- Julian
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel