pfNodeTravFuncs question

New Message Reply Date view Thread view Subject view Author view

Rudy Darken (darken++at++enews.nrl.navy.mil)
Wed, 20 Oct 93 10:21:59 -0400


I'm having a problem getting a performer object to respond
correctly to its pre and post callbacks. My objective is
to have this object be drawn depending on some boolean
value. Actually, I think my problem is more with
pfNodeTravMask than pfNodeTravFuncs. Here's what it
looks like:

{
pfGeode *obj;

pfNodeTravFuncs (obj, PFTRAV_DRAW, PreObjCallback, PostObjCallback);
}

long
PreObjCallback (pfTraverser *trav, void *data)
{
  if (!obj_on)
  {
    pfNodeTravMask (obj, PFTRAV_DRAW, 0x0, PFTRAV_SELF, PF_SET);
    return PFTRAV_PRUNE;
  }
  else
  {
    pfNodeTravMask (obj, PFTRAV_DRAW, 0xffffffff, PFTRAV_SELF, PF_SET);
    return PFTRAV_CONT;
  }
}

long
PostObjCallback (pfTraverser *trav, void *data)
{
  return PFTRAV_CONT;
}

Two questions: First, when I replace obj with trav in the callbacks,
it core dumps. Shouldn't they be the same?
Also, do I have to do anything in the post callback? What is the
purpose of the return value?
What happens now is that the boolean flag is initially false and
even when it changes to true, the object is never drawn.

Thanks for any assistance.

rudy

_______________________________________________________________
Rudy Darken <202> 767-6814
darken++at++enews.nrl.navy.mil The U.S. Naval Research Laboratory
darken++at++seas.gwu.edu The George Washington University
_______________________________________________________________


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:50:04 PDT

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