From: Allan Schaffer (allan++at++sgi.com)
Date: 06/29/2004 18:15:27
Hi Kejian,
Can you be sure that the node you've picked actually has a name? It's not
mandatory. The user (or modeller) has to set this, but if they don't the
name field will be NULL.
Or do you mean the name of a "type" of the node? (ie the name = "Geode",
"Group", etc, and this would be the same for all nodes of that type)? In
this case you can use pfGetType() or pfGetTypeName().
If you have a pointer to the Geode, pfGetParent() will give you its parent.
Bear in mind there can be multiple parents so this can be tricky. If you
need to get the specific node-path to the picked node, you could modify the
pfiPick.c routines in /usr/share/Performer/src/lib/libpfui to return this data..
Allan
Kejian Jin wrote:
> I have used pfiPick to pick up a GeoSet, but usually pfGeode does
> not have a name. I wonder how to get the name of the parent of this
> Geoset. ( maybe a Group node, the first parent) ?
> What are the steps to accomplish this?
> Note: I have tried out the example in /usr/share/Performer/src/pguide
> but I always get node name NULL because i always pick a nodeType:
> pfGeode. I don't know which kind of mode to be set so that pfiPick
> will pick up a pfGroup? or some function to get the parent of this
> pfGeode?
>
> Thank you very much.
-- Allan Schaffer allan++at++sgi.com Engr. Dept. Manager, Visual Systems Group 1-650-933-2160 Silicon Graphics http://www.sgi.com
This archive was generated by hypermail 2b29 : Tue Jun 29 2004 - 18:15:59 PDT