On Mon, Aug 1, 2011 at 10:18 AM, Durk Talsma wrote: > Hi Stuart, > On 30 Jul 2011, at 21:31, Stuart Buchanan wrote: > >> >> So, I quickly wrote an alternative to the current Nasal system geodinfo(), >> using the groundcache instead of the current scenery method. >> > > This sounds very interesting: As far as I can tell, the AI system still makes > use of scenery.get_elevation_m(), as shown in AIBase.cxx (line 516): > > 516 bool FGAIBase::getGroundElevationM(const SGGeod& pos, double& elev, > 517 const SGMaterial** material) const { > 518 return globals->get_scenery()->get_elevation_m(pos, elev, material, > 519 model.get()); > 520 } > > I always thought that get_elevation_m would be using the ground cache itself, > but apparently that is not the case? If so, it seems to me that changing the > AI system to actually use the ground cache could yield another performance > increase. > > If you have any pointers on how this could be changed in an efficient way, > I'd be happy to hear about it. :-)
I'm looking to see whether we should just have a single way to query the ground elevation using the groundcache, and use that everywhere. However, the AI call you quote specifically excludes the model itself, and I need to determine how to do that using the groundcache. -Stuart ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel