Re: pfNodeTravFunc

New Message Reply Date view Thread view Subject view Author view

Jim Helman (jimh++at++surreal)
Mon, 26 Jun 95 11:39:24 -0700


Performer traversal callbacks use the built in pfTraverser
type, not to be confused with libpfutil's pfuTraverser
which is provided as source code.

So use pfGetTrav<Blah> functions on "trav"; it's not an
exposed struct. Also, the call to pfNodeTravFuncs should
have generated a compiler warning since PreNodeCull is not
of the correct type.

-jim

> ....
> root = (pfGroup *)LoadFile(DatabaseFiles[i], NULL);
> pfAddChild(ViewState->sceneGroup, root);
> pfNodeTravFuncs(root,PFTRAV_CULL,PreNodeCull,NULL);
>
> ....
>
> long
> PreNodeCull(pfuTraverser *trav, void *data)
> {
>
> Here, I first want to check the type of node being traversed.
> If it is of type geode, I want to do further calculations here
>
> return PFTRAV_CONT;
> }
   


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:37 PDT

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