Sounds like a cool app, gotta love space when your a geek ;-)
Anyway back to code... You could use the AnimationPathCallback to allow you to offset and scale the time that is used to extract the control points from the AnimationPath. This would give you the hiding you want, but it might be of use.
For the hiding of nodes you could use an update callback attached the node/subgraph you want to hide this update callback could toggle the NodeMask to switch its subgraph on or off. A swich node would also do the trick. There is also osg::Sequence is a switch with timer support in it too, this might even stretch to supporting what you want to do.
Robert.
On 10/4/06, Pasquale Tricarico <[EMAIL PROTECTED]> wrote:
Hi,
I'm using AnimationPath in a scene representing an impact of two
asteroids, and their subsequent fragmentation. All the loop-modes are
LOOP, so that the scene representing the impact keeps repeating on the
screen. In this scene, initially there are only two nodes, each one
representing an asteroid, while after the impact there are hundreds of
nodes (fragments), each one following a different AnimationPath. The
problem here is that AFAIK I'm forced to assign control-points to
every animation path covering exactly the same time interval, i.e.
every AP must have a CP at t=0 and one at t=10, with impact at t=5,
plus an arbitrary number of intermediate points, otherwise the various
nodes in the scene are not correctly synchronized. Also, using
different time-intervals for different AP, some fragments appear even
before they're created. So what I'd like to know is:
- is my experience correct, or I'm missing something important?
- if all the AP must cover the same interval, how can I force OSG to
"hide" a node for i.e. t<5, that is, ignore all the CP before t=5?
Thanks,
Pasquale
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
