Re: pfNode::getTravData() return non NULL pointer.

New Message Reply Date view Thread view Subject view Author view

Chehayeb, Nassouh (nchehayeb++at++ceit.es)
Thu, 8 May 1997 20:04:49 +0200


        Thanks to Marcus for answering my question. This my be a
problem if you want to implement a general traversal warp system as
follow:

   class NodeTravData: public pfObject
           {
           protected:
             NodeTravData *next;
             NodeTravData *prev;

             int travId;
             pfNode *node;
            
             void *data;
             pfNodeTravfuncType pre, post;

           public:
              NodeTravData();
            ~NodeTravData();

           public:
             // link this element to the List.
             void set(pfNode *_node, int _travId, pfNodeTravFunc _pre,
pfNodeTravFunc _post, void *_data)

             //unlink this element from the List.
             void unset();

           protected:
             // Call all preTravFunc in the list passing user data
pointer.
             static int preTravFunc(pfTraverser *, void *);

             // Calll all postTravFunc in the list passing user data
pointer.
             static int postTravfunc(pfTraverser *, void *);
           };

        Using this class you can add (set) and remove (unset) an
unlimited number of callback in a traversal in a transparent mode. The
function set will create a linked list of CB and data that will be
called by the preTravFunc an postTravFunc but this only works if the
first pfNode::getTravData() return a NULL..

Regards,
        Nassouh.

> -----Original Message-----
> From: Marcus Barnes [SMTP:marcus++at++multigen.com]
> Sent: jueves 8 de mayo de 1997 19:40
> To: Chehayeb, Nassouh
> Cc: 'Info-Performer'
> Subject: Re: pfNode::getTravData() return non NULL pointer.
>
> On May 8, 10:35am, Chehayeb, Nassouh wrote:
> > Subject: FW: pfNode::getTravData() return non NULL pointer.
> > Hi,
> >
> > The loader that I use is the pfdLoad_obj().
>
> This loader doesn't directly setup traversal data. It may do so
> indirectly
> because most loaders use the pfdBuilder and pfdBuildNthNode() may use
> traversal
> functions and data to add pfdExtensor's to the scene graph.
>
> It could be you've found a cleanup bug in pfdBuilder ... I don't see
> it
> NULL-ing out trav data, only setting it.
>
> > Is there any user manual for this loader?
>
> No, but the source code is in /usr/share/Performer/src/lib/libpfdu if
> you have
> installed the performer_dev.src.loader subsystem.
>
> Regards.
> --
> + Marcus Barnes, Technical Staff mailto:marcus++at++multigen.com +
> + Multigen Inc. http://www.multigen.com +
> + 550 S. Winchester Blvd. phoneto:1-408-556-2654 +
> + Suite 500 San Jose CA 95128 faxto:1-408-261-4102 +
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


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:55:12 PDT

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