Re: pfClone

New Message Reply Date view Thread view Subject view Author view

Len Granowetter (lengrano++at++mak.mak.com)
Thu, 19 May 94 11:46:50 -0400


>What version of Performer are you using? I found that in v1.0 and v1.1
>that the pfFindNode does not work so I wrote my own. Basically, I had
>pointers to the DCSs in the original. After I cloned, I backward
>traversed (pfGetParent) the original scene graph until I reached the top level
>node that was cloned (storing the path on a stack as I went up). I then
>traversed downward using the names of the node stored on the stack one
>level at a time.
>
>If there is an easier way, I would like to know about it.
>
>Hopefully, pfFindNode works in 1.2.

I am using Performer1.2, but pFind would not really help in this case,
since the nodeName of the desired node in the cloned graph would be
the same as the nodeName of the desired node in the original graph.
pfFind returns NULL when the name is ambiguous (more than one node with
the desired name).

Unfortunately, 1) there is no capability for passing a callback
function to pfClone and 2) pfFind does not have the capability for
passing it a root node indicating where to start the search. If there
were, I could just run pfFind on the desired name, passing in the root
of the cloned subgraph as the starting node.

Anyway, either writing a function that implements my #2 above, or one
that does what you suggest seem like the best ways to do this. I had
been thinking along those lines as well but I thought I'd ask if I
was overlooking an easier solution first.
         
                             Thanks,
                                    -Len Granowetter
                                 


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

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