re: [Plib-users] Animations again....
Brought to you by:
sjbaker
From: David M. <da...@me...> - 2003-01-23 12:34:17
|
SkyFlash writes: > Can anyone point me to a good source of information on how to get 3D > animations into PLIB and run them? > What I tried yet didnt work at all.... For FlightGear, we built animations as a separate layer on top of plib rather than trying to do anything inside plib. You specify animations using XML wrapper files, referencing objects inside a model by name (that wrapper files can also import submodels into the model); FlightGear adds a callback and userdata to the scene graph so that the animation will update automatically when the named branch is traversed. Here's an example from the XML wrapper for a Cessna 172P, to rotate the rudder: <animation> <type>rotate</type> <object-name>Rudder</object-name> <property>/surface-positions/rudder-pos-norm</property> <factor>17.5</factor> <center> <x-m>4.84</x-m> <y-m>0.0</y-m> <z-m>-.16</z-m> </center> <axis> <x>0.25</x> <y>0.0</y> <z>1.0</z> </axis> </animation> "/surface-positions/rudder-pos-norm" refers to an internal property in FlightGear -- FlightGear publishes all of its state through a property tree that can be loaded from or saved to XML, or accessed through a GUI or over the network via HTTP or FTP. All the best, David p.s. Please turn off HTML formatting in your e-mail client -- it adds a lot of display garbage to your postings. -- David Megginson, da...@me..., http://www.megginson.com/ |