On mer 5 septembre 2007, Melchior FRANZ wrote:
> * gh.robin -- 9/5/2007 4:15 PM:
> > groundcache.cxx seems to be able to give the material information
>
> [...]
>
> > With a specific property we could have it fully opened.
>
> Isn't the property tree, but might be useful nevertheless:
> There's a Nasal function geodinfo() that returns material and
> other properties for given lat/lon coordinates. If you really
> need it in the tree (e.g. for XML animations), then you could write
> a simple Nasal loop that copies it there in regular intervals.
>
>   var lat = getprop("/position/latitude-deg");
>   var lon = getprop("/position/longitude-deg");
>   var info = geodinfo(lat, lon);
>
>   if (info != nil) {
>       print("the terrain under the aircraft is at elevation ", info[0], "
> m"); if (info[1] != nil)
>           print("and it is ", info[1].solid ? "solid ground" : "covered by
> water"); }
>
>   debug.dump(info);
>
>   # outputs
>   [ 106.9892101062052, { light_coverage : 0, bumpiness :
> 0.5999999999999999, load_resistance : 1e+30, solid : 0,  names : [ "Lake",
> "Pond", "Reservoir", "Stream", "Canal" ], friction_factor : 1,
> rolling_friction : 1.5 } ]
>
> see:
> http://wiki.flightgear.org/flightgear_wiki/index.php?title=Nasal_scripting_
>language
>
> m.
>
Oh, yes 
thanks Melchior

That solution is useful, i was just looking for a "lazy boy" way, without 
Nasal :)

Regards
-- 
GĂ©rard


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to