Andy Ross writes:

 > This looks really good to me.  

Thanks.

 > A few nits below, based on the way I think about the problem.
 >
 > David Megginson wrote:
 >  > 1. looking from a known position outwards
 >  > 2. looking at a known position from an offset
 >  > 3. looking at one known position from another
 > 
 > Heh, cockpit, chase and tower.  I wasn't thinking generally enough. :)

It's not quite that simple.  #3 could also be from another moving
vehicle (perhaps being flown by another user over the network or by AI
code).  From the viewer's perspective, it won't matter whether it's a
tower or a moving vehicle when the position is reset every frame
anyway.

 >  > // Vectors and positions
 >  > virtual const float * get_view_pos () const;
 >  > virtual const float * get_absolute_view_pos () const;
 >  > virtual const float * get_zero_elev () const;
 >  > virtual const float * get_world_up () const;
 >  > virtual const float * get_surface_east () const;
 >  > virtual const float * get_surface_south () const;
 > 
 > It's probably a good idea to specify the coordinate system for each of
 > these in the name.

Yes, I agree.  I just stole these names from the existing viewer.hxx,
and have no attachment to them.  Perhaps something like

  getRelativeViewPos_m ()
  getAbsoluteViewPos_m ()

etc. would be more appropriate.

 > I'd also suggest putting stuff like the surface directions somewhere
 > else.  These are properties of a location, strictly, not a view.

That's also a good idea.  Right now, I'm using a temporary SGViewPoint
class to hold location information -- perhaps we should make something
like it permanent.

 > Nit: those should be sgMat4's, right?  Or are you returning a pointer
 > to an array of four vectors?

Returning sgMat4's seems to cause compiler problems, and this is how
Norm had it before.


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