"Curtis L. Olson" said:

> Question:
> 
> When a model with an xml wrapper is loaded, where in the code is the 
> animation updated?
> 
> Take the windsock at SFO for example.  I see the top level load call is 
> triggered from tilemgr.cxx when it is popped from the model load queue.  
> This triggers a call to load_model() in modellib.cxx which in turn 
> triggers a call to sgLoad3DModel() in model.cxx.  sgLoad3DModel() 
> handles the xml wrapper and sets up the transformation nodes.
> 
> But, I'm not seeing where these animations are stored and updated as the 
> sim is running.
> 
> I ask because I am tempted to add a big pile of wind socks to the world 
> scenery, but I'm not sure of the performance implications.
> 
> Is it possible to do some sort of LOD in the xml so that a windsock is 
> only animated when you get within some certain range?   If we add a 
> windsock to the end of every runway, will we have a big performance 
> problem with the current system?
> 

That'll be cool!  Just do a range select, it won't add up to all that much. 
Those are callbacks and won't get run if the node is deselected.  Probably
something like 2km will be plenty.

Check out sgMakeAnimation in simgear/scene/model.cxx,  and the actual code
itself is in simgear/scene/animation.cxx.

Best,

Jim


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to