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

New Message Reply Date view Thread view Subject view Author view

Dirk Luesebrink (crux++at++artcom.de)
Fri, 09 May 1997 04:35:38 -0400


Chehayeb, Nassouh wrote:
>
        ...
>
> 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,
>

one callback per node is an uneeccesarry limitation. so i implemented a
similar scheme like you did. in case i found callbacks and data on
nodes installed by some loader i just dared to wrap them up in my
scheme.

pfNode* someNode;

for(which in PFTRAV_ISECT, PFTRAV_APP, PFTRAV_CULL, PFTRAV_DRAW) {
         
        someNode->getTravFunc(which, & preCB, &postCB);
        data = someNode->getTravData(int which);
         
        NodeTravData::set(someNode, which, preCB, postCB);
}

scary thing to deal with unkown things, but for most of the callbacks i
encountered it worked ok.

dirk.
=======================================================================
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.