On 21 Aug 2008, at 15:26, Erik Hofman wrote: > + FGViewer *current_view = globals->get_current_view(); > + > + // get the orientation > + const SGQuatd view_or = current_view->getViewOrientation(); > + SGQuatd surf_or = SGQuatd::fromLonLatDeg( > + current_view->getLongitude_deg(), current_view- > >getLatitude_deg()); > + SGQuatd model_or = SGQuatd::fromYawPitchRollDeg( > + globals->get_aircraft_model()->get3DModel()- > >getHeadingDeg(), > + globals->get_aircraft_model()->get3DModel()->getPitchDeg(), > + globals->get_aircraft_model()->get3DModel()->getRollDeg());
Ah, what I was really hoping to do, was to break the dependency on the FGViewer, and globals->get_aircraft_model(), by getting the equivalent position and orientation from the property tree. I haven't checked how straightforward that is, but having the sound code so intimately hooked up to the view code like this isn't ideal. Not to sound negative, I realise it's a case of improving one thing at a time. James ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Flightgear-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/flightgear-devel

