Gullen, Jim (Jim.Gullen++at++GSC.GTE.Com)
Thu, 20 Nov 1997 08:42:01 -0800
> > Just curious about why Steve used PFTRAV_CONT and not PFTRAV_PRUNE
> to
> > alter the behaviour of the cull traversal. Otherwise his answer to
> the
> > original posting was very helpful, as per usual.
>
> > The reason I asked was because the node in question may be a group
> node
> > representing an assembly of components. If so, there will be a lot
> of
> > child nodes to leave alone as well. I wasn't too sure what would
> happen
> > in that case and so thought PFTRAV_PRUNE might have been better than
> > writing a node traversal function for each child as well.
>
>From the pfCull man page:
Method 1 (traversal and node cull masks):
"If the traversal CULL mask and node CULL mask AND to zero at a node,
the
CULL traversal disables view culling and trivially accepts the node and
all its
descendants. Note that unlike other traversals, a mask result of 0 does
not
prune the node."
// Auto-culling accept/reject based on parent testing only.
pfnode->setTravMask(PFTRAV_CULL, 0x00000000,
PFTRAV_SELF, PF_SET );
or
pfnode->setTravMask(PFTRAV_CULL, 0x00000000,
PFTRAV_SELF | PFTRAV_DESCEND, PF_SET );
Method 2 (pre-cull callback cull result and return):
In a pre-cull callback return PFTRAV_CONT with a cull result of
PFIS_MAYBE | PFIS_TRUE | PFIS_ALL_IN. This means the node is
totally inside, therefore trivially accept it and its descendants.
Method 3: Define an oversized bounding sphere. Make it extremely
oversized if you *never* want it culled.
The best results come from applying an oversized bounding sphere on the
appropriate parent node AND applying method 1 or 2 to its immediate
children only. No other complexities need be implemented.
=======================================================================
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:56:14 PDT