From: Jean-Christophe Ulysse (Jean-Christophe.Ulysse++at++loria.fr)
Date: 02/11/2003 12:14:11
Steve Satterfield wrote:
>
> I am hoping that someone can give me some help with an Inventor loader problem.
>
> Summary:
>
> I am developing a new file loader on IRIX 6.5.17m with Performer 2.5. Among
> other things, the loader loads other files. As the other files are loaded,
> the objects they represent are added to a group node and given a unique
> name (ASCII string) which is stored with pfNodeName. Within the loader I
> am writing, these names are later used to find their corresponding node
> using pfLookupNode and create translated instances to the original objects.
> The idea is to save space by referring to existing objects rather then
> re-loading them.
>
> The loader I am writing works fine on several of the usual Performer file
> formats. But it does not work when I use a very simple Inventor file. In
> that case, the pfLookupNode fails, and the instance is not displayed.
>
> Does anyone have any suggestions?
Hi Steve,
The way you're using pfLookupNode() with pfGetNodeClassType() is quite
curious ! In fact, the samples you provided have to don't work... both.
Actualy, pfLookupNode use the name AND the type to retrieve the right
object.
First :
There's a big difference in your samples for performer : when it loads a
simple iv object, it creates a pfGeode, and when it's a more complicated
iv model, it creates a pfGroup to enclose the objects. So the roots of
your
two samples are not the same type and it's the point !
Second :
You have to give a right type to pfLookupNode (see man pfFindNode), so
giving
the type of "pfNode" can't help.
And to finish :
Replacing pfGetNodeClassType() by pfGetGeodeClassType() make the first
sample
working but not the second, and replacing it by pfGetGroupClassType()
make the
second sample working but not the first.
(I think that if pfGetNodeClassType() succeed in place of
pfGetGroupClassType(),
it's a bug).
Hope this could help,
-----------------------------------------------------------------------
Jean-Christophe Ulysse
PhD student in Computer Science
ISA Team
Laboratoire Lorrain de Recherche en Informatique et ses Applications
-----------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Tue Feb 11 2003 - 12:16:24 PST