pfSequence nightmare

New Message Reply Date view Thread view Subject view Author view

Darin C. Partridge (darin++at++paradox.idec.sdl.usu.edu)
Thu, 22 Jun 1995 13:02:59 -0600


I have a pfSequence node with 5 nodes under it. When I set the
approriate variables to cycle through them all, Performer
renders the first,second,third, and forth. The fifth frame doesn't
appear, but there seems to be a pause in the sequence for the frame.
When I set the sequence to do frames 1-4 (instead of 0-4) then frames
1-4 appear as desired. If I ever include frame 0, it will display
all the frames excluding the last one. I tried adding a dummy node
on the end and then tell it to display 0-5 but that didn't help.

This is an excerpt from my modified obj loader.
I build the geometry under the pfSequence node after the
if (SAME(token, "animation")) and before the
if (SAME(token, "endanimation"))
/*******************************************************/

        /* identify token */
        if (SAME(token, "animation"))
        {
            pfSequence *seq = pfNewSeq();
            long smode;
            long start, end;
            double duration;
            char amode[ 256 ];

            sscanf(next, "%ld%ld%lf%s%n", &start, &end, &duration, amode,
&width);
            next += width;
            if( SAME( amode, "loop" ) )
              smode = PFSEQ_CYCLE;
            else
              smode = PFSEQ_SWING;

            animation = 1;

            pfSeqTime(seq, PFSEQ_ALL, duration);

            pfSeqInterval(seq, smode, start, end);
            pfSeqDuration(seq, 1.0f, PFSEQ_ALL);

            pfSeqMode(seq, PFSEQ_START);
            saveroot = node;
            node = ( pfNode * ) seq;
        }
        else
        if (SAME(token, "endanimation"))
        {
            animation = 0;
            pfAddChild( saveroot, node );
            node = saveroot;
        }

Thanks for any insights,
Darin


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:36 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.