BOCCARA Michael (MICHAEL.BOCCARA++at++siege.aerospatiale.fr)
Thu, 28 Nov 1996 15:12:08 +0100
What I can advice you is to set a global function as a traversal callback
(you can set it as a friend), and in that callback call a member function of
the class. Example :
class pfBidouille : public pfObject
(
public:
static void init....
public:
pfBidouille(void);
...
protected:
// the member callback
int preDrawCB(pfTraverser*, void*);
// the global callback
friend int _preDrawCB(pfTraverser*, void*);
);
pfBidouille::pfBidouille()
(
setType...
setTravFuncs(PFTRAV_DRAW, _preDrawCB, DO_NOTHING);
)
int
_preDrawCB(pfTraverser* trav, void* data)
(
pfBidouille *bidouille = (pfBidouille*)trav->getNode();
return bidouille->preDrawCB(trav, data);
)
int
pfBidouille::preDrawCB(pfTraverser* trav, void* data)
(
... your treatment ...
)
If you are a C++ purist, you may be satisfied by this method.
For my concern, it fits to my object oriented spirit...
cheers, regards, etc.
Michael Boccara
_______________________________________________________________________________
_
De: P=INTERNET; DDA.TYPE=RFC-822; DDA.VALUE=guest(a)holodeck.csd.sgi.com le
Jeu 28 Nov 1996 1:05
Objet: C++ Draw Callback?
A: P=INTERNET; DDA.TYPE=RFC-822; DDA.VALUE=info-performer(a)sgi.com; BOCCARA
Michael
Fichiers: BDY581.TXT
RFC-822-Headers:
Posted-Date: Wed, 27 Nov 1996 23:29:29 GMT
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 618
===================================List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:02 PDT