Yair Kurzion (yair++at++polygon.engr.sgi.com)
Tue, 21 Dec 1999 12:04:35 -0800 (PST)
> I have node 'root' loaded from database file and node 'clone' cloned from the 'root'.
> Both are attached to the same scene.(see snipcode bellow)
> When I set the DRAW travMask to 0x0 for root only (or for clone only ) both objects are
> not drawn. Can somebody tell me why ? I expect the only node with zero mask is not drawn .
> When the 'clone' node is loaded from the data file, the appropriate node is not drawn only.
pfClone provides instancing which shares geometry but not variable state
like transformations (pfDCS) and switches (pfSwitch). pfClone copies the
entire scene graph from node down to, but not including, leaf geometry
nodes such as pfGeodes, pfBillboards and pfLightPoints.
So, when you call
clone->setTravMask(PFTRAV_DRAW,0x00,PFTRAV_SELF | PFTRAV_DESCEND,PF_SET);
You are also marking the pfGeode nodes of the root scene graph because pfGeode
nodes are not cloned.
What exactly are you trying to implement ? Why do you have to clone the entire
tree ?
If all you need is a duplicate of your model with a different matrix node above
it, then you don't have to clone the root tree. Performer supports instancing
so your root tree can have multiple parent nodes. In other words, you can
pfAddChild your root tree to more than one node.
-yair
--
\_________ \_____ \__ \__ \_____ Yair Kurzion
\_________ \_____ \__ \__ \_____ yair++at++sgi.com
\__ \__ \____\__ \__ http://reality.sgi.com/yair
\__ \__ \__ Work: (650) 933-6502
\__ \__ \__ Home: (408) 226-9771
\__ \__ \__
This archive was generated by hypermail 2.0b2 on Tue Dec 21 1999 - 12:04:42 PST