As far as I can figure out, there are only three situations we need to
deal with in the viewer code:

1. Looking away from a known position.
2. Looking towards a known position from a known distance and
   angle(s).
3. Looking from one known position towards another.

An example of (1) is the view from inside the aircraft; an example of
(2) is a chase view; and an example of (3) is a tower view.  The view
manager class should take care of setting up viewers appropriately for
different situations.

In every case, we want to be able to specify offsets for all six
degrees of freedom.  I think that it makes sense to put all of this in
a single, configurable viewer class, rather than having separater
viewer_lookat, viewer_rph, and (eventually) viewer_tower classes that
duplicate most of each-others' code.

The main required output is the VIEW matrix to pass to ssgSetCamera,
but several parts of FlightGear need vectors and matrices that are
byproducts of calculating VIEW as well (such as the world-up vector);
it would be nice to minimize these dependencies as far as possible.

All of the views can still be managed by the view-manager class (a
proper subsystem), but we should try to remove all hard-coded
dependencies from the rest of the FlightGear codebase.  For example,
the scenery code doesn't need to know which view is in use; it only
needs to know where the coordinates and VIEW matrix for the camera.

Comments?  Volunteers?  I think that the easiest solution is probably
a clean rewrite, but paying close attention to how Norm used the
matrices and vectors in the original.


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to