Quoting Dave Martin : > On Sunday 23 Jan 2005 23:39, Frederic Bouvier wrote: > > Jon Stockill a écrit : > > > Frederic Bouvier wrote: > > >> If you look at the tower-medium.xml, you will have an idea on how it > > >> is made. > > >> Jon, I will see if I can do something during the week for the spin > > >> animation. > > > > Soon on your screen : > > http://frbouvi.free.fr/flightsim/fg-spin-perso.jpg > > Brilliant :-) > > Self destructing radio masts no less (they cut their own guy ropes) ;-) > > Any insight into the method you used for the randomisation?
C++ hack into the animation code. The initial problem is that the same model is spread on the scenery without copying the data. So every instance shares the same set of animation parameters. I modified the load_model procedure in modellib.cxx ( already in CVS ) to add a new plib branch object that hold "personality" data. It is a set of C++ map that use the pointer of the unique personality branch to store animation state variables. For reference, look at personality.[ch]xx. You can already see it in action and in the code for the SGTimedAnimation. I now have to build a patch to add this behavior to the SGSpinAnimation. I also have to update documentation. Basically, in the spin animation, you'll replace : <factor>2.0</factor> <starting-pos-deg>0</starting-pos-deg> by : <factor> <random> <min>1.8</min> <max>2.2</max> </random> </factor> <starting-pos-deg> <random> <min>0</min> <max>360</max> </random> </starting-pos-deg> again, look at tower-medium.xml for an example in situation. -Fred _______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d