Anders Gidenstam wrote: > On Sat, 4 Apr 2009, Tim Moore wrote: > >> 1) Write the full vector every time a component is changed. This means >> potentially 4 times the memory traffic to change a color, and leaves the >> values stored in OSG in an inconsistent state for a time. >> > > If efficiency is of the outermost concern you could tie each of the > components of a double vec[4] to properties, e.g. > color/{red,green,blue,alpha}. That would make it possible for the internal > C++ code to use the vector representation while still preserving a nicely > structured and typed property tree for external access. The relevant values in OSG are protected members, accessed through getters and setters, so you can't tie the value to be set directly. Uing a tie like this just pushes the problem downstream a bit; one would still need to jump through the hoops I detailed before in terms of pushing the new value(s) to OSG.
Tim ------------------------------------------------------------------------------ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel