Hi there!

After some time of coding and restructuring I finally managed to clean 
up the repaint-code using the property-tree as interface for the data 
between fg and sg. Now everything is calculated where it's supposed to 
be: Environmental data in fg's environment, positional data in the 
reposition code and color in repaint. Nice and clean ;-)

I'm using the following property-tree nodes for interaction between the 
sun-code and the environment:

/environment/relative-humidity                           // data for repaint
/environment/atmosphere/density-tropo-avg        // data for repaint

/environment/atmosphere/altitude-half-to-sun     // data for calculating 
avg density
/environment/atmosphere/altitude-troposphere-top   // data for 
calculating avg density

Is the location of the nodes ok, or should I move them somewhere else?

I'm really happy about the solution with the property tree.
Since everything is working fine, I can address the other points in the 
coming days.

Mark

Melchior FRANZ wrote:
> * Melchior FRANZ -- Monday 10 July 2006 20:24:
>   
>> If you let fgfs tell sg which node to get the density from, and
>> make this a node with tied getter function, [...]
>>     
>
> Or, illustrated with some code:
>
>
> fgfs:
>
>   static double calc_density() {
>      // stuff
>      return density;
>   }
>
>   void Whatever::bind() {
>        fgTie("/calculate/density", calc_density);
>   }
>
>   void Whatever::unbind() {
>        fgUntie("/calculate/density);
>   }
>
>
> now you tell sg that it can have the density from /calculate/density,
> and whenever sg or anyone else reads that property, the density is
> calculated freshly (and only then).
>
> m.
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>   


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to