Jeremy Friesner (jaf++at++chewils034.ucsd.edu)
Fri, 25 Jul 97 10:04:13
I've got a custom cull node callback in my code that I want to
use to more quickly eliminate certain subgraphs of my pfScene. My callback
looks something like this:
int preCullNodeCallback(pfTraverser * t, void *)
{
if (myCustomCullFuncSaysItAintVisible(t->getNode))
{
/* skip the children of this node, cause I know they can't be seen */
pfCullResult(PFIS_FALSE);
return PFTRAV_PRUNE;
}
else
{
return PFTRAV_CONT;
}
}
This works fine for the most part, but I do get some weirdness--
when I add another node to the root of scene graph (which does not have
this callback attached to it!), it sometimes gets (inappropriately) culled too!
This problem goes away if I change the "return PFTRAV_PRUNE" line
to "return PFTRAV_CONT", but then the cull traversal seems to still traverse
the subgraph below the node with the custom callback, which is what
I was hoping to avoid.
So I'm a little confused--is a cull callback supposed to affect
the traversal of nodes that are not children of the custom node?
If not, is this a bug?
Also, is pfCullResult() supposed to have an effect on the path of
the cull traversal, or does Performer only listen to the PFTRAV_*
return codes?
Thanks,
Jeremy
Jeremy Friesner | Amigas will rise again!
jfriesne++at++ucsd.edu | Why put up with crap?
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:39 PDT