Darin C. Partridge (darin++at++paradox.idec.sdl.usu.edu)
Thu, 22 Jun 1995 13:02:59 -0600
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
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:36 PDT