Re: Some Basic Q's

New Message Reply Date view Thread view Subject view Author view

Kathryn Loynes (kathyl++at++wormald.com.au)
Mon, 12 Sep 1994 12:12:04 +1000 (EST)


On Sun, 4 Sep 1994, Kent Watsen wrote:

> 1) If I have a pointer to some geometry which
> contains one or more pfDCS's, how can I obtain
> pointers to the new pfDCS's after pfClone-ing
> the geometry? .... <stuff deleted> ...

I have recently been involved with the same issue. I ended up doing what
you describe in the last sentence : traversing down the new (cloned)
geometry under "NewRoot" until the cloned node "X" was found. Then
storing the pointer to new node "X" for future use. The pfuTraverse
function will do this. I associated a node callback with it to
distinguish the DCS nodes of interest. The callback simply tested
to see if the current node was a DCS, if so then pfGetNodeName was
used to establish which DCS this was (important if the geometry beneath
"NewRoot" had multiple DCSs in it) and then stored the pointer to the
node. I deliberately avoided using the pfFindDCS function for performance
reasons. Also, as you point out it requires all node names within the
scene graph to be unique which would not be the case with multiple
cloning. The traversal approach only requires that all DCS nodes within a
single cloned section are uniquely named.

Hope this helps !

> 2) Someone else ...
>
> 3) Someone else ...

  ----------------------------------------------------------------------
    Kathy Loynes | Wormald Technology
    kathyl++at++wormald.com.au | Advanced Systems Engineering
| Ph: +61 2 981 0611


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

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