From: Paolo Farinelli (paolo++at++sgi.com)
Date: 09/09/2003 13:54:29
Hi Tony,
Yes, it looks like the flt loader does its own pfdCleanTree-like
optimizations after loading a file.
The 'clean' optimization can be disabled through the call:
pfdConverterMode_flt( PFFLT_FLATTEN, FALSE );
See man pfdConverterMode_flt for details.
Hope this helps,
Best Regards,
Paolo
Anthony Clare wrote:
> Hi Paolo,
>
> Thanks. I am not calling pfdCleanTree myself so it must be being
> called by the flight loader perhaps(?) or is this a default behaviour?
> The object beads in the flt file are already commented (as you
> suggest) but they are initially (it seems) loaded as pfGroups with a
> child pfGeode. I might try installing my own traverser for
> pfdCleanTree if I can find where it is called from.
>
> Regards,
> Tony.
>
> At 14:17 05/09/03 -0700, you wrote:
>
>> Hi Tony,
>>
>> it is likely that your database is getting 'cleaned' after being loaded.
>>
>> From pfdCleanTree man page:
>>
>> pfdCleanTree traverses the scene graph rooted at node and removes
>> redundant and empty pfGroups from the scene graph. It also
>> converts any
>> pfSCS with an identity transformation into a pfGroup.
>>
>> By default, pfGroups are eliminated if they have one or fewer
>> children.
>> Any children are reparented to the parent of the pfGroup being
>> eliminated. The one exception is a pfSwitch node with one child,
>> which
>> is not eliminated. An optional function func can be provided to
>> alter
>> this determination during the traversal. At each candidate
>> pfGroup, func
>> is passed a pfuTraverser which includes the current node. If func
>> returns TRUE, the current node is eliminated. If func returns
>> FALSE, the
>> current node is retained.
>>
>> You may want to avoid calling pfdCleanTree altogether, or you may
>> want to
>> work around this problem and still call pfdCleanTree (as this does
>> improve
>> the efficiency of your db representation)..
>>
>> For example you could try assigning names to object beads (instead of
>> group
>> beads) in Creator, and then look for pfGeodes instead of pfGroups
>> through
>> pfFindNode..
>>
>> Alternatively you could add a second child bead to each of your named
>> objects
>> in the flt file, to prevent them from being removed by pfdCleanTree..
>> you could
>> then remove these additional nodes yourself after 'finding' each group..
>>
>> Hope this helps.
>>
>> Best Regards,
>> Paolo
>
-- Paolo Farinelli paolo++at++sgi.com Member of Technical Staff, OpenGL Performer 1-650-933-1808 Silicon Graphics 1600 Amphitheatre Pkwy, Mountain View, CA 94043
This archive was generated by hypermail 2b29 : Tue Sep 09 2003 - 13:55:50 PDT