David Megginson writes:
>
>While we're talking about refactoring, I think that it might be time
>to consider creating something like an FGLocus class, to keep track of
>a single location.  Its interface would look a lot like the viewer's:
>
>  class FGLocus
>  {
>  public:
>    FGLocus ();
>    virtual ~FGLocus ();
>
>    virtual double getLongitudeDeg () const;
>    virtual double getLatitudeDeg () const;
>    virtual double getAltitudeFt () const;
>
>    virtual void setPosition (double lon_deg, double lat_deg, 
>double alt_ft);
>
>    virtual double getRollDeg () const;
>    virtual double getPitchDeg () const;
>    virtual double getHeadingDeg () const;
>
>    virtual void setOrientation (double roll_deg, double pitch_deg,
>                                 double heading_deg);
>
>    virtual const sgMAT4 &getTransformMatrix () const;
> 
>  };

Good Idea but I don't know about the name

< sidebar >
it would behoove the project to stop thinking in spherical terms 
xcept when doing user input / output.  Converting back and forth 
between sperical and cartesian representation is a time sink that 
doesn't need to happen at all as far as the inner workings of the 
program are concerned. The cartesian form of the position and 
orientation is already put on the 'bus' in cartesian form USE IT

We ONLY want to make the conversion at the User <-> Machine 
interface.  

give the gfx hardware a chance to work :-)

Norman


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

Reply via email to