Re: Deleting root nodes
Tom McReynolds (tomcat++at++proxima)
Sat, 3 Feb 1996 23:03:49 -0800
On Feb 2, 10:03pm, Sharon Clay wrote:
> Subject: (Fwd)
>
>
> Ahh - an easy one for you to take!
>
> He can delete the scene node directly and make a new one
> or delete nodes under it and replace them.
>
> 2.0 will correctly delete the scene graph under the node
> and will unref-delete all pfMemory referenced by those nodes.
> 2.1 only did libpr and libpf types automatically and didn't deal
> with user data or vertex attribute arrays.
> The 2.0 pguide/libpf/C/motif.c example shows replacing an
> entire scene graph with pfDelete.
>
> You can man on pfObject and look at the pfDelete section for 2.0.
>
> src.
>
> --- Forwarded mail from vijay++at++serc.serc.iisc.ernet.in (Vijaykumar B)
>
> Date: Sat, 3 Feb 1996 00:55:44 GMT
> From: vijay++at++serc.serc.iisc.ernet.in (Vijaykumar B)
> To: info-performer++at++sgi.sgi.com
>
> Hi Performers,
>
> How can I delete the root node and add a new node to the Scene?
> If there is any example programs ?
> Thankx
> Vijay
>
>
> ---End of forwarded mail from vijay++at++serc.serc.iisc.ernet.in (Vijaykumar B)
>
You can separate the root node from the scene, using removeChild(), and
attach any node you want to scene using addChild(), as so ably demonstrated
by Kowsik Guruswamy's email.
Or, you can delete the scene node directly (which will also delete the
scenegraph if it isn't referenced elsewhere) and make a new scene. Take
at pguide/libpf/C/motif.c in function LoadModel() for an example.
The LoadModel() example also shows you you can use pfReplaceChild() to
switch from one graph to another.
Hopes this helps!
-Tom
This archive was generated by hypermail 2.0b2
on Mon Aug 10 1998 - 17:52:21 PDT